AW: [Insight-users] Color Viewer Question

Luis Ibanez luis.ibanez@kitware.com
Thu, 23 Jan 2003 14:04:01 -0500


Hi Zein,

Yeap, the transparency in overlays is
relatively new. It was added by Martin Styner.

About your questions

1) No, there provision for only one overlay.
    However, the overlay doesn't have to be
    a binary image. You could use an image with
    multiple values. Since there is a color map
    associated with the overlay, you can then
    specify that, for example :

       value 1 = red
       value 2 = blue
       value 3 = pink... and so on

    The ideal use of the class is to have a
    labeled image that results from a segmentation
    method. You could arrange for having a label
    number associated with each anatomical structure.
    The GLViewer will then use the color map (that you
    have to provide) and display each region in the
    appropriate color.

    Mixing this with transparency is  a good way
    to present segmentation results.  It is not the
    best visualization int the world... but it is
    pretty good considering that we shouldn't be
    doing visualization at all in ITK     :-)


2) Well, you can put transparency to 1.0...
    that will get rid of the overlay.
    Setting transparency to 0.0 will put it back.

    If you see the menu of the viewer, the second
    option in the menu bar says "overlay". If you
    click on it, a slider will appear, you can
    interactively control the overlay with this
    slider.

3)  Adding many overlay should be possible, and
     will be a fun task for a rainy afternoon.
     However I would suggest to try first using
     a single mask with multiple values. Just from
     the memory usage point of view it makes more
     economical sense to have a "char" image with
     10 labels than having 10 "char" images with
     0's and 1's.


Please let us now if you encounter any difficulty,


   Thanks


      Luis



-----------------------------------------

salah wrote:
> Thanks Luis,
> 
> I have sometime used the Overlay. It was a new thing to know that overlays can be transparent.
> 
> Two questions remain in this regard:
> 1. Can there be more than one overlay?
> 2. Can the overlay mask be switched on/off during the work of the viewer??
> 
> In case not, I will try to modify the GLSliceView class to accept more overlays (mainly, two). I realy do not know how hard this would be!
> 
> Many thanks,
> 
> Zein
>