[Insight-users] How to stop a LevelSet segmentation by user

Luis Ibanez luis.ibanez at kitware.com
Mon Aug 7 11:48:21 EDT 2006


Hi Yixun,

Please look at:


    InsightApplications/SNAP


LevelSet filters thrown IterationEvents, you
can use an itkCommand in order to observe for
those events and when they arrive you can
trigger a visualization of the current level set.

The classical thing to do is to run a contour
filter at the zero-set level. You can do this
by connecting the ITK pipeline to a VTK pipeline
that contains a vtkContour filter as illustrated
in the examples:

     InsightApplications/Auxiliary/vtk/
         itkReadITKImage3DSegmentShowVTK.cxx
         itkReadITKImageSegmentShowVTK.cxx
         itkReadITKImageShowSplineVTK.cxx
         itkReadITKImageShowVTK.cxx


Once you decide to stop the level set you simply
invoke the method:


     filter->AbortGenerateDataOn();

This will make the filter stop by the *next*
iteration.


You will also find and example on how to do this
in the application:


     InsightApplications/
        ThresholdSegmentationLevelSetFltkGui/




   Regards,



      Luis



---------------
Yixun Liu wrote:
> Hi,
>  
> I use ITK level set to segment, but I want to stop it by user when user 
> find the segment result reaches his requirement. How to stop it by users?
>  
> Best regards,
>  
> Yixun Liu
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users




More information about the Insight-users mailing list