我正在使用 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
我使用 getOutputData(16) 读取 int16_t 数据。这让我感到惊讶,因为这些值在 -1*(2^16) 附近是负数,当我将这些值减去 2^15 时,一切似乎都正常,我可以看到图像!:-(
现在我有两个问题:
- 为什么我要减去 2^15 的值就可以了?图像上没有可用的填充值!
- 在getOutputData的文档中,它谈到了渲染的像素数据总是无符号的。. 由于 (0028,0103) 属性对我说,当我的图像数据被签名时,这意味着什么?如果这种方法不合适,我可以通过 dcmtk 获取真实数据吗?