<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
<br><div style="font-family: Tahoma; font-size: 10pt; ">hi everyone,</div><div style="font-family: Tahoma; font-size: 10pt; "><br></div><div style="font-family: Tahoma; font-size: 10pt; ">i research more and i guess that i need to use the vtkImageQuantizeRGBToIndex filter in order to convert my RBG pixels to an index that after connecting the look up table of the filterand the output of the filter with the viewer (vtkImageViewer2), it would work. this way i get color, but not an correct image. </div><div style="font-family: Tahoma; font-size: 10pt; ">this is my code:</div><div><div style="font-family: Tahoma; font-size: 10pt; ">vtkImageQuantizeRGBToIndex * imgRGB = vtkImageQuantizeRGBToIndex::New(); </div><div style="font-family: Tahoma; font-size: 10pt; "> imgRGB->SetInput(_imageData); </div><div style="font-family: Tahoma; font-size: 10pt; "> imgRGB->SetNumberOfColors(16);</div><div style="font-family: Tahoma; font-size: 10pt; "> imgRGB->Update();</div><div style="font-family: Tahoma; font-size: 10pt; "> this->viewer->GetWindowLevel()->SetLookupTable(imgRGB->GetLookupTable());</div><div style="font-family: Tahoma; font-size: 10pt; "> this->viewer->GetWindowLevel()->SetLevel(-256);</div><div style="font-family: Tahoma; font-size: 10pt; "> this->viewer->SetInput(imgRGB->GetOutput()); </div><div><font class="Apple-style-span" face="Tahoma" size="2"> this->viewer->SetSlice( 0 );</font></div><div><font class="Apple-style-span" face="Tahoma" size="2">this->viewer->render();<br></font></div><div><font class="Apple-style-span" face="Tahoma" size="2">thanks,</font></div><div><font class="Apple-style-span" face="Tahoma" size="2">Alba</font></div>
<p align="center" style="font-family: Tahoma; font-size: 10pt; "><font color="#000000"><img height="2" src="http://graphics.hotmail.com/greypixel.gif" width="100%" vspace="9"></font></p></div><br><br><br><br><div id="SkyDrivePlaceholder" style="font-family: Tahoma; font-size: 10pt; "></div><hr id="stopSpelling" style="font-family: Tahoma; font-size: 10pt; "><font class="Apple-style-span" face="Tahoma" size="2">From: albagarin1986@hotmail.com</font><br><font class="Apple-style-span" face="Tahoma" size="2">To: insight-users@itk.org</font><br><font class="Apple-style-span" face="Tahoma" size="2">Date: Wed, 23 Feb 2011 08:30:14 +0000</font><br><font class="Apple-style-span" face="Tahoma" size="2">Subject: [Insight-users] itkImagetovtkimagefilter</font><br><br>
<meta http-equiv="Content-Type" content="text/html; charset=unicode">
<meta name="Generator" content="Microsoft SafeHTML">
<style>
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Tahoma;}
</style>
<style>
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Tahoma;}
</style><font class="Apple-style-span" face="Tahoma" size="2">
Hi everyone,</font><div style="font-family: Tahoma; font-size: 10pt; "><br></div><div style="font-family: Tahoma; font-size: 10pt; ">im working in a code of a partner in which he visualizes itk images with pixels with one component only (itk::OrientedImage<short,3>). I want to visualize a rgb image on it, (itk::Image<RGBPixel<char>,3>). I executed it and it visualize only a component of the rgbpixel, i guess, because i obtain a image in grayscale. i am trying to find out where the program restricts to visualize like this, and not in rgb, and i cannot find out. After using the filter the program sets all the vtk and qt components needed to visualize and does not do any change in the image, as far as i concerned.</div><div style="font-family: Tahoma; font-size: 10pt; ">could anyone help me?</div><div style="font-family: Tahoma; font-size: 10pt; ">thanks,</div><div style="font-family: Tahoma; font-size: 10pt; "><br></div><div style="font-family: Tahoma; font-size: 10pt; ">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></div>
                                          
<br><font class="Apple-style-span" face="Tahoma" size="2">_____________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.html
Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-users</font>                                            </body>
</html>