[Insight-users] Level Set Bahaves Differently for 2D/3D?

Joshua Cates cates at sci . utah . edu
Wed, 12 Nov 2003 11:20:12 -0700 (MST)


Hi Sah,

There is no difference using the level set code for 2D and 3D. In fact,
the solver code is exactly the same regardless of dimensionality of the
data.  When going from 2D to 3D, however, keep in mind that the complexity
increases and things will slow down.  Also note that in practice, the
surface moves less than half a pixel per iteration, so more iterations may
be necessary than expected to see a dramatic change in surface position.

Some of the confusion may be that we are using different algorithm for the
solver than the classic narrow band you may be familiar with.  The "sparse
field" algorithm used by ThresholdLevelSet...Filter effectively
reinitializes every iteration with a distance transform from the zero
level set, so you will always see values in the range -4, 4 around an
implicit 3D surface at level set 0 (regardless of the number if elapsed
iterations).  There is no need to explicitly reinitialize the band.  To
see the surface position, ignore the values in the band and find the zero
level set.  Applying the zero crossing filter to your output will locate
the closest pixels to the zero level set.

The time step is automatically calculated as the maximum theoretically
stable value for each iteration (the CFL condition is different between 2
and 3 dimensions), so there is also no need to mess with the time step
parameters unless you intend to "overclock" the solver at the risk of
instability and a less accurate solution.  

If you continue to have problems then send me your code and I can help you
figure out what is going wrong.

Josh.

 ______________________________
 Josh Cates			
 Scientific Computing and Imaging Institute
 University of Utah
 Email: cates at sci . utah . edu
 Phone: (801) 587-7697
 URL:   http://www . sci . utah . edu/~cates


On Tue, 11 Nov 2003, Sah Rayman wrote:

> I did a little more explore. 
> 
> 1. SetMaximumIterations(1) and examine the level set
> output (before binary thresholding). 
> 
> In a narrow band (2~3 pixels wide) of 0 level set, 2D
> and 3D version gives exactly the same level set
> output. 
> 
> 2. SetMaximumRMSError(-1) so that it never functions.
> For 3D version, compare the level set output (let's
> call it ls_out) of Iteration=1 and Iteration=100. 
> For outside area: ls_out=4, inside:ls_out=-4, narrow
> band: -4<ls_out<4
> 
> And I discovered that, 
> (ls_out_iter_is_1 < 4) = (ls_out_iter_is_100 < 4)
> 
> meaning that the narrow band is NOT updated for the 3D
> version.
> 
> Does it mean  I have to manually update the narrow
> band, how? Why in 2D case, it is obviously update
> automatically?
> 
> Thanks.
> Sah
> 
> 
> --- Sah Rayman <sahrayman at yahoo . com> wrote:
> > I applied the example code, 
> > ThresholdSegmentationLevelSetImageFilter.cxx to my
> > 3D
> > image data and got some wierd results.
> > 
> > As a "debug", I created a 2D mhd file as input.
> > Re-complied
> > ThresholdSegmentationLevelSetImageFilter.cxx for a
> > 2D
> > and a 3D version. Then run them on the same 2D data.
> > 
> > 
> > The 2D output looks very nice; but seems the 3D
> > level
> > set stopps even when the speedMap is obviously
> > bigger
> > than 0. It just stoppes after a few iterations after
> > start, leaving an output quite close to input.
> > 
> > Advection, curvature and Laplacian weights are all
> > set
> > to 0, and therefore there is only propagation terms.
> > 
> > 
> > Also, I use SetMaximumPropagationTimeStep() to set a
> > same time step for 2D/3D cz their defaults are
> > different.
> > 
> > It there any reason the 2D/3D still behaves
> > different? 
> > 
> > __________________________________
> > Do you Yahoo!?
> > Protect your identity with Yahoo! Mail AddressGuard
> > http://antispam . yahoo . com/whatsnewfree
> > _______________________________________________
> > Insight-users mailing list
> > Insight-users at itk . org
> > http://www . itk . org/mailman/listinfo/insight-users
> 
> 
> __________________________________
> Do you Yahoo!?
> Protect your identity with Yahoo! Mail AddressGuard
> http://antispam . yahoo . com/whatsnewfree
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk . org
> http://www . itk . org/mailman/listinfo/insight-users
>