<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
i tried this way before, maybe i set the lookup table incorrectly, but it did not work. <div>does the look up table use the 3 components of the rgb image pixels? </div><div>thanks,</div><div>alba<br><div>
<p align="center"><font color="#000000"><img height="2" src="http://graphics.hotmail.com/greypixel.gif" width="100%" vspace="9"></font></p></div><br><br><br><br><hr id="stopSpelling">Date: Sat, 5 Mar 2011 10:17:53 +0530<br>Subject: Re: [vtkusers] vtkImageViewer2<br>From: karthik.krishnan@kitware.com<br>To: albagarin1986@hotmail.com<br>CC: vtkusers@vtk.org<br><br>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...<div>
<br><div><div><br></div><div><span class="ecxApple-style-span" style="font-family:Verdana, Geneva, Helvetica, Arial, sans-serif;font-size:13px;border-collapse:collapse"><span> imageviewer2->GetWindowLevel()->SetOutputFormatToRGB();</span><br>
<span> vtkLookupTable *lut = vtkLookupTable::New();</span><br><span> lut->SetHueRange(...);</span><br><span> lut->SetSaturationRange(...);</span><br><span> lut->SetValueRange(...);</span><br><span> lut->SetAlphaRange(...);</span><br>
<span> lut->SetNumberOfColors(256);</span><br><span> lut->Build();</span><br><span> imageviweer2->GetWindowLevel()->SetLookupTable(lut);</span></span></div><div><br><br><div class="ecxgmail_quote">On Fri, Mar 4, 2011 at 1:56 PM, alby13 <span dir="ltr"><<a target="_blank">albagarin1986@hotmail.com</a>></span> wrote:<br>
<blockquote class="ecxgmail_quote" style="border-left:1px #ccc solid;padding-left:1ex">Good morning,<br>
<br>
i am trying to visualize a rgb image with vtkImageViewer2 and i cannot get a<br>
correct image, dependieng on how i set the viewer i get a one component<br>
image (using only one of the 3 rgb components), or incorrect images (i check<br>
the result coz i can view the rgb image with itk-snap).<br>
anyone could help me?<br>
<br>
thanks,<br>
<br>
<br>
--<br>
View this message in context: <a target="_blank">http://vtk.1045678.n5.nabble.com/vtkImageViewer2-tp3409087p3409087.html</a><br>
Sent from the VTK - Users mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Powered by <a target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</blockquote></div><br></div></div></div></div>                                            </body>
</html>