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

Luis Ibanez luis.ibanez@kitware.com
Mon, 25 Nov 2002 10:50:33 -0500


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
 >