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://www.centreleonberard.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 ===========================================================================*/
18 #ifndef clitkFillMaskGenericFilter_cxx
19 #define clitkFillMaskGenericFilter_cxx
21 /* =================================================
22 * @file clitkFillMaskGenericFilter.cxx
28 ===================================================*/
30 #include "clitkFillMaskGenericFilter.h"
37 //-----------------------------------------------------------
39 //-----------------------------------------------------------
40 FillMaskGenericFilter::FillMaskGenericFilter()
47 //-----------------------------------------------------------
49 //-----------------------------------------------------------
50 void FillMaskGenericFilter::Update()
52 // Read the Dimension and PixelType
54 std::string PixelType;
55 ReadImageDimensionAndPixelType(m_InputFileName, Dimension, PixelType);
58 // Call UpdateWithPixelType
59 if (m_Verbose) std::cout << "Image was detected to be "<<Dimension<<"D and "<< PixelType<<"..."<<std::endl;
62 std::cerr<<"Error: Only for 3D!!"<<std::endl;
66 if(PixelType == "short"){
67 if (m_Verbose) std::cout << "Launching filter in "<< Dimension <<"D and signed short..." << std::endl;
68 UpdateWithPixelType<signed short>();
71 // else if(PixelType == "unsigned_short"){
72 // if (m_Verbose) std::cout << "Launching filter in "<< Dimension <<"D and unsigned_short..." << std::endl;
73 // UpdateWithPixelType<unsigned short>();
76 else if (PixelType == "unsigned_char"){
77 if (m_Verbose) std::cout << "Launching filter in "<< Dimension <<"D and unsigned_char..." << std::endl;
78 UpdateWithPixelType<unsigned char>();
81 // else if (PixelType == "char"){
82 // if (m_Verbose) std::cout << "Launching filter in "<< Dimension <<"D and signed_char..." << std::endl;
83 // UpdateWithPixelType<signed char>();
87 if (m_Verbose) std::cout << "Launching filter in "<< Dimension <<"D and float..." << std::endl;
88 UpdateWithPixelType<float>();
95 #endif //#define clitkFillMaskGenericFilter_cxx