[Insight-users] [Insight-developers] BalloonForceFilter bug
Luis Ibanez
luis.ibanez at kitware.com
Mon Nov 9 09:20:47 EST 2009
Hi Barry,
Sorry,
I missed to mention that you are right in that
the class was written for 2D images.
I was wrong on thinking that the class was
intended for 3D images.
Is there a chance that you could send us the
program that you are writing ?
I assume that is a single .cxx or .cpp file....
(let me know if it is any larger than that).
In that way we can track the source of the
problem.
Thanks
Luis
------------------------------------------------------------
On Sun, Nov 8, 2009 at 9:27 PM, Barry Branham <bhb at branham.ws> wrote:
> Hi Luis,
>
> Yes, that test app was all I could find and that's what I used as my guide.
> However, it was specifically for 2D, so your saying BalloonForce is for 3D
> is puzzling. But I'm into trying the Level Set filters now. I'm going to
> take your advice and post my project on the users list and ask for advice.
>
> Thanks,
> Barry
>
>
> I'm now working on the Epicardial wall which is harder because of the lack
> of good gradients on the outside (non-septal) area. Luis Ibanez wrote:
>>
>> Hi Barry,
>>
>> Thanks for pointing this out.
>>
>> You may find useful to look at the test:
>>
>> Insight/Testing/Code/Algorithms/
>> itk2DDeformableTest.cxx
>>
>> Please let us know if this still doesn't help.
>>
>>
>> Thanks
>>
>>
>> Luis
>>
>>
>>
>> -----------------------------------------------
>> On Sun, Nov 8, 2009 at 3:15 PM, Barry Branham <bhb at branham.ws> wrote:
>>
>>>
>>> Hi Luis,
>>>
>>> Impressive quick reply on a Sunday ;-).
>>>
>>> I think the description of this filter needs modification also. Here's a
>>> quote from the html documentation (and header):
>>> "BalloonForceFilter <cid:part1.03090802.06030608 at branham.ws> is used to
>>> apply balloon force and the potential force onto the 2D deformable model.
>>> For 3D (multi-slices) segmentation please use BalloonForce3DFilter."
>>>
>>> There is no 'BalloonForce3DFilter'...
>>>
>>> Thanks,
>>> Barry
>>>
>>>
>>> Luis Ibanez wrote:
>>>
>>>>
>>>> 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-users
mailing list