X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=common%2FclitkFilterBase.h;fp=common%2FclitkFilterBase.h;h=a53a181490b07ab0180e34b7d2e7c1b2e09ac879;hb=868922dc773690f1be8f21159f10fc4702e5c09f;hp=ef0a0d9ac45cb24d4f3f1e262127d51ba2114088;hpb=0bbf0c26e4e2b917143315bec9ce1c52a357a500;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