[Insight-developers] BalloonForceFilter bug

Barry Branham bhb at branham.ws
Sun Nov 8 10:48:48 EST 2009


Hello,

I experimented (briefly) with using the BalloonForceFilter.  There
appears to be a bug when used with 2D images (which apparently is what
it's designed for).  Here's the compile errors I get:
---------------
/usr/local/include/InsightToolkit/Algorithms/itkBalloonForceFilter.txx:
In member function 'void itk::BalloonForceFilter<TInputMesh,
TOutputMesh>::Initialize() [with TInputMesh = itk::Mesh<double, 2u,
itk::DefaultStaticMeshTraits<double, 2u, 2u, float, float, double> >,
TOutputMesh = itk::Mesh<double, 2u, itk::DefaultStaticMeshTraits<double,
2u, 2u, float, float, double> >]':

/usr/local/include/InsightToolkit/Algorithms/itkBalloonForceFilter.txx:988: 

instantiated from 'void itk::BalloonForceFilter<TInputMesh,
TOutputMesh>::GenerateData() [with TInputMesh = itk::Mesh<double, 2u,
itk::DefaultStaticMeshTraits<double, 2u, 2u, float, float, double> >,
TOutputMesh = itk::Mesh<double, 2u, itk::DefaultStaticMeshTraits<double,
2u, 2u, float, float, double> >]'

DefSeg2d.cxx:1318:   instantiated from here

/usr/local/include/InsightToolkit/Algorithms/itkBalloonForceFilter.txx:225:
error: no match for 'operator=' in 'tmp =
locations.itk::VectorContainer<TElementIdentifier,
TElement>::Iterator::Value [with TElementIdentifier = long unsigned int,
TElement = itk::Point<float, 2u>]()'
----------------------

I fixed it with these changes at line 217:
//  float d[3] = {0,0,0};
//  itk::Point<float, 3> tmp;
  float d[2] = {0,0};
  itk::Point<float, 2> tmp;

However, I got a SIGSEGV when running it and gave up further efforts to
debug it but at least it compiled.  Looks like this filter is not well
developed.  Any comments?

Thanks,
Barry Branham
Cardiothoracic Surgery Research
Washington University School of Medicine




More information about the Insight-developers mailing list