How to control iteration step by step in levelset-based filter?


(wenyalin) #1

Hey guys, I’m a newbie in ITK.
I’m wondering how could the GAC Level Set example achieve animated display? (link below, “Results” section)
https://itk.org/ITKExamples/src/Segmentation/LevelSets/SegmentWithGeodesicActiveContourLevelSet/Documentation.html
As I known so far, I could only set the number of iterations by “SetNumberOfIterations”, and and than get the output corresponding to it by “GetOutput”.
Instead of setting different iterations every time and rerun it, how could I get output from every iteration to achieve animated display?


(Dženan Zukić) #2

Welcome to the community @wenyalin!

I think that there are some examples of that in LevelSetsv4Visualization module. That module is OFF by default, so you will have to turn Module_ITKLevelSetsv4Visualization ON in CMake configuration of ITK.