Hi,<br><br>I am working with a IndexedTriangleMesh and I want to write it in a vtk file in order to visualize it easily. I am using itkMeshTovtkPolydata but SetInput requires a itk::Mesh, I would like to know if it is possible to convert a IndexedTriangleMesh into a itk::mesh in order to be able to use this class.<br>
<br>My code is:<br><br>typedef itk::Vector&lt;double, 2&gt; PixelType;<br>typedef unsigned short IndexType;<br>typedef itk::IndexedTriangleMesh&lt;PixelType, IndexType&gt;      OutputMeshType;<br><br>itkMeshTovtkPolyData *itkTovtkPolyData = new itkMeshTovtkPolyData();<br>
vtkPolyData* polyData = vtkPolyData::New();<br><br>OutputMeshType::Pointer resultMesh ;<br><br>resultMesh = ssmCalculator-&gt;GetResampledOutputMesh( i ) ;<br><br>//Here resultMesh must be itk::Mesh and not itk::IndexedTriangleMesh<br>
itkTovtkPolyData -&gt;SetInput(resultMesh);<br> polyData = itkTovtkPolyData-&gt;GetOutput();<br><br>Thank you in advance<br clear="all"><br>-- <br>Matilde GONZALEZ