[Insight-users] Passing a vector image from itk to vtk
Karthik Krishnan
Karthik.Krishnan at kitware.com
Tue Jun 21 13:48:52 EDT 2005
Probably the documentation is old.
Yes you can do this.
You can instantiate an image of type itk::RGBPixel and pass it through
to VTK with VTKImageExport.
Joel Schaerer wrote:
> Hi all,
>
> I need to pass vector images (that is, 3 components) from itk back to
> vtk for visualisation. The problem is that this operation is
> apparently unsupported by itk at the moment:
>
> From the itk documentation: "Currently VTKImageExport does not support
> pixel types with multiple components (like RGBPixel)."
>
> I suppose the reason it wasn't done is that it would require to
> actually scan and convert the image in memory, and implementing it
> seems pretty complex.
>
As you've mentioned the constraint of scanning and converting the image
in memory still holds, so the image has got to be a multi-component
image with all the pixel values contiguously placed as in
ImagePixel0Component_0 ImagePixel0Component_1 ImagePixel0Component_2 ...
ImagePixel0Component_n ImagePixel1Component_0 .........n
> Two questions:
>
> 1) Does anybody have code to do this?
>
InsighthtApplications/Auxiliary/vtk/itkReadITKImageShowVTK.cxx
> 2) What would be the best/easiest way to do it?
>
> thanks!
> _______________________________________________
> 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