我正在使用dcmtk来读取dicom图像,我对新样本有以下属性:
(0028,0004) Photometric Interpretation: MONOCHROME2
(0028,0010) Rows: 512
(0028,0011) Columns: 512
(0028,0030) Pixel Spacing: 0.4688\0.4688
(0028,0100) Bits Allocated: 16
(0028,0101) Bits Stored: 16
(0028,0102) High Bit: 15
(0028,0103) Pixel Representation: 1
(0028,0106) Smallest Image Pixel Value: 0
(0028,0107) Largest Image Pixel Value: 2732
(0028,1050) Window Center: 1366
(0028,1051) Window Width: 2732
Run Code Online (Sandbox Code Playgroud)
我使用getOutputData(16)来读取int16_t数据.令我感到惊讶的是,因为接近-1*(2 ^ 16)的值是负值,当我将值减去2 ^ 15时,一切似乎都可以,我可以看到图像!:-(
现在我有两个问题:
关键是像素表示(0028,0106)数据元素.
PixelRepresentation = 0 -> unsigned
PixelRepresentation = 1 -> signed
Run Code Online (Sandbox Code Playgroud)
在您的情况下,您的值为'1',因此您必须将值读取并解释为有符号整数.
您可以在此处找到更多信息.
| 归档时间: |
|
| 查看次数: |
4245 次 |
| 最近记录: |