// clitk
#include "clitkCommon.h"
+#include "clitkTimer.h"
#include "clitkFilterMacros.txx"
#include "clitkLabelizeParameters.h"
GGO_DefineOption_Flag(verboseOption, SetVerboseOption);
// Steps management
+ itkSetMacro(NumberOfSteps, int);
+ itkGetConstMacro(NumberOfSteps, int);
itkSetMacro(VerboseStep, bool);
itkGetConstMacro(VerboseStep, bool);
itkBooleanMacro(VerboseStep);
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<class OptionType>
itkBooleanMacro(VerboseWarningOff);
GGO_DefineOption_Flag(verboseWarningOff, SetVerboseWarningOff);
+ // Use this function to stop (when threaded)
+ void SetMustStop(bool b);
+ bool GetMustStop();
+
protected:
FilterBase();
virtual ~FilterBase() {}
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;
+ Timer m_CurrentStepTimer;
private:
FilterBase(const Self&); //purposely not implemented
} // end namespace clitk
//--------------------------------------------------------------------
+#define StartNewStepOrStop(s) StartNewStep(s); if (GetMustStop()) return;
+
#ifndef ITK_MANUAL_INSTANTIATION
#include "clitkFilterBase.txx"
#endif