1 #ifndef clitkFillMaskGenericFilter_cxx
2 #define clitkFillMaskGenericFilter_cxx
4 /* =================================================
5 * @file clitkFillMaskGenericFilter.cxx
11 ===================================================*/
13 #include "clitkFillMaskGenericFilter.h"
20 //-----------------------------------------------------------
22 //-----------------------------------------------------------
23 FillMaskGenericFilter::FillMaskGenericFilter()
30 //-----------------------------------------------------------
32 //-----------------------------------------------------------
33 void FillMaskGenericFilter::Update()
35 // Read the Dimension and PixelType
37 std::string PixelType;
38 ReadImageDimensionAndPixelType(m_InputFileName, Dimension, PixelType);
41 // Call UpdateWithPixelType
42 if (m_Verbose) std::cout << "Image was detected to be "<<Dimension<<"D and "<< PixelType<<"..."<<std::endl;
45 std::cerr<<"Error: Only for 3D!!"<<std::endl;
49 if(PixelType == "short"){
50 if (m_Verbose) std::cout << "Launching filter in "<< Dimension <<"D and signed short..." << std::endl;
51 UpdateWithPixelType<signed short>();
54 // else if(PixelType == "unsigned_short"){
55 // if (m_Verbose) std::cout << "Launching filter in "<< Dimension <<"D and unsigned_short..." << std::endl;
56 // UpdateWithPixelType<unsigned short>();
59 else if (PixelType == "unsigned_char"){
60 if (m_Verbose) std::cout << "Launching filter in "<< Dimension <<"D and unsigned_char..." << std::endl;
61 UpdateWithPixelType<unsigned char>();
64 // else if (PixelType == "char"){
65 // if (m_Verbose) std::cout << "Launching filter in "<< Dimension <<"D and signed_char..." << std::endl;
66 // UpdateWithPixelType<signed char>();
70 if (m_Verbose) std::cout << "Launching filter in "<< Dimension <<"D and float..." << std::endl;
71 UpdateWithPixelType<float>();
78 #endif //#define clitkFillMaskGenericFilter_cxx