[Insight-users] Initial level set capture

Joshua Cates cates at sci.utah.edu
Mon, 19 Apr 2004 11:38:50 -0600 (MDT)


Hi,

> 1)=A0Could some one please tell me if there is a way of storing the conto=
ur
> (using ZeroCrossingFilter) after each iteration, ie, if I run my progrm
> with the stopping criteria being RMS =3D 0.002 and max no of iteration =
=3D
> 1000, could I in any way store the contours at a periodic step, say after
> every 5 iterations. I finally want to see the movement of the contour.


The easiest way to do this is to write an itkCommand object that saves the
output of the filter every N iterations.  Then use the AddObserver method
in the filter register this command with the itk::IterationEvent().  See
the file
InsightApplications/ThresholdSegmentationLevelSetFltkGUI/SegmenterConsole.c=
xx
for an example of how to do this (start at line 109).  Be sure to use a
temporary image (one not attached to the filter pipeline) as the input to
the file writer.  Again, see the above referenced file for details (line
798).

Josh.

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