OTB  9.0.0
Orfeo Toolbox
otbCompositeTransform.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 otbCompositeTransform_h
22 #define otbCompositeTransform_h
23 
24 #include <sstream>
25 #include <stdio.h>
26 #include "otbTransform.h"
27 #include "itkMacro.h"
28 
29 namespace otb
30 {
31 
44 // typedef enum
45 //{
46 // PROJDEFAULT=0,
47 // PROJIDENTITY=1,
48 // PROJMAPFORWARD=2,
49 // PROJMAPINVERSE=3,
50 // PROJSENSORFORWARD=4,
51 // PROJSENSORINVERSE=5
52 //} ProjectionTypeEnum;
53 
54 template <class TFirstTransform, class TSecondTransform, class TScalarType = typename TFirstTransform::ScalarType,
55  unsigned int NInputDimensions = TFirstTransform::InputSpaceDimension,
56  unsigned int NOutputDimensions = TSecondTransform::OutputSpaceDimension>
57 class ITK_EXPORT CompositeTransform : public Transform<TScalarType, // Data type for scalars
58  NInputDimensions, // Number of dimensions in the input space
59  NOutputDimensions> // Number of dimensions in the output space
60 {
61 public:
65  typedef itk::SmartPointer<Self> Pointer;
66  typedef itk::SmartPointer<const Self> ConstPointer;
67 
68  typedef TFirstTransform FirstTransformType;
69  typedef typename TFirstTransform::Pointer FirstTransformPointerType;
70  typedef TSecondTransform SecondTransformType;
71  typedef typename TSecondTransform::Pointer SecondTransformPointerType;
72 
74  // typedef typename TFirstTransform::InputVectorType FirstTransformInputVectorType;
75  // typedef typename TFirstTransform::OutputVectorType FirstTransformOutputVectorType;
76 
78  // typedef typename TFirstTransform::InputCovariantVectorType FirstTransformInputCovariantVectorType;
79  // typedef typename TFirstTransform::OutputCovariantVectorType FirstTransformOutputCovariantVectorType;
80 
82  // typedef typename TFirstTransform::InputVnlVectorType FirstTransformInputVnlVectorType;
83  // typedef typename TFirstTransform::OutputVnlVectorType FirstTransformOutputVnlVectorType;
84 
87  typedef typename TFirstTransform::OutputPointType FirstTransformOutputPointType;
88 
93 
95  itkNewMacro(Self);
96 
98  itkTypeMacro(CompositeTransform, Transform);
99 
100  itkStaticConstMacro(InputSpaceDimension, unsigned int, NInputDimensions);
101  itkStaticConstMacro(OutputSpaceDimension, unsigned int, NOutputDimensions);
102  itkStaticConstMacro(SpaceDimension, unsigned int, NInputDimensions);
103  itkStaticConstMacro(ParametersDimension, unsigned int, NInputDimensions*(NInputDimensions + 1));
104 
106  itkSetObjectMacro(FirstTransform, FirstTransformType);
107 
109  itkSetObjectMacro(SecondTransform, SecondTransformType);
110 
112  itkGetConstReferenceMacro(FirstTransform, FirstTransformPointerType);
113  itkGetConstReferenceMacro(SecondTransform, SecondTransformPointerType);
115 
117  SecondTransformOutputPointType TransformPoint(const FirstTransformInputPointType&) const override;
118 
120  // virtual OutputVectorType TransformVector(const InputVectorType &) const;
121 
123  // virtual OutputVnlVectorType TransformVector(const InputVnlVectorType &) const;
124 
126  // virtual OutputCovariantVectorType TransformCovariantVector(const InputCovariantVectorType &) const;
127 
128 protected:
130  ~CompositeTransform() override;
131 
134 
135 private:
136  CompositeTransform(const Self&) = delete;
137  void operator=(const Self&) = delete;
138 };
139 
140 } // namespace otb
141 
142 #ifndef OTB_MANUAL_INSTANTIATION
143 #include "otbCompositeTransform.hxx"
144 #endif
145 
146 #endif
otb::CompositeTransform::SecondTransformType
TSecondTransform SecondTransformType
Definition: otbCompositeTransform.h:70
otb::CompositeTransform::SecondTransformOutputPointType
Superclass::OutputPointType SecondTransformOutputPointType
Definition: otbCompositeTransform.h:92
otb::CompositeTransform::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbCompositeTransform.h:65
otbTransform.h
otb::Transform::OutputPointType
itk::Point< TScalarType, NOutputDimensions > OutputPointType
Definition: otbTransform.h:95
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::Transform::InputPointType
itk::Point< TScalarType, NInputDimensions > InputPointType
Definition: otbTransform.h:94
otb::CompositeTransform::FirstTransformOutputPointType
TFirstTransform::OutputPointType FirstTransformOutputPointType
Definition: otbCompositeTransform.h:87
otb::CompositeTransform::m_FirstTransform
FirstTransformPointerType m_FirstTransform
Definition: otbCompositeTransform.h:132
otbCompositeTransform.hxx
otb::CompositeTransform::FirstTransformType
TFirstTransform FirstTransformType
Definition: otbCompositeTransform.h:68
otb::CompositeTransform::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbCompositeTransform.h:66
otb::Transform
Class to overload method passed to virtual pure in ITK V4.
Definition: otbTransform.h:39
otb::CompositeTransform::FirstTransformPointerType
TFirstTransform::Pointer FirstTransformPointerType
Definition: otbCompositeTransform.h:69
otb::CompositeTransform::SecondTransformPointerType
TSecondTransform::Pointer SecondTransformPointerType
Definition: otbCompositeTransform.h:71
otb::CompositeTransform::Superclass
Transform< TScalarType, NInputDimensions, NOutputDimensions > Superclass
Definition: otbCompositeTransform.h:63
otb::CompositeTransform::Self
CompositeTransform Self
Definition: otbCompositeTransform.h:64
otb::CompositeTransform
Class which compose two itk::Transform to obtain one itk::Transform T1 T2 T3 (x, y) -> (x',...
Definition: otbCompositeTransform.h:57
otb::CompositeTransform::m_SecondTransform
SecondTransformPointerType m_SecondTransform
Definition: otbCompositeTransform.h:133
otb::CompositeTransform::FirstTransformInputPointType
Superclass::InputPointType FirstTransformInputPointType
Definition: otbCompositeTransform.h:86