diff --git a/Modules/Wrappers/ApplicationEngine/src/otbWrapperInputImageParameterDouble.cxx b/Modules/Wrappers/ApplicationEngine/src/otbWrapperInputImageParameterDouble.cxx deleted file mode 100644 index c0676eac9fb4266ef588d7a9c21f1e647116dc6a..0000000000000000000000000000000000000000 --- a/Modules/Wrappers/ApplicationEngine/src/otbWrapperInputImageParameterDouble.cxx +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES) - * - * This file is part of Orfeo Toolbox - * - * https://www.orfeo-toolbox.org/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include <vcl_deprecated_header.h> -#include "otbWrapperInputImageParameter.h" -#include "itksys/SystemTools.hxx" -#include "otbWrapperTypes.h" -#include "otbWrapperInputImageParameterMacros.h" -#include "otb_boost_string_header.h" - -namespace otb -{ -namespace Wrapper -{ -otbGetImageMacro(DoubleImage); -otbGetImageMacro(DoubleVectorImage) -} -} diff --git a/Modules/Wrappers/ApplicationEngine/src/otbWrapperInputImageParameterFloat.cxx b/Modules/Wrappers/ApplicationEngine/src/otbWrapperInputImageParameterFloat.cxx deleted file mode 100644 index 07648108dedf1669f93c1d2bd5f5ef460faa464b..0000000000000000000000000000000000000000 --- a/Modules/Wrappers/ApplicationEngine/src/otbWrapperInputImageParameterFloat.cxx +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES) - * - * This file is part of Orfeo Toolbox - * - * https://www.orfeo-toolbox.org/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include <vcl_deprecated_header.h> -#include "otbWrapperInputImageParameter.h" -#include "otbWrapperInputImageParameterMacros.h" -#include "itksys/SystemTools.hxx" -#include "otbWrapperTypes.h" -#include "otb_boost_string_header.h" - -namespace otb -{ -namespace Wrapper -{ -otbGetImageMacro(FloatImage); -otbGetImageMacro(FloatVectorImage) -} -} diff --git a/Modules/Wrappers/ApplicationEngine/src/otbWrapperInputImageParameterInt16.cxx b/Modules/Wrappers/ApplicationEngine/src/otbWrapperInputImageParameterInt16.cxx deleted file mode 100644 index 39c5ec56414071a1f7cdce34fe66f6057d3602be..0000000000000000000000000000000000000000 --- a/Modules/Wrappers/ApplicationEngine/src/otbWrapperInputImageParameterInt16.cxx +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES) - * - * This file is part of Orfeo Toolbox - * - * https://www.orfeo-toolbox.org/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include <vcl_deprecated_header.h> -#include "otbWrapperInputImageParameter.h" -#include "itksys/SystemTools.hxx" -#include "otbWrapperTypes.h" -#include "otbWrapperInputImageParameterMacros.h" -#include "otb_boost_string_header.h" - -namespace otb -{ -namespace Wrapper -{ -otbGetImageMacro(Int16Image); -otbGetImageMacro(Int16VectorImage) -} -} diff --git a/Modules/Wrappers/ApplicationEngine/src/otbWrapperInputImageParameterInt32.cxx b/Modules/Wrappers/ApplicationEngine/src/otbWrapperInputImageParameterInt32.cxx deleted file mode 100644 index 29679a5e397f685cb00e8e3dfa62869ee66307a3..0000000000000000000000000000000000000000 --- a/Modules/Wrappers/ApplicationEngine/src/otbWrapperInputImageParameterInt32.cxx +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES) - * - * This file is part of Orfeo Toolbox - * - * https://www.orfeo-toolbox.org/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include <vcl_deprecated_header.h> -#include "otbWrapperInputImageParameter.h" -#include "itksys/SystemTools.hxx" -#include "otbWrapperTypes.h" -#include "otbWrapperInputImageParameterMacros.h" -#include "otb_boost_string_header.h" - -namespace otb -{ -namespace Wrapper -{ -otbGetImageMacro(Int32Image); -otbGetImageMacro(Int32VectorImage) -} -} diff --git a/Modules/Wrappers/ApplicationEngine/src/otbWrapperInputImageParameterMacros.h b/Modules/Wrappers/ApplicationEngine/src/otbWrapperInputImageParameterMacros.h index 3f3525af7a9cb592a4293914b53fd4ea7dac3853..2f1a7915b4f9b1491fde3ba0f9d77fc004e9e021 100644 --- a/Modules/Wrappers/ApplicationEngine/src/otbWrapperInputImageParameterMacros.h +++ b/Modules/Wrappers/ApplicationEngine/src/otbWrapperInputImageParameterMacros.h @@ -33,22 +33,4 @@ otbGetImageMacro(type##VectorImage); -/* -#define otbCastImageMacro(InputImageType, OutputImageType, theMethod) \ - template<> OutputImageType * \ - InputImageParameter::CastImage<InputImageType , OutputImageType>() \ - { \ - return this->theMethod<InputImageType , OutputImageType>(); \ - } - -#define otbGenericCastImageMacro(InputImageType, theMethod, prefix) \ - otbCastImageMacro(InputImageType, UInt8##prefix##ImageType, theMethod) \ - otbCastImageMacro(InputImageType, UInt16##prefix##ImageType, theMethod) \ - otbCastImageMacro(InputImageType, Int16##prefix##ImageType, theMethod) \ - otbCastImageMacro(InputImageType, UInt32##prefix##ImageType, theMethod) \ - otbCastImageMacro(InputImageType, Int32##prefix##ImageType, theMethod) \ - otbCastImageMacro(InputImageType, Float##prefix##ImageType, theMethod) \ - otbCastImageMacro(InputImageType, Double##prefix##ImageType, theMethod) -*/ - #endif diff --git a/Modules/Wrappers/ApplicationEngine/src/otbWrapperInputImageParameterUInt16.cxx b/Modules/Wrappers/ApplicationEngine/src/otbWrapperInputImageParameterUInt16.cxx deleted file mode 100644 index 23c64f3c7a3c3c445c3039b104a1d5680380d1d6..0000000000000000000000000000000000000000 --- a/Modules/Wrappers/ApplicationEngine/src/otbWrapperInputImageParameterUInt16.cxx +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES) - * - * This file is part of Orfeo Toolbox - * - * https://www.orfeo-toolbox.org/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include <vcl_deprecated_header.h> -#include "otbWrapperInputImageParameter.h" -#include "itksys/SystemTools.hxx" -#include "otbWrapperTypes.h" -#include "otbWrapperInputImageParameterMacros.h" -#include "otb_boost_string_header.h" - -namespace otb -{ -namespace Wrapper -{ -otbGetImageMacro(UInt16Image); -otbGetImageMacro(UInt16VectorImage) -} -} diff --git a/Modules/Wrappers/ApplicationEngine/src/otbWrapperInputImageParameterUInt32.cxx b/Modules/Wrappers/ApplicationEngine/src/otbWrapperInputImageParameterUInt32.cxx deleted file mode 100644 index b4ae369742bd14fd776b82e9bb0a4cfd2a96508e..0000000000000000000000000000000000000000 --- a/Modules/Wrappers/ApplicationEngine/src/otbWrapperInputImageParameterUInt32.cxx +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES) - * - * This file is part of Orfeo Toolbox - * - * https://www.orfeo-toolbox.org/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include <vcl_deprecated_header.h> -#include "otbWrapperInputImageParameter.h" -#include "itksys/SystemTools.hxx" -#include "otbWrapperTypes.h" -#include "otbWrapperInputImageParameterMacros.h" -#include "otb_boost_string_header.h" - -namespace otb -{ -namespace Wrapper -{ -otbGetImageMacro(UInt32Image); -otbGetImageMacro(UInt32VectorImage) -} -} diff --git a/Modules/Wrappers/ApplicationEngine/src/otbWrapperInputImageParameterUInt8.cxx b/Modules/Wrappers/ApplicationEngine/src/otbWrapperInputImageParameterUInt8.cxx deleted file mode 100644 index 19b9544d45b55807ebcf0e6564e35e3f17c9a562..0000000000000000000000000000000000000000 --- a/Modules/Wrappers/ApplicationEngine/src/otbWrapperInputImageParameterUInt8.cxx +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES) - * - * This file is part of Orfeo Toolbox - * - * https://www.orfeo-toolbox.org/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include <vcl_deprecated_header.h> -#include "otbWrapperInputImageParameter.h" -#include "itksys/SystemTools.hxx" -#include "otbWrapperTypes.h" -#include "otbWrapperInputImageParameterMacros.h" -#include "otb_boost_string_header.h" - -namespace otb -{ -namespace Wrapper -{ -otbGetImageMacro(UInt8Image); -otbGetImageMacro(UInt8VectorImage) -} -} diff --git a/Modules/Wrappers/ApplicationEngine/test/otbWrapperOutputImageParameterTest.cxx b/Modules/Wrappers/ApplicationEngine/test/otbWrapperOutputImageParameterTest.cxx index 34cbb1d6f1dff0fd3b6c559cd201210792d6dfdc..ea8899b8e0d50685f8e0973f17e1a50081dde7f5 100644 --- a/Modules/Wrappers/ApplicationEngine/test/otbWrapperOutputImageParameterTest.cxx +++ b/Modules/Wrappers/ApplicationEngine/test/otbWrapperOutputImageParameterTest.cxx @@ -62,57 +62,57 @@ int otbWrapperOutputImageParameterTest1(int itkNotUsed(argc), char* argv[]) } -template < typename ImageType > -void Cross( int p , std::string inputfilename, std::string outputfilename) -{ - otb::Wrapper::InputImageParameter::Pointer paramIn ( - otb::Wrapper::InputImageParameter::New() ); - paramIn->SetFromFileName( inputfilename ); - otb::Wrapper::OutputImageParameter::Pointer paramOut( - otb::Wrapper::OutputImageParameter::New() ); - paramOut->SetFileName( outputfilename ); - paramOut->SetImage(paramIn->GetImage<ImageType>()); - paramOut->InitializeWriters(); - paramOut->SetPixelType(static_cast<otb::Wrapper::ImagePixelType>(p)); - paramOut->Write(); -} - - -int otbWrapperOutputImageParameterConversionTest(int , char* argv[]) -{ - std::string filenamein = argv[1]; - std::string filenameout = argv[2] ; - std::string extension = filenameout.substr( filenameout.find_last_of('.') ); - - filenameout = filenameout.substr( 0 , filenameout.find_last_of('.') ); - - for ( int i = otb::Wrapper::ImagePixelType_uint8 ; i < 11 ; i++ ) - { - std::string type = - otb::Wrapper::OutputImageParameter::ConvertPixelTypeToString( - static_cast<otb::Wrapper::ImagePixelType>(i) ); - Cross< otb::Wrapper::UInt8ImageType > (i , filenamein , filenameout+"_UInt8_"+ type + extension ) ; - Cross< otb::Wrapper::Int16ImageType > ( i , filenamein , filenameout+"_Int16_"+ type + extension ) ; - Cross< otb::Wrapper::UInt16ImageType > ( i , filenamein , filenameout+"_UInt16_"+ type + extension ) ; - Cross< otb::Wrapper::Int32ImageType > ( i , filenamein , filenameout+"_Int21_"+ type + extension ) ; - Cross< otb::Wrapper::UInt32ImageType > ( i , filenamein , filenameout+"_UInt32_"+ type + extension ) ; - Cross< otb::Wrapper::FloatImageType > ( i , filenamein , filenameout+"_float_"+ type + extension ) ; - Cross< otb::Wrapper::DoubleImageType > ( i , filenamein , filenameout+"_double_"+ type + extension ) ; - Cross< otb::Wrapper::UInt8VectorImageType > ( i , filenamein , filenameout+"_UInt8Vect_"+ type + extension ) ; - Cross< otb::Wrapper::Int16VectorImageType > ( i , filenamein , filenameout+"_Int16Vect_"+ type + extension ) ; - Cross< otb::Wrapper::UInt16VectorImageType > ( i , filenamein , filenameout+"_UInt16Vect_"+ type + extension ) ; - Cross< otb::Wrapper::Int32VectorImageType > ( i , filenamein , filenameout+"_Int21Vect_"+ type + extension ) ; - Cross< otb::Wrapper::UInt32VectorImageType > ( i , filenamein , filenameout+"_UInt32Vect_"+ type + extension ) ; - Cross< otb::Wrapper::FloatVectorImageType > ( i , filenamein , filenameout+"_floatVect_"+ type + extension ) ; - Cross< otb::Wrapper::DoubleVectorImageType > ( i , filenamein , filenameout+"_doubleVect_"+ type + extension ) ; - Cross< otb::Wrapper::ComplexInt16ImageType > ( i , filenamein , filenameout+"_CInt16_"+ type + extension ) ; - Cross< otb::Wrapper::ComplexInt32ImageType > ( i , filenamein , filenameout+"_CInt32_"+ type + extension ) ; - Cross< otb::Wrapper::ComplexFloatImageType > ( i , filenamein , filenameout+"_Cfloat_"+ type + extension ) ; - Cross< otb::Wrapper::ComplexDoubleImageType > ( i , filenamein , filenameout+"_Cdouble_"+ type + extension ) ; - Cross< otb::Wrapper::ComplexInt16VectorImageType > ( i , filenamein , filenameout+"_CInt16Vect_"+ type + extension ) ; - Cross< otb::Wrapper::ComplexInt32VectorImageType > ( i , filenamein , filenameout+"_CInt32Vect_"+ type + extension ) ; - Cross< otb::Wrapper::ComplexFloatVectorImageType > ( i , filenamein , filenameout+"_CfloatVect_"+ type + extension ) ; - Cross< otb::Wrapper::ComplexDoubleVectorImageType > ( i , filenamein , filenameout+"_CdoubleVect_"+ type + extension ) ; - } - return 0; -} +// template < typename ImageType > +// void Cross( int p , std::string inputfilename, std::string outputfilename) +// { +// otb::Wrapper::InputImageParameter::Pointer paramIn ( +// otb::Wrapper::InputImageParameter::New() ); +// paramIn->SetFromFileName( inputfilename ); +// otb::Wrapper::OutputImageParameter::Pointer paramOut( +// otb::Wrapper::OutputImageParameter::New() ); +// paramOut->SetFileName( outputfilename ); +// paramOut->SetImage(paramIn->GetImage<ImageType>()); +// paramOut->InitializeWriters(); +// paramOut->SetPixelType(static_cast<otb::Wrapper::ImagePixelType>(p)); +// paramOut->Write(); +// } + + +// int otbWrapperOutputImageParameterConversionTest(int , char* argv[]) +// { +// std::string filenamein = argv[1]; +// std::string filenameout = argv[2] ; +// std::string extension = filenameout.substr( filenameout.find_last_of('.') ); + +// filenameout = filenameout.substr( 0 , filenameout.find_last_of('.') ); + +// for ( int i = otb::Wrapper::ImagePixelType_uint8 ; i < 11 ; i++ ) +// { +// std::string type = +// otb::Wrapper::OutputImageParameter::ConvertPixelTypeToString( +// static_cast<otb::Wrapper::ImagePixelType>(i) ); +// Cross< otb::Wrapper::UInt8ImageType > (i , filenamein , filenameout+"_UInt8_"+ type + extension ) ; +// Cross< otb::Wrapper::Int16ImageType > ( i , filenamein , filenameout+"_Int16_"+ type + extension ) ; +// Cross< otb::Wrapper::UInt16ImageType > ( i , filenamein , filenameout+"_UInt16_"+ type + extension ) ; +// Cross< otb::Wrapper::Int32ImageType > ( i , filenamein , filenameout+"_Int21_"+ type + extension ) ; +// Cross< otb::Wrapper::UInt32ImageType > ( i , filenamein , filenameout+"_UInt32_"+ type + extension ) ; +// Cross< otb::Wrapper::FloatImageType > ( i , filenamein , filenameout+"_float_"+ type + extension ) ; +// Cross< otb::Wrapper::DoubleImageType > ( i , filenamein , filenameout+"_double_"+ type + extension ) ; +// Cross< otb::Wrapper::UInt8VectorImageType > ( i , filenamein , filenameout+"_UInt8Vect_"+ type + extension ) ; +// Cross< otb::Wrapper::Int16VectorImageType > ( i , filenamein , filenameout+"_Int16Vect_"+ type + extension ) ; +// Cross< otb::Wrapper::UInt16VectorImageType > ( i , filenamein , filenameout+"_UInt16Vect_"+ type + extension ) ; +// Cross< otb::Wrapper::Int32VectorImageType > ( i , filenamein , filenameout+"_Int21Vect_"+ type + extension ) ; +// Cross< otb::Wrapper::UInt32VectorImageType > ( i , filenamein , filenameout+"_UInt32Vect_"+ type + extension ) ; +// Cross< otb::Wrapper::FloatVectorImageType > ( i , filenamein , filenameout+"_floatVect_"+ type + extension ) ; +// Cross< otb::Wrapper::DoubleVectorImageType > ( i , filenamein , filenameout+"_doubleVect_"+ type + extension ) ; +// Cross< otb::Wrapper::ComplexInt16ImageType > ( i , filenamein , filenameout+"_CInt16_"+ type + extension ) ; +// Cross< otb::Wrapper::ComplexInt32ImageType > ( i , filenamein , filenameout+"_CInt32_"+ type + extension ) ; +// Cross< otb::Wrapper::ComplexFloatImageType > ( i , filenamein , filenameout+"_Cfloat_"+ type + extension ) ; +// Cross< otb::Wrapper::ComplexDoubleImageType > ( i , filenamein , filenameout+"_Cdouble_"+ type + extension ) ; +// Cross< otb::Wrapper::ComplexInt16VectorImageType > ( i , filenamein , filenameout+"_CInt16Vect_"+ type + extension ) ; +// Cross< otb::Wrapper::ComplexInt32VectorImageType > ( i , filenamein , filenameout+"_CInt32Vect_"+ type + extension ) ; +// Cross< otb::Wrapper::ComplexFloatVectorImageType > ( i , filenamein , filenameout+"_CfloatVect_"+ type + extension ) ; +// Cross< otb::Wrapper::ComplexDoubleVectorImageType > ( i , filenamein , filenameout+"_CdoubleVect_"+ type + extension ) ; +// } +// return 0; +// }