]> Creatis software - clitk.git/blobdiff - common/clitkFilterBase.txx
Merge branch 'master' of /home/romulo/creatis/clitk3-git-shared/clitk3
[clitk.git] / common / clitkFilterBase.txx
index baee5700ac909d5176e97b281c2e4a18969c7ffb..81568ed71ced33e2793477682aa71a206ec002d2 100644 (file)
@@ -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
 
   - BSD        See included LICENSE.txt file
   - CeCILL-B   http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
-  ======================================================================-====*/
+  ===========================================================================**/
 
 #include "clitkImageCommon.h"
+#include "clitkMemoryUsage.h"
 
 //--------------------------------------------------------------------
 template<class OptionType>
 void clitk::FilterBase::VerboseOption(std::string name, OptionType value) 
 {
-  if (!this->GetVerboseOption()) return;
+  if (!this->GetVerboseOptionFlag()) return;
   std::cout << "Set option '" << name << "' = " << value << std::endl;
 }
 //--------------------------------------------------------------------
@@ -32,7 +33,7 @@ void clitk::FilterBase::VerboseOption(std::string name, OptionType value)
 template<class OptionType>
 void clitk::FilterBase::VerboseOption(std::string name, int nb, OptionType value) 
 {
-  if (!this->GetVerboseOption()) return;
+  if (!this->GetVerboseOptionFlag()) return;
   if (nb==0) std::cout << "Set option '" << name << "' not given" << std::endl;
   else {
     std::cout << "Set option '" << name << "' = " << value << std::endl;
@@ -45,7 +46,7 @@ void clitk::FilterBase::VerboseOption(std::string name, int nb, OptionType value
 template<class OptionType>
 void clitk::FilterBase::VerboseOptionV(std::string name, int nb, OptionType * value) 
 {
-  if (!this->GetVerboseOption()) return;
+  if (!this->GetVerboseOptionFlag()) return;
   if (nb==0) std::cout << "Set option '" << name << "' not given" << std::endl;
   else {
     std::cout << "Set option '" << name << "'[" << nb << "] ";
@@ -61,11 +62,12 @@ template<class TInternalImageType>
 void clitk::FilterBase::StopCurrentStep(typename TInternalImageType::Pointer p) 
 {
   StopCurrentStep();
-  if (m_WriteStep) {
+  if (m_WriteStepFlag) {
     std::ostringstream name;
     name << "step-" << GetCurrentStepId() << ".mhd";
     clitk::writeImage<TInternalImageType>(p, name.str());
   }
+  clitk::PrintMemory(GetVerboseMemoryFlag(), "End of step"); 
 }
 //--------------------------------------------------------------------