[Insight-users] Re: Re Changes to Fltk Image Viewer for better overlay/color support

Martin Styner martin_styner@ieee.org
Mon, 25 Nov 2002 17:17:07 +0100


Hi Luis
Thanks for making the changes, everything worked nicely, no problems at 
all (did not even need to recompile the itk libs, since all code is 
templated).

I currently use it for several things:
  a) display of multiple hard segmented classes over the original image 
(I only need to have a nice slider for adjusting the opacity of the 
overlay, but I might do that some other time...)
  b) display of confidence values over the original image with heat-like 
color table
  c) display of an edge map (with strength relative color) over the 
original image
  d) I also plan to use it as ColorImageViewer displaying 3D RGB images 
(with an empty image, the InputImage cannot be left unassigned, it needs 
to be an empty image of the same dimension as the RGN image). I remember 
that not long ago there was a question of Zein on the forum in regard to 
the display of 3D RGB images with a reply that this is not possible with 
fltkImageViewer. This should be possible using the overlay  (if I am 
correct, I have not tested it yet).

Regards
Martin

Luis Ibanez wrote:
> 
> Hi Martin,
> 
> 
> Thanks for the improvements on the fltkImageViewer.
> 
> The changes you suggested have been made in the repository.
> 
> If you have a chance,
> could you please give them a try and verify
> if they work as expected ?
> 
> 
> BTW This is quite useful for superimposing
> segmentations ontop of original images.
> 
> 
>   Thanks
> 
>     Luis
> 
> 
> ========================================
> 
> Matin Styner wrote:
>  > Hi
> 
>  > I adjusted the fltkImageViewer Auxiliary code for better support of
>  > overlays (unsigned short overlays, more than 255 different colors) and
>  > color tables. Also, fltkImageViewer does not crash when it has an
>  > overlay with a value outside of the colortable. I think these changes
>  > are worth taking into the itk source. E.g. with the changes, I can
>  > display an overlay with my own colormap using fltkImageViewer:
> 
>  > typedef fltk::ImageViewer< ImagePixelType, OverlayPixelType > > 
> ImageViewerType;
> typedef MyOwnColorTable<float> ColorTableType;
> 
> ImageViewerType imageViewer;
> imageViewer.SetLabel(" Image");
> imageViewer.SetImage( image );
> imageViewer.SetOverlay( outputImage );
> imageViewer.SetOverlayOpacity(0.8);
> ColorTableType::Pointer colorTable = ColorTableType::New();
> colorTable->useMSColorTable(1900);
> imageViewer.SetOverlayColorTable( (ImageViewerType::ColorTablePointer)
> colorTable);
> imageViewer.Show();
> Fl::run();
> 
>  >
>  > Below are the diffs of the file changes,
>  > Best regards
>  > Martin
>  >
> 

-- 
Martin Styner, PhD. Ing. ETH
Group Head Medical Image Analysis for Orthopaedics
M.E. Mueller Institute for Biomechanics
Center for Computed Assisted Surgery
University of Bern
Murtenstrasse 35
P.O.Box 30
CH - 3010 Bern
Switzerland
Tel office: ++41-31-632-0940 , FAX: ++41-31-632-4951
email: Martin.Styner@memot.unibe.ch, martin_styner@ieee.org
WWW: http://cranium.unibe.ch/~mstyner