[Insight-users] itkImagetovtkimagefilter

alba garin albagarin1986 at hotmail.com
Thu Feb 24 05:06:49 EST 2011



hi everyone,
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. this is my code:vtkImageQuantizeRGBToIndex * imgRGB = vtkImageQuantizeRGBToIndex::New();    imgRGB->SetInput(_imageData);    imgRGB->SetNumberOfColors(16);   imgRGB->Update();   this->viewer->GetWindowLevel()->SetLookupTable(imgRGB->GetLookupTable());   this->viewer->GetWindowLevel()->SetLevel(-256);   this->viewer->SetInput(imgRGB->GetOutput());   this->viewer->SetSlice( 0 );this->viewer->render();
thanks,Alba




From: albagarin1986 at hotmail.com
To: insight-users at itk.org
Date: Wed, 23 Feb 2011 08:30:14 +0000
Subject: [Insight-users] itkImagetovtkimagefilter












Hi everyone,
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.could anyone help me?thanks,
Alba




 		 	   		  

_____________________________________
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 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110224/a9cb7381/attachment.htm>


More information about the Insight-users mailing list