OTB  9.0.0
Orfeo Toolbox
otbStreamingTraits.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2022 Centre National d'Etudes Spatiales (CNES)
3  *
4  * This file is part of Orfeo Toolbox
5  *
6  * https://www.orfeo-toolbox.org/
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */
20 
21 #ifndef otbStreamingTraits_h
22 #define otbStreamingTraits_h
23 
24 #include "otbMacro.h"
25 
26 #include "itkBSplineInterpolateImageFunction.h"
27 #include "itkLinearInterpolateImageFunction.h"
28 #include "itkNearestNeighborInterpolateImageFunction.h"
36 
38 
39 namespace otb
40 {
41 
54 template <class TImage>
55 class ITK_EXPORT StreamingTraits
56 {
57 public:
60  typedef TImage ImageType;
61 
63  itkStaticConstMacro(ImageDimension, unsigned int, ImageType::ImageDimension);
64 
65  // ITK Interpolators
66  typedef itk::InterpolateImageFunction<ImageType, double> InterpolationType;
67  typedef itk::BSplineInterpolateImageFunction<ImageType, double> BSplineInterpolationType;
68  typedef itk::LinearInterpolateImageFunction<ImageType, double> LinearInterpolationType;
69  typedef itk::NearestNeighborInterpolateImageFunction<ImageType, double> NearestNeighborInterpolationType;
70 
71  // OTB Interpolators (supported for otb::Image)
80 
81  static unsigned int CalculateNeededRadiusForInterpolator(const InterpolationType* interpolator);
82 };
83 
96 template <typename TPixel, unsigned int VImageDimension>
97 class ITK_EXPORT StreamingTraits<otb::VectorImage<TPixel, VImageDimension>>
98 {
99 public:
103 
105  itkStaticConstMacro(ImageDimension, unsigned int, ImageType::ImageDimension);
106 
107  // ITK Interpolators
108  typedef itk::InterpolateImageFunction<ImageType, double> InterpolationType;
109  typedef itk::LinearInterpolateImageFunction<ImageType, double> LinearInterpolationType;
110  typedef itk::NearestNeighborInterpolateImageFunction<ImageType, double> NearestNeighborInterpolationType;
111 
112  // OTB Interpolators (supported for otb::VectorImage)
115 
116  static unsigned int CalculateNeededRadiusForInterpolator(const InterpolationType* interpolator);
117 };
118 
119 
120 } // End namespace otb
121 
122 #ifndef OTB_MANUAL_INSTANTIATION
123 #include "otbStreamingTraits.hxx"
124 #endif
125 
126 #endif
otb::StreamingTraits::NearestNeighborInterpolationType
itk::NearestNeighborInterpolateImageFunction< ImageType, double > NearestNeighborInterpolationType
Definition: otbStreamingTraits.h:69
otbWindowedSincInterpolateImageGaussianFunction.h
otb::StreamingTraits< otb::VectorImage< TPixel, VImageDimension > >::NearestNeighborInterpolationType
itk::NearestNeighborInterpolateImageFunction< ImageType, double > NearestNeighborInterpolationType
Definition: otbStreamingTraits.h:110
otb::StreamingTraits::BlackmanInterpolationType
WindowedSincInterpolateImageBlackmanFunction< ImageType > BlackmanInterpolationType
Definition: otbStreamingTraits.h:77
otbWindowedSincInterpolateImageWelchFunction.h
otbStreamingTraits.hxx
otb::StreamingTraits::ImageType
TImage ImageType
Definition: otbStreamingTraits.h:60
otb::WindowedSincInterpolateImageGaussianFunction
Use the WindowedSincInterpolateImageFunctionBase with a Gaussian Function.
Definition: otbWindowedSincInterpolateImageGaussianFunction.h:94
otb::StreamingTraits::InterpolationType
itk::InterpolateImageFunction< ImageType, double > InterpolationType
Definition: otbStreamingTraits.h:66
otb::WindowedSincInterpolateImageWelchFunction
Use the WindowedSincInterpolateImageFunctionBase with a Welch Function.
Definition: otbWindowedSincInterpolateImageWelchFunction.h:94
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otbBCOInterpolateImageFunction.h
otbWindowedSincInterpolateImageBlackmanFunction.h
otbWindowedSincInterpolateImageLanczosFunction.h
otbMacro.h
otbWindowedSincInterpolateImageCosineFunction.h
otb::StreamingTraits::BCOInterpolationType
BCOInterpolateImageFunction< ImageType > BCOInterpolationType
Definition: otbStreamingTraits.h:79
otb::StreamingTraits< otb::VectorImage< TPixel, VImageDimension > >::LinearInterpolationType
itk::LinearInterpolateImageFunction< ImageType, double > LinearInterpolationType
Definition: otbStreamingTraits.h:109
otb::StreamingTraits
This class provides internal information for streamable filters.
Definition: otbStreamingTraits.h:55
otbWindowedSincInterpolateImageHammingFunction.h
otb::WindowedSincInterpolateImageCosineFunction
Use the WindowedSincInterpolateImageFunctionBase with a Cosine Function.
Definition: otbWindowedSincInterpolateImageCosineFunction.h:94
otb::WindowedSincInterpolateImageLanczosFunction
Use the WindowedSincInterpolateImageFunctionBase with a Lanczos Function.
Definition: otbWindowedSincInterpolateImageLanczosFunction.h:105
otb::StreamingTraits::LanczosInterpolationType
WindowedSincInterpolateImageLanczosFunction< ImageType > LanczosInterpolationType
Definition: otbStreamingTraits.h:76
otb::StreamingTraits< otb::VectorImage< TPixel, VImageDimension > >::ImageType
otb::VectorImage< TPixel, VImageDimension > ImageType
Definition: otbStreamingTraits.h:102
otb::StreamingTraits::LinearInterpolationType
itk::LinearInterpolateImageFunction< ImageType, double > LinearInterpolationType
Definition: otbStreamingTraits.h:68
otb::StreamingTraits::Self
StreamingTraits Self
Definition: otbStreamingTraits.h:59
otb::StreamingTraits::WelchInterpolationType
WindowedSincInterpolateImageWelchFunction< ImageType > WelchInterpolationType
Definition: otbStreamingTraits.h:75
otb::StreamingTraits< otb::VectorImage< TPixel, VImageDimension > >::InterpolationType
itk::InterpolateImageFunction< ImageType, double > InterpolationType
Definition: otbStreamingTraits.h:108
otb::WindowedSincInterpolateImageHammingFunction
Use the WindowedSincInterpolateImageFunctionBase with a Hamming Function.
Definition: otbWindowedSincInterpolateImageHammingFunction.h:95
otb::StreamingTraits::ProlateInterpolationType
ProlateInterpolateImageFunction< ImageType > ProlateInterpolationType
Definition: otbStreamingTraits.h:78
otb::BCOInterpolateImageFunction
Interpolate an image at specified positions using bicubic interpolation.
Definition: otbBCOInterpolateImageFunction.h:151
otb::StreamingTraits< otb::VectorImage< TPixel, VImageDimension > >::GaussianInterpolationType
WindowedSincInterpolateImageGaussianFunction< ImageType > GaussianInterpolationType
Definition: otbStreamingTraits.h:113
otb::StreamingTraits::BSplineInterpolationType
itk::BSplineInterpolateImageFunction< ImageType, double > BSplineInterpolationType
Definition: otbStreamingTraits.h:67
otb::WindowedSincInterpolateImageBlackmanFunction
Use the WindowedSincInterpolateImageFunctionBase with a Blackman Function.
Definition: otbWindowedSincInterpolateImageBlackmanFunction.h:101
otbProlateInterpolateImageFunction.h
otb::StreamingTraits::HammingInterpolationType
WindowedSincInterpolateImageHammingFunction< ImageType > HammingInterpolationType
Definition: otbStreamingTraits.h:74
otb::StreamingTraits< otb::VectorImage< TPixel, VImageDimension > >::Self
StreamingTraits Self
Definition: otbStreamingTraits.h:101
otb::StreamingTraits::GaussianInterpolationType
WindowedSincInterpolateImageGaussianFunction< ImageType > GaussianInterpolationType
Definition: otbStreamingTraits.h:72
otb::StreamingTraits::CosineInterpolationType
WindowedSincInterpolateImageCosineFunction< ImageType > CosineInterpolationType
Definition: otbStreamingTraits.h:73
otb::VectorImage
Creation of an "otb" vector image which contains metadata.
Definition: otbVectorImage.h:45
otb::StreamingTraits< otb::VectorImage< TPixel, VImageDimension > >::BCOInterpolationType
BCOInterpolateImageFunction< ImageType > BCOInterpolationType
Definition: otbStreamingTraits.h:114
otb::ProlateInterpolateImageFunction
Prolate interpolation of an otb::image.
Definition: otbProlateInterpolateImageFunction.h:208