[Insight-users] Writing mesh to Metafile
Luis Ibanez
luis.ibanez at kitware.com
Tue May 19 21:10:00 EDT 2009
Hi Matilde,
Where did you find the class: IndexedTriangleMesh ?
I don't find this class in the ITK source tree.
Please let us know,
Thanks,
Luis
--------------------------------
Matilde Gonzalez Preciado wrote:
> Hi,
>
> 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.
>
> My code is:
>
> typedef itk::Vector<double, 2> PixelType;
> typedef unsigned short IndexType;
> typedef itk::IndexedTriangleMesh<PixelType, IndexType> OutputMeshType;
>
> itkMeshTovtkPolyData *itkTovtkPolyData = new itkMeshTovtkPolyData();
> vtkPolyData* polyData = vtkPolyData::New();
>
> OutputMeshType::Pointer resultMesh ;
>
> resultMesh = ssmCalculator->GetResampledOutputMesh( i ) ;
>
> //Here resultMesh must be itk::Mesh and not itk::IndexedTriangleMesh
> itkTovtkPolyData ->SetInput(resultMesh);
> polyData = itkTovtkPolyData->GetOutput();
>
> Thank you in advance
>
> --
> Matilde GONZALEZ
>
>
> ------------------------------------------------------------------------
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
More information about the Insight-users
mailing list