[Insight-users] vtk polydata import / export

Luis Ibanez luis . ibanez at kitware . com
Mon, 07 Jul 2003 10:26:07 -0400


Hi Imho,

The import/export connections currently available
between ITK and VTK only manage image-to-image
conversions.

You may want to convert your vtkPolyData to a vtkImageData
and then use the itkVTKImageToImageFilter available in

    InsightApplications/Auxiliary/vtk

In any case, a vtkPolyData may not be the best support
for representing an image...


Please let us know if you have futher questions,


Thanks


    Luis



------------------
imho wrote:
> Hi all,
> is it possible to import and export a vtkPolyData or can I use images only?
> How can I do?
> I have two vtkPolyData volumes, and I'd like to use itk filters like this :
> 
> vtk reader -> vtk filters -> itk filters -> vtk viewer
> I've tried this :
> 
> VTK                            ->              ITK                    ->              VTK
> 
> ITKImageExporter4            VTKImageImporter4            
> ITKImageImporter4        == first POLY
> 
> ITKImageExporter5            VTKImageImporter5 
>                                                  == second POLY (no output)
> 
> but I don't know how to convert my vtkPolyData or how to typedef the 
> VTKimporter to make it work :
>     typedef unsigned short PixelType;
>     typedef itk::Image<PixelType, Dimension> ImageType;
>     typedef itk::VTKImageImport<ImageType> ImageImportType;
> is ok but not with a polyData, and
> 
>     typedef itk::VTKImageImport<vtkPolyData*> ImageImportType;
>  isn't ok
> 
> Thanks a lot
> 
> imho