X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=common%2FclitkFilterBase.h;h=1019b7b76aa49f9b28e8796151a2e60c7c89672b;hb=8d51bd1cb7e9ca416b46677dcd73ba76d107a587;hp=25cfc4cee99773a93cf138650747214a4a39ad35;hpb=765020625fbc092d283e221e36c83e60a1844cb7;p=clitk.git diff --git a/common/clitkFilterBase.h b/common/clitkFilterBase.h index 25cfc4c..1019b7b 100644 --- a/common/clitkFilterBase.h +++ b/common/clitkFilterBase.h @@ -31,7 +31,7 @@ namespace clitk { //-------------------------------------------------------------------- /* - Convenient class to manage options from GGO (gengetopt) to filter + Convenient class to manage frequent options */ //-------------------------------------------------------------------- class FilterBase @@ -42,7 +42,10 @@ namespace clitk { typedef FilterBase Self; // Run-time type information (and related methods) - itkTypeMacro(FilterBase, Object); + virtual const char *GetNameOfClass() const + { + return "FilterBase"; + } // Needed by itkSetMacro (cannot inherit from itkObject because of // multiple inheritance) @@ -69,6 +72,11 @@ namespace clitk { itkGetConstMacro(VerboseMemoryFlag, bool); itkBooleanMacro(VerboseMemoryFlag); + // Verbose ImageSize + itkSetMacro(VerboseImageSizeFlag, bool); + itkGetConstMacro(VerboseImageSizeFlag, bool); + itkBooleanMacro(VerboseImageSizeFlag); + // Steps management itkSetMacro(NumberOfSteps, int); itkGetConstMacro(NumberOfSteps, int); @@ -113,15 +121,16 @@ namespace clitk { protected: FilterBase(); virtual ~FilterBase() {} - void StartNewStep(std::string s); + void StartNewStep(std::string s, bool endl=true); template - void StopCurrentStep(typename TInternalImageType::Pointer p); + void StopCurrentStep(typename TInternalImageType::Pointer p, std::string txt=""); void StopCurrentStep(); bool m_VerboseFlag; bool m_VerboseOptionFlag; bool m_VerboseStepFlag; bool m_VerboseMemoryFlag; + bool m_VerboseImageSizeFlag; bool m_WriteStepFlag; int m_CurrentStepNumber; int m_NumberOfSteps;