X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=common%2FclitkFilterBase.h;h=a53a181490b07ab0180e34b7d2e7c1b2e09ac879;hb=13ea7d94cf17a464042e1008a61f6712180fc10c;hp=ef0a0d9ac45cb24d4f3f1e262127d51ba2114088;hpb=38786c4da19b87319bbe3cecc145e3d1771d10da;p=clitk.git diff --git a/common/clitkFilterBase.h b/common/clitkFilterBase.h index ef0a0d9..a53a181 100644 --- a/common/clitkFilterBase.h +++ b/common/clitkFilterBase.h @@ -21,6 +21,7 @@ // clitk #include "clitkCommon.h" +#include "clitkTimer.h" #include "clitkFilterMacros.txx" #include "clitkLabelizeParameters.h" @@ -106,7 +107,8 @@ namespace clitk { GGO_DefineOption_Flag(verboseWarningOff, SetVerboseWarningOff); // Use this function to stop (when threaded) - void MustStop(); + void SetMustStop(bool b); + bool GetMustStop(); protected: FilterBase(); @@ -129,6 +131,7 @@ namespace clitk { std::string m_Warning; bool m_VerboseWarningOff; bool m_MustStop; + Timer m_CurrentStepTimer; private: FilterBase(const Self&); //purposely not implemented @@ -140,6 +143,8 @@ namespace clitk { } // end namespace clitk //-------------------------------------------------------------------- +#define StartNewStepOrStop(s) StartNewStep(s); if (GetMustStop()) return; + #ifndef ITK_MANUAL_INSTANTIATION #include "clitkFilterBase.txx" #endif