OTB  10.0.0
Orfeo Toolbox
otbStreamingTraits.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2024 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
Interpolate an image at specified positions using bicubic interpolation.
Prolate interpolation of an otb::image.
itk::LinearInterpolateImageFunction< ImageType, double > LinearInterpolationType
WindowedSincInterpolateImageGaussianFunction< ImageType > GaussianInterpolationType
itk::NearestNeighborInterpolateImageFunction< ImageType, double > NearestNeighborInterpolationType
itk::InterpolateImageFunction< ImageType, double > InterpolationType
This class provides internal information for streamable filters.
itk::InterpolateImageFunction< ImageType, double > InterpolationType
itk::BSplineInterpolateImageFunction< ImageType, double > BSplineInterpolationType
itk::NearestNeighborInterpolateImageFunction< ImageType, double > NearestNeighborInterpolationType
ProlateInterpolateImageFunction< ImageType > ProlateInterpolationType
itk::LinearInterpolateImageFunction< ImageType, double > LinearInterpolationType
BCOInterpolateImageFunction< ImageType > BCOInterpolationType
WindowedSincInterpolateImageHammingFunction< ImageType > HammingInterpolationType
WindowedSincInterpolateImageBlackmanFunction< ImageType > BlackmanInterpolationType
WindowedSincInterpolateImageLanczosFunction< ImageType > LanczosInterpolationType
WindowedSincInterpolateImageCosineFunction< ImageType > CosineInterpolationType
WindowedSincInterpolateImageWelchFunction< ImageType > WelchInterpolationType
WindowedSincInterpolateImageGaussianFunction< ImageType > GaussianInterpolationType
Creation of an "otb" vector image which contains metadata.
Use the WindowedSincInterpolateImageFunctionBase with a Blackman Function.
Use the WindowedSincInterpolateImageFunctionBase with a Cosine Function.
Use the WindowedSincInterpolateImageFunctionBase with a Gaussian Function.
Use the WindowedSincInterpolateImageFunctionBase with a Hamming Function.
Use the WindowedSincInterpolateImageFunctionBase with a Lanczos Function.
Use the WindowedSincInterpolateImageFunctionBase with a Welch Function.
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.