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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Negative function and DICOM files with a RescaleSlope <> 1
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

yeohray2

Malaysia
100 Posts

Posted - Nov 02 2021 :  03:43:27  Show Profile  Reply
How can I use the Proc.Negative function to correctly invert the grayscale values for a DICOM image that has a RescaleSlope value of <> 1, and where DICOM_Range is iedrSetBlackWhite?

I'm attaching a sample project together with a sample DICOM file. The first TImageEnView control loads the image with the defaults, the second TImageEnView sets DICOM_Range to iedrSetBlackWhite.

When I call the Proc.Negative function, the first TImageEnView control inverts the colors correctly, but the second TImageEnView displays a flat white image.

Is there some other setting that needs to be set in this case?

Thanks in advance.

Ray

attach/yeohray2/202111234219_TestNegative.zip
146.82 KB

xequte

38194 Posts

Posted - Nov 02 2021 :  22:21:30  Show Profile  Reply
Hi Ray

I'm out of the office today, but you should be able to call StretchValues before Negative:

https://www.imageen.com/help/TIEBitmap.StretchValues.html

e.g.

ImageEnView1.IEBitmap.StretchValues(); // Apply B+W values
ImageEnView1.Proc.Negative();

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

yeohray2

Malaysia
100 Posts

Posted - Nov 03 2021 :  03:59:56  Show Profile  Reply
Hi, thanks for the suggestion.

That option works, but it isn't feasible because we need to be able to identify each pixel's original HU value. Is using a color map feasible to invert the values?

Thank you.
Go to Top of Page

xequte

38194 Posts

Posted - Nov 03 2021 :  18:28:49  Show Profile  Reply
Hi

If you email me, we have an update with an "Inverted" color palette.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

yeohray2

Malaysia
100 Posts

Posted - Nov 07 2021 :  19:58:01  Show Profile  Reply
Hi Nigel, that works, thanks.

Ray
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: