[Insight-developers] Stopping a level set filter mid-iteration?
Miller, James V (Research)
millerjv at crd.ge.com
Tue May 3 12:37:09 EDT 2005
The AbortEvent mechanism for stopping any ImageToImageFilter should work.
filter->SetAbortGenerateData(true);
This flag is checked by the progress report mechanism.
(To re-run the filter, you may need to call ResetPipeline() on the filter to clear some internal flags about the state of the filter).
Jim
-----Original Message-----
From: insight-developers-bounces at itk.org
[mailto:insight-developers-bounces at itk.org]On Behalf Of Zachary Pincus
Sent: Tuesday, May 03, 2005 12:15 PM
To: insight-developers at itk.org
Subject: [Insight-developers] Stopping a level set filter mid-iteration?
Hello all,
Is there a "proper" way to stop a level set filter (or, more generally,
a subclass of itk::FiniteDifferenceImageFilter) midway through its
iterations, via an observer object?
Some optimizers have a StopOptimization() method for precisely this
purpose, for example. Is there anything similar for
FiniteDifferenceImageFilter subclasses? (I could just set MaxIterations
to CurrentIterations from the observer object, I guess.)
If there isn't any such mechanism, should there be? I'll happily add
such a method to FiniteDifferenceImageFilter (after, of course, filing
a bug in the bugtracker) if people agree.
Zach Pincus
Department of Biochemistry and Program in Biomedical Informatics
Stanford University School of Medicine
_______________________________________________
Insight-developers mailing list
Insight-developers at itk.org
http://www.itk.org/mailman/listinfo/insight-developers
More information about the Insight-developers
mailing list