[vtkusers] vtkImageViewer2
Karthik Krishnan
karthik.krishnan at kitware.com
Fri Mar 4 23:47:53 EST 2011
vtkImageViewer2 is meant to display grayscale images. It uses an instance of
vtkImageMapToWindowLevelColors. This by default does a RGB(A) to RGB(A) with
all components being the same. You can set your own lookup table to this
class to avoid that and have colors displayed your way...
imageviewer2->GetWindowLevel()->SetOutputFormatToRGB();
vtkLookupTable *lut = vtkLookupTable::New();
lut->SetHueRange(...);
lut->SetSaturationRange(...);
lut->SetValueRange(...);
lut->SetAlphaRange(...);
lut->SetNumberOfColors(256);
lut->Build();
imageviweer2->GetWindowLevel()->SetLookupTable(lut);
On Fri, Mar 4, 2011 at 1:56 PM, alby13 <albagarin1986 at hotmail.com> wrote:
> Good morning,
>
> i am trying to visualize a rgb image with vtkImageViewer2 and i cannot get
> a
> correct image, dependieng on how i set the viewer i get a one component
> image (using only one of the 3 rgb components), or incorrect images (i
> check
> the result coz i can view the rgb image with itk-snap).
> anyone could help me?
>
> thanks,
>
>
> --
> View this message in context:
> http://vtk.1045678.n5.nabble.com/vtkImageViewer2-tp3409087p3409087.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110305/e38bb5a2/attachment.htm>
More information about the vtkusers
mailing list