ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 DICOM and window width/center again

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
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
1   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - May 31 2015 : 19:38:48
Hi Harry

It is best that you review the source for iedicom.pas which will reveal the relationship between BlackValue/WhiteValue and WindowCenter+WindowWidth

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com