[Insight-users] Problem with DeformableSimplexMesh3DFilter
Gunn Marie Navestad
gunnmari at stud.ntnu.no
Thu Apr 21 04:10:41 EDT 2005
I have a problem when I try to use the DeformableSimplexMesh3DFilter. When
I try to run my code, everything halts when I update the filter. Can
somebody please tell me what is wrong? I have tested both the Mesh and the
gradient image that the filter uses, both look ok.
Here is my code:
(binaryMeshSource returns a Mesh of type SimplexMeshType, and
gradientMapFilter an Image of type gradientImageType)
typedef itk::SimplexMesh<double, 3> SimplexMeshType;
typedef itk::CovariantVector<double, 3> gradientPixelType;
typedef itk::Image<gradientPixelType, 3> gradientImageType;
itk::DeformableSimplexMesh3DFilter<SimplexMeshType,
SimplexMeshType>::Pointer deformableModelFilter;
deformableModelFilter =
itk::DeformableSimplexMesh3DFilter<SimplexMeshType,
SimplexMeshType>::New();
deformableModelFilter->SetGradient(gradientMapFilter->GetOutput());
deformableModelFilter->SetInput(binaryMeshSource->GetOutput());
deformableModelFilter->SetAlpha(0.1);
deformableModelFilter->SetBeta(0.3);
deformableModelFilter->SetGamma(0.03);
deformableModelFilter->SetDamping(0.4);
deformableModelFilter->SetRigidity(0.03);
deformableModelFilter->SetRange(3);
deformableModelFilter->SetLocality(3.0);
deformableModelFilter->SetMaxMagnitude(1.0);
deformableModelFilter->SetIterations(500);
deformableModelFilter->Update();
Thanks,
Gunn Marie
More information about the Insight-users
mailing list