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



Last Go to last post Unread Go to first unread post
#1 Posted : Monday, May 30, 2011 1:00:58 AM(UTC)

Groups: Registered
Posts: 24

Hi again,
can you help us to find the best (or any) solution for applying linear modality Lut : attach. example is grayscale 8bit dicom with pixel range 128 - 255, rescale slope = 2, rescale intercept = -128, window center = 255.5, Window Width = 255.

We load pixeldata (from DicomDataSet ds) using:

DicomElement de = ds.FindFirstElement(null, DicomTag.PixelData, false)
RasterImage img = ds.GetImages(de, 0, 1, 0, RasterByteOrder.Gray, DicomGetImageFlags.AutoApplyModalityLut | DicomGetImageFlags.AutoLoadOverlays | DicomGetImageFlags.AutoApplyVoiLut);

and then load it into MedicalViewer (during load we set MedicalViewerActionType.WindowLevel action using WindowLevel parameters from Dicom tags).

Image is not displayed correctly (like mod lut not applied at all). We quess that you don't support changing low/high bit/bpp automatically with AutoApplyModalityLut, since it should remap pixel values to range : 128 to 128+254 and then apply WindowLevel to only that range.
We tried with ApplyLinearModalityLookupTableCommand but it doesn't work on 8bit. Also played with setting low/high bit on resulting image but had a problem with correct WindowLeveling after that.
Providing piece of code for handling dicoms like this would be more than appreciated.

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 : Monday, May 30, 2011 1:04:20 AM(UTC)

Groups: Registered
Posts: 24

Image attached now. Also didn't mention that we use LT 17 .Net.
File Attachment(s):
xlut_01.zip (6kb) downloaded 58 time(s).
#3 Posted : Wednesday, June 1, 2011 5:26:50 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

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

This image is 8-bit and applying the linear modality transformation of rescale slope of 2 will double each stored pixel value (i.e. 255 stored value will be 512) and intercept of -128 will make the image signed. This will cause stored pixel value 2 to became 4 and -128 of 4 is -124.
And since image is 8-bit; it cannot hold the value of 512.
One way to get correct display is to create a 16-bit grayscale bitmap and use ShiftDataCommand Class to copy the 8-bit bitmap data to 16 bit bitmap and use  ApplyModalityLookupTableCommand Class on the 16-bit bitmap and use ApplyVoiLookupTableCommand Class after that for ideal display.

Maen Badwan
LEADTOOLS Technical Support
#4 Posted : Wednesday, June 1, 2011 5:40:03 AM(UTC)

Groups: Registered
Posts: 24

Thank you for this. Just one more quick question. Is there something in LeadTools we can use for applying Presentation LUT or is this done through setting LookupTable on image only?
#5 Posted : Thursday, June 2, 2011 7:52:56 AM(UTC)

Adnan Ismail  

Groups: Guests
Posts: 3,022

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

LEADTOOLS will use the same LUT used for Window Leveling or VOI LUT. Also, this LUT will be used for 16-bit palette color image as well.
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.076 seconds.