OTB  9.0.0
Orfeo Toolbox
otbConvertPixelBuffer.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1999-2011 Insight Software Consortium
3  * Copyright (C) 2005-2022 Centre National d'Etudes Spatiales (CNES)
4  *
5  * This file is part of Orfeo Toolbox
6  *
7  * https://www.orfeo-toolbox.org/
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  */
21 
22 #ifndef otbConvertPixelBuffer_h
23 #define otbConvertPixelBuffer_h
24 
25 #include <complex>
26 #include "itkObject.h"
27 #include "OTBImageBaseExport.h"
28 
29 namespace otb
30 {
45 template <typename InputPixelType, typename OutputPixelType, class OutputConvertTraits>
46 class OTBImageBase_EXPORT_TEMPLATE ConvertPixelBuffer
47 {
48 public:
49 
51  typedef typename OutputConvertTraits::ComponentType OutputComponentType;
52 
54  static void Convert(InputPixelType* inputData, int inputNumberOfComponents, OutputPixelType* outputData, size_t size);
55  static void ConvertVectorImage(InputPixelType* inputData, int inputNumberOfComponents, OutputPixelType* outputData, size_t size);
56  static void ConvertComplexVectorImageToVectorImage(std::complex<InputPixelType>* inputData, int inputNumberOfComponents, OutputPixelType* outputData,
57  size_t size);
58  static void ConvertComplexVectorImageToVectorImageComplex(std::complex<InputPixelType>* inputData, int inputNumberOfComponents, OutputPixelType* outputData,
59  size_t size);
61 
62  static void ConvertComplexToGray(std::complex<InputPixelType>* inputData, int inputNumberOfComponents, OutputPixelType* outputData, size_t size);
63 
64 protected:
66  static void ConvertGrayToComplex(InputPixelType* inputData, OutputPixelType* OutputData, size_t size);
67 
68 private:
71 };
72 } // end namespace otb
73 
74 
75 #ifndef OTB_MANUAL_INSTANTIATION
77 #endif
78 
79 #endif // otbConvertPixelBuffer_h
otbConvertPixelBuffer.hxx
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::ConvertPixelBuffer
Class to convert blocks of data from one type to another.
Definition: otbConvertPixelBuffer.h:46
otb::ConvertPixelBuffer::OutputComponentType
OutputConvertTraits::ComponentType OutputComponentType
Definition: otbConvertPixelBuffer.h:51