[Insight-users] How to Convert ITK RGB Image to VTK Image

Luis Ibanez luis.ibanez at kitware.com
Sat Jul 10 19:33:13 EDT 2004


Hi Peng, John,

Thanks for pointing this out.

This was actually a bug in the way the itkVTKImageExport
encoded the scalar type of the image.

In order to support Vector images, it should use the
pixel traits of the PixelType and look for ValueType.

This has been fixed today.

Please update your CVS checkout in order to get the fix.


Also an example was added to

     InsightApplications/Auxiliary/vtk

named

       itkReadITKImageShowVTK.cxx


This example illustrates how to read a color image using
ITK and then display it using VTK.


Please let us know if you find any further problem.



  Thanks,



    Luis


----------------------------
Patrick (Peng) Cheng wrote:
> Hi,
> I use the itkImageToVTKImageFilter, but there is an error when I new a instance of this filter. What's going wrong?
> 	typedef itk::RGBPixel< float >		RGBPixelType;
> 	typedef itk::Image<RGBPixelType,3>	RGBImageType;
> 	typedef itk::ImageToVTKImageFilter< RGBImageType >		RGB2VTK;
> 	RGBImageType::Pointer				m_RGBImage = RGBImageType::New();    <-----
> ---------------------------
> Peng (Patrick) Cheng
> Biomedical Engineering
> University of Iowa
> Tel:(319) 400-7442
> Email: peng-cheng at uiowa.edu
> 
> 
> 
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
> 





More information about the Insight-users mailing list