[vtkusers] recommendation for displaying a 2D RGB image?

Amy Squillacote ahs at cfdrc.com
Mon Feb 4 10:56:53 EST 2008

Hi Kent,

The scalars in a vtkImageData can have multiple components, so you can 
have 3-component scalars that specify RGB values. See the 
SetNumberOfScalarComponents method in vtkImageData.

- Amy

kent williams wrote:
> This may be a stupid question, but ... I am working on converting a
> legacy program from using FLTK for the GUI to KWWidgets.   With FLTK
> his program draws an RGB image, and then displays it by calling the
> FLTK function fl_draw_image.
> I looked at the vtkImageViewer and vtkImageViewer2 classes but they
> both take vtkImageData, and I'm not seeing how vtkImageData could
> handle color images -- it seems to accommodate only scalars.
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers

Amy Squillacote                    Phone: (256) 726-4839
Computer Scientist                 Fax: (256) 726-4806
CDF Research Corporation           Web: http://www.cfdrc.com
215 Wynn Drive, Suite 501
Huntsville, AL  35805

More information about the vtkusers mailing list