[Insight-users] Copy Mesh Points and Cells to QuadEdgeMesh using MeshToMeshFilter
Luis Ibanez
luis.ibanez at kitware.com
Fri Dec 10 07:56:28 EST 2010
Hi Stefan,
the itkMeshToMeshFilter is an abstract class
that only serves as base class for other filters.
See the inheritance diagram in:
http://www.itk.org/Doxygen/html/classitk_1_1MeshToMeshFilter.html
You may want to try
itkQuadEdgeMeshToQuadEdgeMeshFilter.txx
http://www.itk.org/Doxygen/html/classitk_1_1QuadEdgeMeshToQuadEdgeMeshFilter.html
and to use an itkQuadEdgeMesh type for the
reader that gets the input mesh from the .meta
file.
Regards,
Luis
----------------------------------------------------------------
On Thu, Dec 2, 2010 at 9:36 PM, Stefan Dänzer <stefan.daenzer at gmail.com> wrote:
> Hi,
> I'm trying to read an itk::Mesh from a .meta file and copy the points
> and cells of this itk::Mesh to a itk::QuadEdgeMesh. My first approach
> was to use itk::MeshToMeshFilter to achive this. The problem is that
> the output mesh is empty after running the filter. Here is a part of
> my code:
>
> itk::MetaMeshConverter<3,double>* metaConv = new
> itk::MetaMeshConverter<3,double>;
> itk::MetaMeshConverter<3,double>::SpatialObjectPointer meshSO =
> metaConv->ReadMeta(inFilename.c_str());
>
> // get the itk::mesh
> typedef itk::QuadEdgeMesh<double, 3> qeMeshType;
> typedef itk::MeshToMeshFilter<MeshType, qeMeshType> qeFilterType;
>
> qeMeshType::Pointer qeMesh;
> qeFilterType::Pointer qeFilter = qeFilterType::New();
> qeFilter->SetInput(mesh);
> qeFilter->Update();
> qeMesh = qeFilter->GetOutput();
>
> Am I missing something? Thanks for any advice.
>
> Stefan
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.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