【发布时间】:2013-05-28 23:46:13
【问题描述】:
我正在使用 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 的值才可以?图片上没有padding value!
- 在getOutputData 的文档中,它谈到了渲染的像素数据总是无符号的。。由于 (0028,0103) 属性对我说,当我的图像数据被签名时,这意味着什么?如果这种方法不合适,我可以通过 dcmtk 获取真实数据吗?
【问题讨论】:
-
getOutputData返回一个void *,并且(正如你自己提到的)根据documentation,输出数据始终是无符号的。那么你不应该将输出数据转换为uint16吗? -
能否请您提供 Rescale Slope (0028,1053) 和 Rescale Intercept (0028, 1052),正如保罗建议的那样?