Holds the bits we need to (optionally) reproduce the DICOM display pipeline. Each member maps directly to a DICOM attribute.
| 154 | |
| 155 | // Holds the bits we need to (optionally) reproduce the DICOM display pipeline. Each member maps directly to a DICOM attribute. |
| 156 | struct DicomPixelModule { |
| 157 | uint16_t bitsAllocated = 16; |
| 158 | uint16_t bitsStored = 16; |
| 159 | uint16_t highBit = 15; |
| 160 | uint16_t pixelRepresentation = 0; // 0 = unsigned, 1 = signed |
| 161 | uint16_t samplesPerPixel = 1; |
| 162 | uint16_t planarConfiguration = 0; // 0 = interleaved (RGBRGB), 1 = planar (RRR..GGG..BBB) |
| 163 | |
| 164 | // Modality LUT / rescale (stage 2). Identity by default. |
| 165 | double rescaleSlope = 1.0; |
| 166 | double rescaleIntercept = 0.0; |
| 167 | |
| 168 | // VOI / windowing (stage 3). Optional. |
| 169 | optional<double> windowCenter; |
| 170 | optional<double> windowWidth; |
| 171 | }; |
| 172 | |
| 173 | DicomPixelModule readPixelModule(const gdcm::DataSet& ds, const gdcm::Image& image) { |
| 174 | DicomPixelModule m; |
nothing calls this directly
no outgoing calls
no test coverage detected