MCPcopy Create free account
hub / github.com/Tom94/tev / readPixelModule

Function readPixelModule

src/imageio/DicomImageLoader.cpp:173–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

171};
172
173DicomPixelModule readPixelModule(const gdcm::DataSet& ds, const gdcm::Image& image) {
174 DicomPixelModule m;
175
176 const auto& pf = image.GetPixelFormat();
177 m.bitsAllocated = pf.GetBitsAllocated();
178 m.bitsStored = pf.GetBitsStored();
179 m.highBit = pf.GetHighBit();
180 m.pixelRepresentation = pf.GetPixelRepresentation();
181 m.samplesPerPixel = pf.GetSamplesPerPixel();
182 m.planarConfiguration = (uint16_t)image.GetPlanarConfiguration();
183
184 // Window Center / Width (0028,1050)/(0028,1051). May be multi-valued; take the first preset if present.
185 m.windowCenter = dicomGetValue<0x0028, 0x1050, double>(ds);
186 m.windowWidth = dicomGetValue<0x0028, 0x1051, double>(ds);
187
188 return m;
189}
190
191// Stage 2: stored -> physical. Optional. Returns true if anything was applied.
192Task<bool> applyModalityRescale(float slope, float intercept, const MultiChannelView<float>& view, int priority) {

Callers 1

readDicomImageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected