diff --git a/Modules/Core/ImageBase/include/otbImage.h b/Modules/Core/ImageBase/include/otbImage.h index 1b7dec317c6c07da3b573454a3aeb37d67ef5959..9c376e9f852955a1675c0b5a1fb729ebe3a857c5 100644 --- a/Modules/Core/ImageBase/include/otbImage.h +++ b/Modules/Core/ImageBase/include/otbImage.h @@ -274,4 +274,13 @@ private: #include "otbImage.hxx" #endif +namespace otb { + extern template class Image<unsigned int, 2>; + extern template class Image<int, 2>; + extern template class Image<unsigned char, 2>; + extern template class Image<char, 2>; + extern template class Image<float, 2>; + extern template class Image<double, 2>; +} + #endif diff --git a/Modules/Core/ImageBase/include/otbVectorImage.h b/Modules/Core/ImageBase/include/otbVectorImage.h index 95e18662fc851e16a00f15497f9ef406808f8f56..41197e97b815f637c7b2034dadcc9c6f0cbf89e8 100644 --- a/Modules/Core/ImageBase/include/otbVectorImage.h +++ b/Modules/Core/ImageBase/include/otbVectorImage.h @@ -215,4 +215,13 @@ private: #include "otbVectorImage.hxx" #endif +namespace otb { + extern template class VectorImage<unsigned int, 2>; + extern template class VectorImage<int, 2>; + extern template class VectorImage<unsigned char, 2>; + extern template class VectorImage<char, 2>; + extern template class VectorImage<float, 2>; + extern template class VectorImage<double, 2>; +} + #endif diff --git a/Modules/Core/ImageBase/src/CMakeLists.txt b/Modules/Core/ImageBase/src/CMakeLists.txt index 2a181ffec795f69ec0764a962d588a1fdb2133c9..33ef6597868ea3683554ded0ec49e0b75f54f156 100644 --- a/Modules/Core/ImageBase/src/CMakeLists.txt +++ b/Modules/Core/ImageBase/src/CMakeLists.txt @@ -20,6 +20,8 @@ set(OTBImageBase_SRC otbImageIOBase.cxx + otbImage.cxx + otbVectorImage.cxx ) add_library(OTBImageBase ${OTBImageBase_SRC}) diff --git a/Modules/Core/ImageBase/src/otbImage.cxx b/Modules/Core/ImageBase/src/otbImage.cxx new file mode 100644 index 0000000000000000000000000000000000000000..c35fc8caa78d0b9638497696b10997f6ba01b65e --- /dev/null +++ b/Modules/Core/ImageBase/src/otbImage.cxx @@ -0,0 +1,30 @@ +/* + * 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 "otbImage.h" + +namespace otb { + template class Image<unsigned int, 2>; + template class Image<int, 2>; + template class Image<unsigned char, 2>; + template class Image<char, 2>; + template class Image<float, 2>; + template class Image<double, 2>; +} diff --git a/Modules/Core/ImageBase/src/otbVectorImage.cxx b/Modules/Core/ImageBase/src/otbVectorImage.cxx new file mode 100644 index 0000000000000000000000000000000000000000..ef8df6151d14193ea0e82e1eb95bb442c60fbdfe --- /dev/null +++ b/Modules/Core/ImageBase/src/otbVectorImage.cxx @@ -0,0 +1,31 @@ +/* + * 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 "otbVectorImage.h" + +namespace otb { + template class VectorImage<unsigned int, 2>; + template class VectorImage<int, 2>; + template class VectorImage<unsigned char, 2>; + template class VectorImage<char, 2>; + template class VectorImage<float, 2>; + template class VectorImage<double, 2>; +} + diff --git a/Modules/IO/ImageIO/include/otbImageFileReader.h b/Modules/IO/ImageIO/include/otbImageFileReader.h index da776603a313ee94fa952bd7b3675271c6e38dc5..a1b84de8bd7e0db463d2d8566e765dbceb4ab583 100644 --- a/Modules/IO/ImageIO/include/otbImageFileReader.h +++ b/Modules/IO/ImageIO/include/otbImageFileReader.h @@ -212,4 +212,17 @@ private: #include "otbImageFileReader.hxx" #endif +#include "otbImage.h" +#include "otbVectorImage.h" + +namespace otb { + extern template class ImageFileReader<Image<unsigned int, 2>>; + extern template class ImageFileReader<Image<int, 2>>; + extern template class ImageFileReader<Image<unsigned char, 2>>; + extern template class ImageFileReader<Image<char, 2>>; + extern template class ImageFileReader<Image<float, 2>>; + extern template class ImageFileReader<Image<double, 2>>; + // TODO add vector image +} + #endif // otbImageFileReader_h diff --git a/Modules/IO/ImageIO/include/otbImageFileWriter.h b/Modules/IO/ImageIO/include/otbImageFileWriter.h index 697363336b0466a54298247191075c0894ab80e3..53d44162504dd6b164edecf29e2cc6a77f06a45a 100644 --- a/Modules/IO/ImageIO/include/otbImageFileWriter.h +++ b/Modules/IO/ImageIO/include/otbImageFileWriter.h @@ -290,4 +290,17 @@ private: #include "otbImageFileWriter.hxx" #endif +#include "otbImage.h" +#include "otbVectorImage.h" + +namespace otb { + extern template class ImageFileWriter<otb::Image<unsigned int, 2>>; + extern template class ImageFileWriter<otb::Image<int, 2>>; + extern template class ImageFileWriter<otb::Image<unsigned char, 2>>; + extern template class ImageFileWriter<otb::Image<char, 2>>; + extern template class ImageFileWriter<otb::Image<float, 2>>; + extern template class ImageFileWriter<otb::Image<double, 2>>; + // TODO add vector image +} + #endif diff --git a/Modules/IO/ImageIO/src/CMakeLists.txt b/Modules/IO/ImageIO/src/CMakeLists.txt index 610e691c847a42370bc98b4005746a1f8ebcc5a7..62adbc60afb5bd7981801a42a3fe34fb7786128c 100644 --- a/Modules/IO/ImageIO/src/CMakeLists.txt +++ b/Modules/IO/ImageIO/src/CMakeLists.txt @@ -21,6 +21,8 @@ set(OTBImageIO_SRC otbImageIOFactory.cxx otbMultiImageFileWriter.cxx + otbImageFileReader.cxx + otbImageFileWriter.cxx ) add_library(OTBImageIO ${OTBImageIO_SRC}) diff --git a/Modules/IO/ImageIO/src/otbImageFileReader.cxx b/Modules/IO/ImageIO/src/otbImageFileReader.cxx new file mode 100644 index 0000000000000000000000000000000000000000..7ebe0611cdc400570ad1dacd99c066d3d7b681f7 --- /dev/null +++ b/Modules/IO/ImageIO/src/otbImageFileReader.cxx @@ -0,0 +1,30 @@ +/* + * 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 "otbImageFileReader.h" + +namespace otb { + template class ImageFileReader<otb::Image<unsigned int, 2>>; + template class ImageFileReader<otb::Image<int, 2>>; + template class ImageFileReader<otb::Image<unsigned char, 2>>; + template class ImageFileReader<otb::Image<char, 2>>; + template class ImageFileReader<otb::Image<float, 2>>; + template class ImageFileReader<otb::Image<double, 2>>; +} diff --git a/Modules/IO/ImageIO/src/otbImageFileWriter.cxx b/Modules/IO/ImageIO/src/otbImageFileWriter.cxx new file mode 100644 index 0000000000000000000000000000000000000000..8913fb0564edde7126f44c17b409e4d1d6155768 --- /dev/null +++ b/Modules/IO/ImageIO/src/otbImageFileWriter.cxx @@ -0,0 +1,30 @@ +/* + * 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 "otbImageFileWriter.h" + +namespace otb { + template class ImageFileWriter<Image<unsigned int, 2>>; + template class ImageFileWriter<Image<int, 2>>; + template class ImageFileWriter<Image<unsigned char, 2>>; + template class ImageFileWriter<Image<char, 2>>; + template class ImageFileWriter<Image<float, 2>>; + template class ImageFileWriter<Image<double, 2>>; +}