我使用DCMTK閱讀DICOM圖像和我有以下的新樣本屬性:當我使用dcmtk時,爲什麼要從2^15中減去我的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?
根據[documentation](http://support.dcmtk.org/docs/classDicomImage.html#46da8f4e40464d2659938b2b0bd10519),'getOutputData'返回一個'void *',並且(如您所提及的那樣)輸出數據總是無符號的。那麼你是不是應該把輸出數據轉換成uint16呢? –
請問保羅建議如何爲_Rescale Slope_(0028,1053)和_Rescale Intercept_(0028,1052)提供值(如果存在的話)? – jap1968