1 /*=========================================================================
2 Program: vv http://www.creatis.insa-lyon.fr/rio/vv
5 - University of LYON http://www.universite-lyon.fr/
6 - Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr
7 - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the copyright notices for more information.
13 It is distributed under dual licence
15 - BSD See included LICENSE.txt file
16 - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17 ======================================================================-====*/
19 #include "clitkImageCommon.h"
21 //--------------------------------------------------------------------
22 template<class OptionType>
23 void clitk::FilterBase::VerboseOption(std::string name, OptionType value)
25 if (!this->GetVerboseOption()) return;
26 std::cout << "Set option '" << name << "' = " << value << std::endl;
28 //--------------------------------------------------------------------
31 //--------------------------------------------------------------------
32 template<class OptionType>
33 void clitk::FilterBase::VerboseOption(std::string name, int nb, OptionType value)
35 if (!this->GetVerboseOption()) return;
36 if (nb==0) std::cout << "Set option '" << name << "' not given" << std::endl;
38 std::cout << "Set option '" << name << "' = " << value << std::endl;
41 //--------------------------------------------------------------------
44 //--------------------------------------------------------------------
45 template<class OptionType>
46 void clitk::FilterBase::VerboseOptionV(std::string name, int nb, OptionType * value)
48 if (!this->GetVerboseOption()) return;
49 if (nb==0) std::cout << "Set option '" << name << "' not given" << std::endl;
51 std::cout << "Set option '" << name << "'[" << nb << "] ";
52 for(int i=0; i<nb; i++) std::cout << value[i] << " ";
53 std::cout << std::endl;
56 //--------------------------------------------------------------------
59 //--------------------------------------------------------------------
60 template<class TInternalImageType>
61 void clitk::FilterBase::StopCurrentStep(typename TInternalImageType::Pointer p)
65 std::ostringstream name;
66 name << "step-" << GetCurrentStepId() << ".mhd";
67 clitk::writeImage<TInternalImageType>(p, name.str());
70 //--------------------------------------------------------------------