Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Friday, June 22, 2007 7:20:54 AM(UTC)
themidnightwill

Groups: Registered
Posts: 21


Hello,

I have run into the issue of needing to convert images from signed to unsigned due to using ImageProcessing effects. I accomplished the problem without issue by using the class ConvertSignedtoUnsigned. The conversion was performed, and I can now run the effects.

Unfortunately, once I convert to signed, the image looks nothing like it should. What is the process to maintain the appearance? Convert, then apply modality and voi lut values?

Any advice would be helpful. I have attached screenshots of the appropriate appearance, and after "unsigning" the image.


The DICOM file is a 16-bit signed image, JPEG-lossless. I can anonymize the image and post that as well if it would help.

Thanks as always!


Will
themidnightwill attached the following image(s):
signed-unsigned.jpg
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Sunday, June 24, 2007 9:21:53 PM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

Was thanked: 1 time(s) in 1 post(s)

Hello,

What is the exact LEADTOOLS version that you use?
Also, what is the build number (version info) of the LEADTOOLS DLLs that you use?
Is it possible to provide me with the Dicom 16-bit signed image that you are trying to convert?

Note: If you want to attach files, please put them in one ZIP or RAR file.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#3 Posted : Monday, June 25, 2007 7:40:33 AM(UTC)
themidnightwill

Groups: Registered
Posts: 21


Hi Maen,

Thank you for the response. I checked Leadtools.dll for .NET and it says version 15.0.0.11.

I have attached the signed image, the only change is it is now anonymized. I verified that the issue still exists after anonymization.

Thanks,

Will

File Attachment(s):
anonymized.zip (265kb) downloaded 45 time(s).
 
#4 Posted : Tuesday, June 26, 2007 3:26:32 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

Was thanked: 1 time(s) in 1 post(s)

Hello,

Can you please provide me with the code that you are using to load and convert the signed image using LEADTOOLS?

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#5 Posted : Tuesday, June 26, 2007 6:42:38 AM(UTC)
themidnightwill

Groups: Registered
Posts: 21


Here is my code:

RasterImage dataImg = ds.GetImage(null, 0, 0, RasterByteOrder.Gray, DicomGetImageFlags.AutoApplyModalityLut | DicomGetImageFlags.AutoApplyVoiLut);
ConvertSignedToUnsignedCommand sign = new ConvertSignedToUnsignedCommand();
sign.Run(dataImg);
return dataImg;


dataImg is set to a rasterImageViewer's .Image property


Thanks,

Will
 
#6 Posted : Friday, June 29, 2007 6:04:37 AM(UTC)
themidnightwill

Groups: Registered
Posts: 21


Hi Maen,

Were you able to see any errors in my process? Any ideas?

Thank you,

Will
 
#7 Posted : Tuesday, July 3, 2007 7:59:40 AM(UTC)

Travis  
Travis

Groups: Registered, Tech Support
Posts: 207

Was thanked: 3 time(s) in 3 post(s)

Looking at this image, I see that it is a CT. This image should be in Hounsfield units and the Bits Stored should be set to 12, not 16. This is what is throwing our ConvertSignedToUnsigned off.

Because of this, I would suggest not using ConvertSignedToUnsigned, but instead use ApplyLinearModalityLookupTableCommand class. Use the same slope but adjust the intercept by the value you wish to shift by. This will shift the data.

After this you will need to update the LUT. Do so using the ApplyVoiLookupTableCommand passing the correct values for image (meaning use 12 bits per pixel since that is what the image data actually is)

Edited by moderator Thursday, August 8, 2019 1:39:18 PM(UTC)  | Reason: Not specified

Travis Montgomery
Senior Sales Engineer
LEAD Logo
 
#8 Posted : Friday, July 6, 2007 5:53:58 AM(UTC)
themidnightwill

Groups: Registered
Posts: 21


Hi Travis,

My essentially experimentation for this has not been successfull. Leadtools will now let me do operations (such as average) which do not work on signed data.

My problem is though now the HU values are significantly skewed. Perhaps I am missing something. Would a short example be possible?

Thank you so much for your help.

Will
 
#9 Posted : Friday, July 13, 2007 12:52:06 PM(UTC)

Travis  
Travis

Groups: Registered, Tech Support
Posts: 207

Was thanked: 3 time(s) in 3 post(s)

After working with the Medical Team, we have managed to get ConvertSignedToUnsigned to work this image, except for the SHIFT_MIN_TO_ZERO constant.

I have attached a demo showing how this is done and how to adjust the VOI LUT after the conversion is performed.
File Attachment(s):
API - V15 - ConvertSignedToUnsigned.zip (316kb) downloaded 48 time(s).
Travis Montgomery
Senior Sales Engineer
LEAD Logo
 
#10 Posted : Friday, July 13, 2007 12:58:35 PM(UTC)

Travis  
Travis

Groups: Registered, Tech Support
Posts: 207

Was thanked: 3 time(s) in 3 post(s)

Sorry, you were using .NET. Here it is in .NET
File Attachment(s):
NET - V15 - ConvertSignedToUnsigned.zip (296kb) downloaded 51 time(s).
Travis Montgomery
Senior Sales Engineer
LEAD Logo
 
#11 Posted : Wednesday, July 18, 2007 6:15:34 AM(UTC)
themidnightwill

Groups: Registered
Posts: 21


Hi Travis,

Thanks so much! It displays great now.

The one issue remaining is alculating the HU value appropriately. I think what I need to do is calculate an "offset" (sorta like the rescale intercept) and always use it. (ex: write a GetHU(y, x) thing).

Does that sound reasonable? Any thoughts?


Thanks again so much Travis!!! If you're in the DC area ever, I owe you a beer ;-)

-Will
 
#12 Posted : Tuesday, July 24, 2007 5:38:39 AM(UTC)

Travis  
Travis

Groups: Registered, Tech Support
Posts: 207

Was thanked: 3 time(s) in 3 post(s)

A class that would be more appropriate to what you're doing would be the MinimumToZero command class.

HU values are in signed data, so you want to retrieve these values when the image is signed.

If you need to perform some image processing on the image and it needs to be unsigned use the MinimumToZero command class to convert it, then the ApplyLinearModalityLookupTableCommand Class to convert it back using the shift amount as a rescale intercept and 1 as the slope.
Travis Montgomery
Senior Sales Engineer
LEAD Logo
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.192 seconds.