[vtkusers] problems converting itk data to vtk data

Abhishek gattani at aktina.com
Thu Apr 14 14:12:37 EDT 2005


Hello All,

 

I am using ImageToVTKImageFilter for converting ITK data got from
ImageSeriesReader. However, I am loosing all the settings for the spacing,
dimensions, origin, etc in vtkImageData (even the scalar type). Why is that?
I understand ImageToVTKImageFilter uses VTKImageExport. Can someone please
tell me what I could be doing wrong? Thanks a million.

 

typedef itk::Image <unsigned short,3> InputImageType;

typedef itk::ImageToVTKImageFilter<InputImageType> ConnectorType;

ConnectorType::Pointer connector= ConnectorType::New();

connector->SetInput(m_pReader->GetOutput());

vtkImageData* pImgData = connector->GetOutput();

 

-Cheers, Abhishek

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20050414/a11a7b07/attachment.htm>


More information about the vtkusers mailing list