This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Friday, August 15, 2008 7:08:05 AM(UTC)
Groups: Registered
Posts: 2
I would like to make a custom window/level lookup table for displaying (normally) gray scale images. For the Medical Viewer control, the MedicalViewerWindowLevel class does not appear to let me do this. Is there a way to do this using the Medical Viewer control, and if not, can I do it in Lead at all?
Example of custom window/level table: mapping cycles from 0 to 255 gray level over and over with increasing pixel value.
#2
Posted
:
Friday, August 15, 2008 7:24:08 AM(UTC)
Groups: Registered, Tech Support, Administrators
Posts: 764
The MedicalViewer class does not have this functionality. However, you can use the ApplyVoiLookupTableCommand or ApplyLinearModalityLookupTableCommand depending on the type of LUT you are using. For more details and an example, please take a look at their documentation in the v15 .NET help file.
#3
Posted
:
Friday, August 15, 2008 10:05:07 AM(UTC)
Groups: Registered
Posts: 2
Hmm...ApplyVoiLookupTableCommand and ApplyLinearModalityLookupTableCommand seem to sort of re-map the image's pixel values...would RasterPalette.WindowLevelFillLookupTable be a better choice, if I'm really doing Window/Level?
It looks like I can access the RasterImage objects with code like:
int cellIndex = 0;
RasterImage rasterImage;
rasterImage = _medicalViewer.Cells[cellIndex].Image;
and then I can apply almost any RasterImage-based operations I would like, using the whole LeadTools toolset...is that basically right?
Thanks!
Martin
#4
Posted
:
Friday, August 15, 2008 11:21:10 AM(UTC)
Groups: Registered, Tech Support, Administrators
Posts: 764
Perhaps I don't understand your goal completely. If this doesn't answer your question, please explain what you're trying to do in more detail.
Yes, those command classes "remap" the pixel values in the sense that the painting process will use the LUT to interpret the pixel values since Windows can only display 256 grayscale colors. These commands don't actually modify the pixels themselves, just how they are to be interpreted when painting.
Another similar method you could use to set the LUT is the RasterImage.WindowLevel method.
Your understanding is correct. Since the MedicalViewerCell.Image property is a RasterImage, you should be able to use any of the SDK's image processing with that image. However, there might be some limitations once you try to use any of the actions of the MedicalViewer since it does some things behind the scenes. For example, you can invert the image with the InvertCommand, but if you use the WindowLevel action with the MedicalViewer control, it will get reset because the viewer is resetting the LUT each time the action is applied.
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.