[vtkusers] vtkImageViewer2 with RGBA vtkImageBlend

Mathieu Malaterre mathieu.malaterre at gmail.com
Tue Aug 28 10:00:48 EDT 2007


Hi Jason,

  Could you please give a try to my recent patch:

http://public.kitware.com/pipermail/vtk-developers/2007-August/004687.html

HTH
-Mathieu

On 7/12/07, Jason Crane <jasonc at radiology.ucsf.edu> wrote:
>
> 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, any window-level event causes the rendered image to revert completely 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 a better way to accomplish this, or a way to add pan, resize, zoom
> to vtkImageViewer?
>
>
> Thanks in advance for any advice.
>
>
> -Jason
>
>
> _______________________________________________
> 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
>


-- 
Mathieu



More information about the vtkusers mailing list