LEADTOOLS Support
Medical
Medical SDK Questions
Process for converting Signed Image to an Unsigned image w/o Display Issues
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Friday, June 22, 2007 7:20:54 AM(UTC)
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):
#2
Posted
:
Sunday, June 24, 2007 9:21:53 PM(UTC)
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)
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
#4
Posted
:
Tuesday, June 26, 2007 3:26:32 AM(UTC)
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)
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)
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)
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
#8
Posted
:
Friday, July 6, 2007 5:53:58 AM(UTC)
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)
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.
Travis Montgomery
Senior Sales Engineer
#10
Posted
:
Friday, July 13, 2007 12:58:35 PM(UTC)
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
Travis Montgomery
Senior Sales Engineer
#11
Posted
:
Wednesday, July 18, 2007 6:15:34 AM(UTC)
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)
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
LEADTOOLS Support
Medical
Medical SDK Questions
Process for converting Signed Image to an Unsigned image w/o Display Issues
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.