X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=common%2FclitkFilterBase.h;h=1019b7b76aa49f9b28e8796151a2e60c7c89672b;hb=d55f025b18f68066a52b8f33c2dc6481e82c2580;hp=b8a154a8b2e7502f245dbe459670fac77bdaf9f4;hpb=8e9577b513e5c23835d0e2cb58e5ccc04e90544a;p=clitk.git diff --git a/common/clitkFilterBase.h b/common/clitkFilterBase.h index b8a154a..1019b7b 100644 --- a/common/clitkFilterBase.h +++ b/common/clitkFilterBase.h @@ -3,7 +3,7 @@ Authors belong to: - University of LYON http://www.universite-lyon.fr/ - - Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr + - Léon Bérard cancer center http://www.centreleonberard.fr - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr This software is distributed WITHOUT ANY WARRANTY; without even @@ -14,7 +14,7 @@ - BSD See included LICENSE.txt file - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html - ======================================================================-====*/ + ===========================================================================**/ #ifndef CLITKFILTERBASE_H #define 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;