[ITK] [ITK-users] Fwd: How to reuse a filter called from a function

Sebastián Ulloa sebast.ulloa at gmail.com
Sun Mar 20 15:00:55 EDT 2016


Hello,
I'm trying to deform a simplex mesh with the
itkDeformableSimplexMesh3DBalloonForceFilter. All the deformation process
is called in a method of a class.

typedef itk::SimplexMesh<float, 3> TSimplex;
typedef itk::DeformableSimplexMesh3DBalloonForceFilter<TSimplex, TSimplex>
TDeform;

void* Deformation::inflate() {
    TDeform::Pointer balloon = TDeform::New();
    balloon->SetInput(simplex);
    balloon->SetKappa(0.01);
    balloon->Update();
    simplex = balloon->GetOutput();
    simplex->DisconnectPipeline();
}

I got an execution error when I call the function twice, specifically on
the Update() method.
Here is the debug result:

Thread #1 [DeformacionPulm] 6328 [core: 3] (Suspended : Signal :
SIGSEGV:Segmentation fault)
    itk::Point<double, 3u>::operator=() at itkPoint.hxx:35 0x4b6929
    itk::DeformableSimplexMesh3DFilter<itk::SimplexMesh<float, 3u,
itk::DefaultStaticMeshTraits<float, 3u, 3u, float, float, float> >,
itk::SimplexMesh<float, 3u, itk::DefaultStaticMeshTraits<float, 3u, 3u,
float, float, float> > >::Initialize() at
itkDeformableSimplexMesh3DFilter.hxx:200 0x4aaa38
    itk::DeformableSimplexMesh3DFilter<itk::SimplexMesh<float, 3u,
itk::DefaultStaticMeshTraits<float, 3u, 3u, float, float, float> >,
itk::SimplexMesh<float, 3u, itk::DefaultStaticMeshTraits<float, 3u, 3u,
float, float, float> > >::GenerateData() at
itkDeformableSimplexMesh3DFilter.hxx:122 0x4a90d5
    itk::ProcessObject::UpdateOutputData() at 0x509fbd
    itk::DataObject::Update() at 0x514410
    Deformation::inflate() at Deformation.cpp:89 0x49d9f7

Best regards,

Sebastian.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20160320/4f70586e/attachment.html>
-------------- next part --------------
_____________________________________
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.php

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://public.kitware.com/mailman/listinfo/insight-users


More information about the Community mailing list