From e6929caa9906837ade57b84706fe0a38529dc93a Mon Sep 17 00:00:00 2001 From: tbaudier Date: Wed, 13 Feb 2019 09:46:50 +0100 Subject: [PATCH] Add pixel type options for clitkMergeSequence (double and unsigned char) Indent correctly --- tools/clitkMergeSequenceGenericFilter.txx | 58 ++++++++++------------- 1 file changed, 24 insertions(+), 34 deletions(-) diff --git a/tools/clitkMergeSequenceGenericFilter.txx b/tools/clitkMergeSequenceGenericFilter.txx index 300c821..7a57030 100644 --- a/tools/clitkMergeSequenceGenericFilter.txx +++ b/tools/clitkMergeSequenceGenericFilter.txx @@ -28,43 +28,33 @@ namespace clitk if (m_Verbose) std::cout << "Image was detected to be "<(); - } - // else if(PixelType == "unsigned_short"){ - // if (m_Verbose) std::cout << "Launching filter in "<< Dimension <<"D and unsigned_short..." << std::endl; - // UpdateWithDimAndPixelType(); - // } - - else if (PixelType == "unsigned_char"){ - if (m_Verbose) std::cout << "Launching filter in "<< Dimension <<"D and unsigned_char..." << std::endl; - UpdateWithDimAndPixelType(); - } - - // else if (PixelType == "char"){ - // if (m_Verbose) std::cout << "Launching filter in "<< Dimension <<"D and signed_char..." << std::endl; - // UpdateWithDimAndPixelType(); - // } - else { - if (m_Verbose) std::cout << "Launching filter in "<< Dimension <<"D and float..." << std::endl; - UpdateWithDimAndPixelType(); - } - } - - else if (Components==3) - { - if (m_Verbose) std::cout << "Launching filter in "<< Dimension <<"D and 3D float (DVF)" << std::endl; - UpdateWithDimAndPixelType >(); + if (Components==1) { + if(PixelType == "short") { + if (m_Verbose) std::cout << "Launching filter in "<< Dimension <<"D and signed short..." << std::endl; + UpdateWithDimAndPixelType(); + } else if(PixelType == "unsigned_short") { + if (m_Verbose) std::cout << "Launching filter in "<< Dimension <<"D and unsigned_short..." << std::endl; + UpdateWithDimAndPixelType(); + } else if (PixelType == "unsigned_char") { + if (m_Verbose) std::cout << "Launching filter in "<< Dimension <<"D and unsigned_char..." << std::endl; + UpdateWithDimAndPixelType(); + } else if (PixelType == "char"){ + if (m_Verbose) std::cout << "Launching filter in "<< Dimension <<"D and signed_char..." << std::endl; + UpdateWithDimAndPixelType(); + } else if(PixelType == "double"){ + if (m_Verbose) std::cout << "Launching filter in "<< Dimension <<"D and double..." << std::endl; + UpdateWithDimAndPixelType(); + } else { + if (m_Verbose) std::cout << "Launching filter in "<< Dimension <<"D and float..." << std::endl; + UpdateWithDimAndPixelType(); } + } else if (Components==3) { + if (m_Verbose) std::cout << "Launching filter in "<< Dimension <<"D and 3D float (DVF)" << std::endl; + UpdateWithDimAndPixelType >(); + } else std::cerr<<"Number of components is "< void MergeSequenceGenericFilter::UpdateWithDimAndPixelType() { -- 2.45.0