[vtkusers] vtkImageViewer2
alba garin
albagarin1986 at hotmail.com
Mon Mar 7 03:34:55 EST 2011
i tried this way before, maybe i set the lookup table incorrectly, but it did not work. does the look up table use the 3 components of the rgb image pixels? thanks,alba
Date: Sat, 5 Mar 2011 10:17:53 +0530
Subject: Re: [vtkusers] vtkImageViewer2
From: karthik.krishnan at kitware.com
To: albagarin1986 at hotmail.com
CC: vtkusers at vtk.org
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/20110307/6fdde158/attachment.htm>
More information about the vtkusers
mailing list