X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=common%2FclitkFilterBase.h;h=ef0a0d9ac45cb24d4f3f1e262127d51ba2114088;hb=b24d2dc847c898f19fe694c8e05878c27d5f8011;hp=7c3922a95a2822e625e5ee6e7421c105a589bc28;hpb=03c0a567e50d4b3dcdee11112b0a404789468857;p=clitk.git diff --git a/common/clitkFilterBase.h b/common/clitkFilterBase.h index 7c3922a..ef0a0d9 100644 --- a/common/clitkFilterBase.h +++ b/common/clitkFilterBase.h @@ -60,6 +60,8 @@ namespace clitk { GGO_DefineOption_Flag(verboseOption, SetVerboseOption); // Steps management + itkSetMacro(NumberOfSteps, int); + itkGetConstMacro(NumberOfSteps, int); itkSetMacro(VerboseStep, bool); itkGetConstMacro(VerboseStep, bool); itkBooleanMacro(VerboseStep); @@ -76,6 +78,8 @@ namespace clitk { itkGetConstMacro(CurrentStepId, std::string); itkSetMacro(CurrentStepBaseId, std::string); itkGetConstMacro(CurrentStepBaseId, std::string); + itkSetMacro(CurrentStepName, std::string); + itkGetConstMacro(CurrentStepName, std::string); // Convenient function for verbose option template @@ -101,6 +105,9 @@ namespace clitk { itkBooleanMacro(VerboseWarningOff); GGO_DefineOption_Flag(verboseWarningOff, SetVerboseWarningOff); + // Use this function to stop (when threaded) + void MustStop(); + protected: FilterBase(); virtual ~FilterBase() {} @@ -113,12 +120,15 @@ namespace clitk { bool m_VerboseStep; bool m_WriteStep; int m_CurrentStepNumber; + int m_NumberOfSteps; std::string m_CurrentStepId; std::string m_CurrentStepBaseId; std::string m_LastError; + std::string m_CurrentStepName; bool m_StopOnError; std::string m_Warning; bool m_VerboseWarningOff; + bool m_MustStop; private: FilterBase(const Self&); //purposely not implemented