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<double, 2> PixelType;<br>typedef unsigned short IndexType;<br>typedef itk::IndexedTriangleMesh<PixelType, IndexType> OutputMeshType;<br><br>itkMeshTovtkPolyData *itkTovtkPolyData = new itkMeshTovtkPolyData();<br>
vtkPolyData* polyData = vtkPolyData::New();<br><br>OutputMeshType::Pointer resultMesh ;<br><br>resultMesh = ssmCalculator->GetResampledOutputMesh( i ) ;<br><br>//Here resultMesh must be itk::Mesh and not itk::IndexedTriangleMesh<br>
itkTovtkPolyData ->SetInput(resultMesh);<br> polyData = itkTovtkPolyData->GetOutput();<br><br>Thank you in advance<br clear="all"><br>-- <br>Matilde GONZALEZ