[Insight-users] itkImageToVTKImageFilter

Garin, Alba agarin at ceit.es
Tue Sep 13 06:48:04 EDT 2011


Good morning,

i am trying to visualize glyphs with vtk and itk that represent the main diffusion direction of my dicom images. I read the dicoms and i get an oriented image with Vectors of unsigned short as pixel type. I can visualize properly this information in color maps representing the orientation of each voxel with RGB. 
The problem starts when i want to represent the directionality with lines, glyphs or others. I figured out why i have this problem and i know i need a vector per voxel in the vtkImageData that i use as input in the (for example) vtkStreamLine class. The thing is that i convert itk::OrientedImage to vtkImageData with the itkImageToVTKImageFilter, and i get an vtkImageData as output with scalars in each voxel, 3 scalars per voxel (an array) instead of a vector of 3 component in each voxel. 
My question is: is there any way to set the filter to convert into an image of vector instead of image of arrays? Can i convert my vtkImageData of arrays to an vtkImageData of vectors?

Thanks in advance,
Alba


More information about the Insight-users mailing list