Understanding BPP Inside DICOM Images

I have been working with DICOM files from a few days using FO-DICOM.

I use the dicom file set for my tests, and I print the values ​​"Photometric interpretation" and "Example per pixel" to better understand what images I work with.

The result was “MONOCHROME2” for photometric interpretation and “1” for sample per pixel.

What I understood by reading part 3 of the standard is that MONOCHROME2 is a gray scale, starting with black for its minimum values.

But what is a Sample Per Pixel? I thought this represented the number of bytes (rather than bits) per pixel (which would be logical to have 8 bits per pixel for the gray scale?)

But my problem here is that in fact my images seem to have 32 bps. I work with 512 * 512 image pixels and I converted them to byte arrays. Therefore, I expected arrays of 512 * 512 = 262144 bytes. But I get arrays of 1048630 bytes (which is slightly larger than 4 * 262144)

Does anyone have an explanation?

EDIT:

Here are some of my data:

PhotometricInterpretation=MONOCHROME2
SamplePerPixel=1
BitsAllocated=16
BitsStored=12
HighBit=11
PixelRepresentation=0
NumberOfFrames=0
+4
source share
1 answer

The attribute (0028,0002) SamplesPerPixelapplies only to color images and tells you the number of planes that are present in the image (e.g. 3 for RGB), so you have

PhotometricInterpretation=RGB
SamplesPerPixel=3

With 8 bits per pixel (I will revise BPP below). As long as you have PhotometricInterpretation= MONOCHROME1 or MONOCHROME2, you can expect that there SamplesPerPixelwill be 1 and nothing else.

, :

BitsAllocated (0028,0100)
BitsStored (0028,0101)
HighBit (0028,0102)

, (BitsAllocated), (BitsStored, HighBit). HighBit , = BitsStored-1

, : hounsfield, -1000 +3000. 12 , ,

BitsAllocated (0028,0100) = 16
BitsStored (0028,0101) = 12
HighBit (0028,0102) = 11

PixelRepresentation, , (0) 2s (1). CT, , CT.

, Bits Allocated == 32 ( ), , ('frames'), NumberOfFrames (0028,0008) > 1. , , .

, , , ;-). , DICOM .

, DCMTK . DicomImage (getInterData()), , DICOM .

[EDIT]: DICOM , , .

+5

Source: https://habr.com/ru/post/1626299/


All Articles