[Insight-users] Crash in ShapeDetectionLevelSetImageFilter

Nils Hanssen hanssen at caesar . de
Thu, 10 Jul 2003 09:16:22 +0200


Hi Luis,

thank you for the detailed answer.


My initial level set conforms to the "negative inside" convention.
Now, I am using a curvature weighting of 1000 (just to see what happens in
the extreme case) and a propagation weighting of 0.001. When running the
ShapeDetectionLSIF, the contour is not collapsing at all. Maybe that's
because of the feature image that dictates the curvature speed (==
propagation speed in the ShapeDetectionLSIF)?

Since the curvature speed in the ShapeDetectionLSF equals the propagation
speed, I derived my own classes called "TubularLevelSetFunction" and
"TubularLevelSetImageFilter". These are basically clones of the
ShapeDetection* classes, but with the difference that I set the curvature
speed to (constant) one in the Level-set function.
Now, the contour is collapsing according to the mean curvature but all this
happens _very_ slowly (the curvature weighting is 1000!).

In itk::LevelSetFunction::ComputeUpdate(...) I see the following:
---
  curvature_term = curve;
  curvature_term *= m_CurvatureWeight * this->CurvatureSpeed(it, offset);
---
so it should make no difference when I set the curvature weight to 1 and the
curvature speed to (constant) 1000 (and not vice versa), right? But when I
do this, I get numerical instabilities during the evolution. What is wrong
with my assumption?

Luis, what was the curvature weighting and curvature speed when you tested
the collapsing contour with the syntethic sphere image? Was the curvature
speed constant or dependent on the image?

For now, I do all calculations in 2D. Could that be a problem? I have
installed a observer that shows me the progress of the contour after each
update event.


Regards,
Nils


> -----Original Message-----
> From: Luis Ibanez [mailto:luis . ibanez at kitware . com]
> Sent: Wednesday, July 09, 2003 6:14 PM
> To: Nils Hanssen
> Cc: Insight-users at public . kitware . com
> Subject: Re: [Insight-users] Crash in
> ShapeDetectionLevelSetImageFilter
>
>
>
> Hi Nils,
>
> You are right in your interpretation of the
> behavior for the ShapeDetectionLevelSetFilter.
>
> Increasing the curvature scaling while decreasing
> the propagation scaling should make the contour
> collapse (contract).
>
> I just verified this behavior using a syntethic
> image of a sphere.
>
> Note that in version 1.2 this filter is expecting
> the input level set to conform to the convention
> of "negative inside" which means that the level
> set has negative values 'inside' the contour and
> positive values outside the contour.
>
> You may have to push the curvature scaling to
> a value higher than 1.0. (e.g. 5.0 or so).
>
> I would avoid to use 0.0 for the propagation
> scaling ( in part just for superstition  against
> zeros values as parameters). You may want to
> try something like 0.1 for the propagation
> scaling.
>
> Please verify the convention used by your initial
> level set. That may be the cause for the contour
> not behaving as expected.
>
>
> Regards,
>
>
>     Luis
>
>
>
> ---------------------
> Nils Hanssen wrote:
> > Hi Luis,
> >
> > I am using the 1.2.0 web release.
> >
> > Regards,
> > Nils
> >
> >
> >>-----Original Message-----
> >>From: insight-users-admin at itk . org
> >>[mailto:insight-users-admin at itk . org]On
> >>Behalf Of Luis Ibanez
> >>Sent: Tuesday, July 08, 2003 3:55 PM
> >>To: Nils Hanssen
> >>Cc: Insight-users at public . kitware . com
> >>Subject: Re: [Insight-users] Crash in
> >>ShapeDetectionLevelSetImageFilter
> >>
> >>
> >>
> >>Hi Nils,
> >>
> >>Are you using a very recent checkout of ITK  ?
> >>
> >>The level set filters have been reworked in
> >>recent days, so it will help us to know if you
> >>are experiencing this behavior with the current
> >>version or with the version as it was two weeks
> >>ago (or before that).
> >>
> >>Please let us know,
> >>
> >>    Thanks
> >>
> >>
> >>      Luis
> >>
> >>
> >>------------------------
> >>Nils Hanssen wrote:
> >>
> >>>Hi,
> >>>
> >>>I am trying to understand the behaviour of the ShapeDetectionLSIF.
> >>>Therefore, I set the propagation-weighting to zero. By setting the
> >>>curvature-weighting to a value of one I would expect that
> >>
> >>the inital
> >>
> >>>surface is shrinking to a point (I set the MaxRMSError to
> >>
> >>zero) and the
> >>
> >>>number of iterations very high.
> >>>
> >>>The filter is crashing in
> >>>SegmentationLevelSetFunction<TImageType, TFeatureImageType>
> >>>::PropagationSpeed(const NeighborhoodType &neighborhood, const
> >>>FloatOffsetType &offset) const
> >>>[...]
> >>>-->  else return (
> >>
> >>static_cast<ScalarValueType>(m_SpeedImage->GetPixel(idx)) );
> >>// crashing here
> >>
> >>>[...]
> >>>
> >>>When I set the propagation-weighting to - for instance -
> 0.0001 the
> >>>filter is not crashing, but the contour is not shrinking
> >>
> >>according to
> >>
> >>>the mean curvature.
> >>>
> >>>Is that the correct behaviour of the filter?
> >>>
> >>>I would appreciate any suggestions. Thanks!
> >>>
> >>>
> >>>Regards,
> >>>Nils
> >>>
> >>>
> >>>-------------------------
> >>>Nils Hanssen
> >>>Surgical Systems Laboratory
> >>>research center c ae sa r
> >>>Ludwig-Erhard-Allee 2
> >>>53175 Bonn
> >>>fon: +49-228-9656-197
> >>>fax: +49-228-9656-117
> >>>___http://www . caesar . de/ssl_
> >>>
> >>>
> >>>
> >>
> >>
> >>
> >>_______________________________________________
> >>Insight-users mailing list
> >>Insight-users at itk . org
> >>http://www . itk . org/mailman/listinfo/insight-users
> >>
> >
> > _______________________________________________
> > Insight-users mailing list
> > Insight-users at itk . org
> > http://www . itk . org/mailman/listinfo/insight-users
> >
>
>
>
>