[vtkusers] problems converting itk data to vtk data

Manuela Kunz kunz at cs.queensu.ca
Thu Apr 14 14:44:29 EDT 2005


Hi,
Try to update your imported data before using:
connector->GetOutput()->Update();
vtkImageData* pImgData = connector->GetOutput();
Ella.

Abhishek wrote:

> 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**
>
>------------------------------------------------------------------------
>
>_______________________________________________
>This is the private VTK discussion list. 
>Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>Follow this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers
>  
>




More information about the vtkusers mailing list