From d67434c9a2a790a07d3c832e3956d7eeb6f18c00 Mon Sep 17 00:00:00 2001 From: schaerer Date: Tue, 5 Oct 2010 14:17:13 +0000 Subject: [PATCH] remove unused file --- tools/clitkImageConvertGenericFilter.txx | 135 ----------------------- 1 file changed, 135 deletions(-) delete mode 100755 tools/clitkImageConvertGenericFilter.txx diff --git a/tools/clitkImageConvertGenericFilter.txx b/tools/clitkImageConvertGenericFilter.txx deleted file mode 100755 index 1d055e1..0000000 --- a/tools/clitkImageConvertGenericFilter.txx +++ /dev/null @@ -1,135 +0,0 @@ -/*========================================================================= - Program: vv http://www.creatis.insa-lyon.fr/rio/vv - - Authors belong to: - - University of LYON http://www.universite-lyon.fr/ - - Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr - - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the copyright notices for more information. - - It is distributed under dual licence - - - BSD See included LICENSE.txt file - - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html -======================================================================-====*/ -#ifndef CLITKIMAGECONVERTGENERICFILTER_TXX -#define CLITKIMAGECONVERTGENERICFILTER_TXX -/** - ================================================= - * @file clitkImageConvertGenericFilter.txx - * @author David Sarrut - * @date 05 May 2008 11:14:20 - * - * @brief - * - * - =================================================*/ - -#include - -//==================================================================== -template -void ImageConvertGenericFilter::Update_WithDim() -{ -#define TRY_TYPE(TYPE) \ - if (IsSameType(mPixelTypeName)) { Update_WithDimAndPixelType(); return; } - // TRY_TYPE(signed char); - TRY_TYPE(char); - TRY_TYPE(uchar); - TRY_TYPE(short); - TRY_TYPE(ushort); - TRY_TYPE(int); - TRY_TYPE(unsigned int); - TRY_TYPE(float); - TRY_TYPE(double); -#undef TRY_TYPE - - std::string list = CreateListOfTypes(); - std::cerr << "Error, I don't know the type '" << mPixelTypeName << "' for the input image '" - << mInputFilenames[0] << "'." << std::endl << "Known types are " << list << std::endl; - exit(0); -} -//==================================================================== - -//==================================================================== -template -void ImageConvertGenericFilter::Update_WithDimAndPixelType() -{ - if ((mPixelTypeName == mOutputPixelTypeName) || (mOutputPixelTypeName == "NotSpecified")) { - typedef itk::Image InputImageType; - typename InputImageType::Pointer input = clitk::readImage(mInputFilenames); - //clitk::writeImage(input, mOutputFilename, mIOVerbose); - this->SetNextOutput(input); - } else { -#define TRY_TYPE(TYPE) \ - if (IsSameType(mOutputPixelTypeName)) { Update_WithDimAndPixelTypeAndOutputType(); return; } - TRY_TYPE(char); - // TRY_TYPE(signed char); - TRY_TYPE(uchar); - TRY_TYPE(short); - TRY_TYPE(ushort); - TRY_TYPE(int); // no uint ... - TRY_TYPE(float); - TRY_TYPE(double); -#undef TRY_TYPE - - std::string list = CreateListOfTypes(); - std::cerr << "Error, I don't know the output type '" << mOutputPixelTypeName - << "'. " << std::endl << "Known types are " << list << "." << std::endl; - exit(0); - } -} -//==================================================================== - -//==================================================================== -template -void ImageConvertGenericFilter::Update_WithDimAndPixelTypeAndOutputType() -{ - // Read - typedef itk::Image InputImageType; - typename InputImageType::Pointer input = clitk::readImage(mInputFilenames); - - // Warning - if (std::numeric_limits::is_signed) { - if (!std::numeric_limits::is_signed) { - std::cerr << "Warning, input type is signed (" << mPixelTypeName << ") while output type is not (" - << mOutputPixelTypeName << "), use at your own responsability." << std::endl; - } - } - if (!std::numeric_limits::is_integer) { - if (std::numeric_limits::is_integer) { - std::cerr << "Warning, input type is not integer (" << mPixelTypeName << ") while output type is (" - << mOutputPixelTypeName << "), use at your own responsability." << std::endl; - } - } - // DD(std::numeric_limits::digits10); - // DD(std::numeric_limits::digits10); - if (!std::numeric_limits::is_integer) { - if (std::numeric_limits::is_integer) { - std::cerr << "Warning, input type is not integer (" << mPixelTypeName << ") while output type is (" - << mOutputPixelTypeName << "), use at your own responsability." << std::endl; - } - } - if (std::numeric_limits::digits10 > std::numeric_limits::digits10) { - std::cerr << "Warning, possible loss of precision : input type is (" << mPixelTypeName << ") while output type is (" - << mOutputPixelTypeName << "), use at your own responsability." << std::endl; - } - - // Cast - typedef itk::Image OutputImageType; - typedef itk::CastImageFilter FilterType; - typename FilterType::Pointer filter = FilterType::New(); - filter->SetInput(input); - filter->Update(); - - // Write - SetNextOutput(filter->GetOutput()); - //clitk::writeImage(filter->GetOutput(), mOutputFilename, mIOVerbose); -} -//==================================================================== - -#endif /* end #define CLITKIMAGECONVERTGENERICFILTER_TXX */ - -- 2.45.1