[vtkusers] vtkImageViewer2 with vtkImageBlend

Jason Crane jasonc at radiology.ucsf.edu
Wed Jul 11 17:51:56 EDT 2007


Hi,

I'm interested in generating a color overlay of one image on top of a 
2nd gray scale reference image in a viewer with zoom, pan, resize 
functionality.  I've been using vtkImageBlend to combine a color and 
gray scale image (both RGBA) into a single vtkImageData object (RGBA).  
This renders fine when used as the input to  vtkImageViewer.  However in 
vtkImageViewer2 although the initial rendering looks fine, a 
window-level event causes the rendered image to change to gray scale in 
the viewer.  I am able to set a LUT via the vtkImageViewer2's 
vtkImageMapToWindowLevelColors:

vtkImageViewer2* viewer = vtkImageViewer2::New();
viewer->GetWindowLevel()->SetLookupTable(lut)

but this only seems to work if my input vtkImageData is a single 
compoent scalar.

Is there are better way accomplish this?

Thanks in advance for any advice.

-Jason




More information about the vtkusers mailing list