[Insight-users] Re: Level Set methods

Luis Ibanez luis . ibanez at kitware . com
Thu, 19 Jun 2003 09:55:42 -0400


Hi Hideaki,

Thanks for your detailed comments,

1) I agree with you about equation 8.3.

    It has been fixed now.
    The negative signs were added to
    the advection and propagation terms.


2) You are right also about the two filters

    ShapeDetection
    GeodesicActiveContours

    The are following the convention of
    negative inside, as opposed to the
    other level set filters. This also
    changes the way in which equation
    8.3 may be interpreted. We could
    remove the line
    this->SetUseNegativeFeatures( true );
    from the constructors, and rather
    make the point in the documentation...

3) The ReinitializeLevelSetImageFilter
    is not embedded in the LevelSet framework.
    It is rather a helper class.

    As you pointed out, it is a Distance
    transform implemented usin FastMarching.
    The advantage of this filter with respect
    to the DanielssonMap is that it produces
    a signed distance to the edge of a binary
    image.  The DanielssonMap will only produce
    a positive distance to the binary object
    itself.

    You may want to use the Reinitialize filter for
    removing computation artifacts from the level
    set every so many iterations. (but you will have
    to do it at the application level, not as part
    of the normal ITK pipeline).

    If you look at any of the level set images,
    after a couple hundred iterations, you will
    notice a good number of rectilinear artifacs,
    in particular in the regions far from the zero
    set. These artifacts cumulate over time and
    degrade the underlying assumption that the
    \phi function provides a linear approximation
    in the neighbohood of the zero set.


4) Here is an example on how the Reinitialize
    filter may use used. (Note that it expects
    the input to be a binary image with values
    -0.5 and 0.5.)

   typedef typename itk::ReinitializeLevelSetImageFilter<
                                             RealImageType >
                                                     DistanceFilterType;
   m_DistanceFilter = DistanceFilterType::New();
   m_DistanceFilter->SetInput( inputBinaryImage );
   m_DistanceFilter->NarrowBandingOn();
   m_DistanceFilter->SetNarrowBandwidth( m_BandWidth );

   m_DistanceFilter->Update();

   typedef typename DistanceFilterType::NodeContainerPointer
                                               NodeContainerPointer;

   NodeContainerPointer nodes =  m_DistanceFilter->GetOutputNarrowBand();



Regards,


    Luis



----------------------------------
hhiraki at lab . nig . ac . jp wrote:
> Hi Luis,
> 
> Digging into some codes you suggested, I thought that the 
> implementations were correct but the documentations had 
> some inconsistencies.
> 
> 
> I found in the method ComputeUpdate() in the file 
> itkLevelSetFunction.txx:
> 
>   // Return the combination of all the terms.
>   return ( PixelType ) ( curvature_term - propagation_term - advection_term );
> 
> This clearly shows the first (propagation) term and the 
> third (advection) term of equation 8.3 (SoftwareGuide.pdf) 
> is actually inverted their signs as I had assumed. I think 
> the equation 8.3 should be fixed.
> 
> 
> As for the "positive inside" convention, I found in both 
> the files itkShapeDetectionLevelSetImageFilter.h and 
> itkGeodesicActiveContourLevelSetImageFilter.h:
> 
>  *    \par OUTPUTS
>  *    The filter outputs a single, scalar, real-valued image.
>  *    Negative values in the output image are inside the segmentated region
>  *    and positive values in the image are outside of the inside region.  The
>  *    zero crossings of the image correspond to the position of the level set
>  *    front.
> 
> So, these filters follow the "negaive inside" convention. 
> This is implemented in their constructors:
> 
>   /* Use negative features by default. */
>   this->SetUseNegativeFeatures( true );
> 
> This is reverse to the default (false) of m_UseNegativeFeatures 
> in their super class SegmentationLevelSetImageFilter. I have 
> no idea which of them should be corrected, but I hope the 
> SoftwareGuide to be consistent.
> 
> 
> I have a new question on your suggestion.
> You suggested that \phi is the distance to the zero set only 
> just after reinitializing the level set with ReinitilizeLevelSetImageFilter. 
> But the file SparseFieldLevelSetImageFilter.h (this is the 
> super class of SegmentationLevelSetImageFilter) reads "... the 
> distance transform around the level curve can be recomputed at 
> each iteration." I couldn't find an example for 
> ReinitilizeLevelSetImageFilter. Is this class really for 
> reinitialization in the levelsets segmentation? It seems to 
> be just another distance transformation filter.
> 
> 
> Regards,
> 
> Hideaki Hiraki
> 
>