[Insight-developers] BalloonForceFilter bug
Luis Ibanez
luis.ibanez at kitware.com
Sun Nov 8 12:50:42 EST 2009
Hi Barry,
I'm afraid that this filter was actually designed to work specifically
with 3D images.
If you need to segment 2D images, I would suggest that you use
the LevelSet filters, which in practice provide a behavior equivalent
to inflating balloons when you focus on their propagation weight
terms.
If you provide a more detailed description of the problem that you
are trying to solve, we will be happy to suggest additional methods.
Regarding the Balloon filter itself,
Please feel free to add a bug report to:
http://public.kitware.com/Bug/my_view_page.php
We should at least, add a concept check to enforce its
use only with 3D image.
Regards,
Luis
-----------------------------------------------------------------------------
On Sun, Nov 8, 2009 at 10:48 AM, Barry Branham <bhb at branham.ws> wrote:
> 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
>
>
> _______________________________________________
> 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://kitware.com/products/protraining.html
>
> 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://www.itk.org/mailman/listinfo/insight-developers
>
More information about the Insight-developers
mailing list