X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=common%2FclitkFilterBase.txx;h=81568ed71ced33e2793477682aa71a206ec002d2;hb=1e17c9ce74f96c9ea76468925ebdbaaed53325ba;hp=c00d18adabdb28307f357b883078d314a0aab2d9;hpb=03c0a567e50d4b3dcdee11112b0a404789468857;p=clitk.git diff --git a/common/clitkFilterBase.txx b/common/clitkFilterBase.txx index c00d18a..81568ed7 100644 --- a/common/clitkFilterBase.txx +++ b/common/clitkFilterBase.txx @@ -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,15 +14,16 @@ - 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 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 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 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 << "] "; @@ -60,11 +61,13 @@ void clitk::FilterBase::VerboseOptionV(std::string name, int nb, OptionType * va template void clitk::FilterBase::StopCurrentStep(typename TInternalImageType::Pointer p) { - if (m_WriteStep) { + StopCurrentStep(); + if (m_WriteStepFlag) { std::ostringstream name; name << "step-" << GetCurrentStepId() << ".mhd"; clitk::writeImage(p, name.str()); } + clitk::PrintMemory(GetVerboseMemoryFlag(), "End of step"); } //--------------------------------------------------------------------