[Insight-users] Copy Mesh Points and Cells to QuadEdgeMesh using MeshToMeshFilter

Stefan Dänzer stefan.daenzer at gmail.com
Thu Dec 2 21:36:47 EST 2010


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


More information about the Insight-users mailing list