ITK过滤器创建和更新

时间:2016-03-17 19:23:48

标签: c++ itk

我为单面网格和变形滤镜定义了以下值:

typedef itk::SimplexMesh<float, 3> TSimplex;
typedef itk::DeformableSimplexMesh3DBalloonForceFilter<TSimplex,TSimplex> TDeform;
TSimplex::Pointer simplex = TSimplex::New();

我不明白为什么第一个代码工作而第二个代码没有。

TDeform::Pointer balloon = TDeformar::New();
balloon->SetInput(simplex);
balloon->SetKappa(0.01);
balloon->Update();
simplex = balloon->GetOutput();
simplex->DisconnectPipeline();

TDeform::Pointer balloon2 = TDeformar::New();
balloon2->SetInput(simplex);
balloon2->SetKappa(0.01);
balloon2->Update();
simplex = balloon2->GetOutput();
simplex->DisconnectPipeline();

这是另一个:

TDeform::Pointer balloon = TDeformar::New();
balloon->SetInput(simplex);
balloon->SetKappa(0.01);
balloon->Update();
simplex = balloon->GetOutput();
simplex->DisconnectPipeline();

balloon->SetInput(simplex);
balloon->SetKappa(0.01);
balloon->Update(); //Here I get an execution error on itkPoint segment violation
simplex = balloon->GetOutput();
simplex->DisconnectPipeline();

0 个答案:

没有答案