FHarry |
Posted - May 27 2015 : 07:16:42 Hi all,
yes, i have read one of the posts about how to do something like window-levelling for DICOM images. And that post does mainly just mention this code excerpt: aImage.LegacyBitmap := false; aImage.IO.NativePixelFormat := true; aImage.IO.Params.DICOM_Range := iedrSetBlackWhite; aImage.IO.LoadFromFileDicom(filename);
From this point on, it is told that i could do something like window-levelling by usage of the two properties: aImage.IEBitmap.WhiteValue := someWidth; aImage.IEBitmap.BlackValue := someCenter;
There is also a property mentioned "Dicom_WindowCenterOffset" which is described as "returns the calculated offset of the window center". The Dicom_WindowCenterOffset value is the same as the value of the RescaleIntercept tag from the dicom file.
By activating this code excerpt aImage.LegacyBitmap := false; aImage.IO.NativePixelFormat := true; aImage.IO.Params.DICOM_Range := iedrSetBlackWhite; aImage.IO.LoadFromFileDicom(filename); only images with NO modality LUT are displayed correctly. Other images having a modality LUT (Rescale slope is > 1 and Rescale Intercept is > 0) look strange. This sounds to me, as if i need to apply the so-called modality-LUT (the values from RescaleIntercept and RescaleSlope) on my own to the pixel data in order to get useful images. I think that this is exactly what a LoadFromFile() does if the NativePixelFormat is set to False.
For the images which have no modality LUT, and which are displayed fine, i however as well get strange whiteValue and BlackValues values. I thought, they would somehow correspond to the WindowWidth and WindowCenter tags. But they are far off those values.
So this raises two questions: 1. If i have a modality LUT in my image (Rescale slope is > 1 and Rescale Intercept is > 0), how to process the image so that the image is displayed correctly. I need to have NativePixelFormat=false in order to allow window-levelling afterwards.
2. How do the properties BlackValue and WhiteValue correspond to Width and Center from the DICOM world?
Thanks to all of you,
Harry |