[Insight-users] vtk polydata import / export

imho imho at skynet . be
Mon, 07 Jul 2003 13:22:02 +0200


This is a multi-part message in MIME format.
--------------010108090505060104070405
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

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

--------------010108090505060104070405
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
  <title></title>
</head>
<body>
Hi all,<br>
is it possible to import and export a vtkPolyData or can I use images
only?<br>
How can I do?<br>
I have two vtkPolyData volumes, and I'd like to use itk filters like
this : <br>
<br>
vtk reader -&gt; vtk filters -&gt; itk filters -&gt; vtk viewer<br>
I've tried this : <br>
<br>
<p class="MsoNormal"><span lang="NL" style="">VTK <span style="">&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; </span></span><span
 style="font-family: Wingdings;"><span style="">-&gt;</span></span><span
 lang="NL" style=""> <span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>ITK <span
 style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp; </span></span><span
 style="font-family: Wingdings;"><span style="">-&gt;</span></span><span
 lang="NL" style=""> <span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>VTK<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="DE" style="">ITKImageExporter4<span
 style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; VTKImage</span>Importer4<span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
ITKImage</span>Importer4<span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>== first POLY<o:p></o:p></span></p>
<span lang="DE" style="font-size: 12pt; font-family: &quot;Times New Roman&quot;;">ITKImageExporter5<span
 style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>VTKImageImporter5 <span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span
 style="">&nbsp;</span><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; </span>==
second POLY (no output)</span><br>
<br>
but I don't know how to convert my vtkPolyData or how to typedef the
VTKimporter to make it work : <br>
&nbsp;&nbsp;&nbsp; typedef unsigned short PixelType;<br>
&nbsp;&nbsp;&nbsp; typedef <a class="moz-txt-link-freetext" href="itk::Image">itk::Image</a>&lt;PixelType, Dimension&gt; ImageType;<br>
&nbsp;&nbsp;&nbsp; typedef <a class="moz-txt-link-freetext" href="itk::VTKImageImport">itk::VTKImageImport</a>&lt;ImageType&gt; ImageImportType;<br>
is ok but not with a polyData, and<br>
<br>
&nbsp;&nbsp;&nbsp; typedef <a class="moz-txt-link-freetext" href="itk::VTKImageImport">itk::VTKImageImport</a>&lt;vtkPolyData*&gt; ImageImportType;<br>
&nbsp;isn't ok<br>
<br>
Thanks a lot<br>
<br>
imho<br>
</body>
</html>

--------------010108090505060104070405--