Why my pixel value of DICOM is beyond 'Largest Image Pixel Value' attribute?

StackOverflow https://stackoverflow.com/questions/16443886

  •  14-04-2022
  •  | 
  •  

문제

I'm using dcmtk to fetch image data from dicom data. Now I have following information for a sample image:

  • (0028,0002) Samples per Pixel: 1
  • (0028,0004) Photometric Interpretation: MONOCHROME2
  • (0028,0010) Rows: 256
  • (0028,0011) Columns: 256
  • (0028,0030) Pixel Spacing: 1.5625\1.5625
  • (0028,0100) Bits Allocated: 16
  • (0028,0101) Bits Stored: 12
  • (0028,0102) High Bit: 11
  • (0028,0103) Pixel Representation: 0
  • (0028,0106) Smallest Image Pixel Value: 1
  • (0028,0107) Largest Image Pixel Value: 1060
  • (0028,1050) Window Center: 474
  • (0028,1051) Window Width: 1000
  • (0028,1055) Window Center & Width Explanation: Algo1

When I applied the window/center value to real pixel value of data, then many of them is white. I iterate on pixel values and then I found many pixel value (larger than 80 percent) is beyond Largest Image Pixel Value. Many of them are beyond of 5x of largest! This made my resulting image near to complete white. Strangely I don't why when I divide pixel values to 256 then the resulting image is near to the image that I expect. I can't understand why it's true.

Maybe it's good to see other unknown attribute :

  • (0019,1009) Unknown: 1.0
  • (0019,100b) Unknown: 245
  • (0019,1016) Unknown: 25.53

Why this happend to my image?

도움이 되었습니까?

해결책

could you verify that you are only reading 12 bits of each pixel? ie you've applied something along these lines

int value = ((byte[0] & 0x0f) << 8) | byte[1];

and not

int value = (byte[0] << 8) | byte[1];

다른 팁

I have not seen your image data but from what you say i think this is an endianness problem. Now i have not worked with gdcmtk extensively but in gdcm we have an option of setting the data endianness. Try setting the endianness to little instead of big. If you could provide me the dicom file i can try to read it using gdcm.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top