OTB  9.0.0
Orfeo Toolbox
otbLineOfSightOptimizer.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 otbLineOfSightOptimizer_h
22 #define otbLineOfSightOptimizer_h
23 
24 #include "itkObject.h"
25 
26 #include "itkPointSet.h"
27 
28 namespace otb
29 {
30 
41 template <class TPrecision = float, class TLabel = int>
42 class ITK_EXPORT LineOfSightOptimizer : public itk::Object
43 {
44 public:
47  typedef itk::Object Superclass;
48  typedef itk::SmartPointer<Self> Pointer;
49  typedef itk::SmartPointer<const Self> ConstPointer;
50 
52  itkNewMacro(Self);
53 
55  itkTypeMacro(LineOfSightOptimizer, itk::Object);
56 
58  typedef TPrecision PrecisionType;
59  typedef TLabel LabelType;
60  typedef itk::DefaultStaticMeshTraits<TLabel, 3, 3, TPrecision> MeshType;
61  typedef itk::PointSet<TLabel, 3, MeshType> PointSetType;
62  typedef typename PointSetType::PointType PointType;
63  typedef typename PointSetType::Pointer PointSetPointerType;
64  typedef typename PointSetType::PointsContainerConstIterator PointSetConstIteratorType;
65  typedef typename PointSetType::PointDataContainerIterator LabelIteratorType;
66 
67  typedef std::vector<TPrecision> ResidueType;
68 
72  PointType Compute(PointSetPointerType pointA, PointSetPointerType pointB);
73 
75  // itkGetMacro(Residues,ResidueType);
77  {
78  return m_Residues;
79  }
81 
83  itkGetMacro(GlobalResidue, PrecisionType);
84 
85 protected:
88 
90  ~LineOfSightOptimizer() override{};
91 
92 
93 private:
94  LineOfSightOptimizer(const Self&) = delete;
95  void operator=(const Self&) = delete;
96 
99 
102 
104  vnl_matrix<PrecisionType> m_InvCumul;
105  vnl_matrix<PrecisionType> m_Identity;
106  vnl_vector<PrecisionType> m_SecCumul;
107 };
108 } // end namespace otb
109 
110 #ifndef OTB_MANUAL_INSTANTIATION
112 #endif
113 
114 #endif
otb::LineOfSightOptimizer::m_Residues
ResidueType m_Residues
Definition: otbLineOfSightOptimizer.h:98
otb::LineOfSightOptimizer
Compute the position of a 3D point from a set of N lines of sight.
Definition: otbLineOfSightOptimizer.h:42
otb::LineOfSightOptimizer::GetResidues
ResidueType GetResidues()
Definition: otbLineOfSightOptimizer.h:76
otb::LineOfSightOptimizer::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbLineOfSightOptimizer.h:48
GapFilling::PrecisionType
double PrecisionType
Definition: otbDateUtils.h:29
otb::LineOfSightOptimizer::PointSetConstIteratorType
PointSetType::PointsContainerConstIterator PointSetConstIteratorType
Definition: otbLineOfSightOptimizer.h:64
otb::LineOfSightOptimizer::~LineOfSightOptimizer
~LineOfSightOptimizer() override
Definition: otbLineOfSightOptimizer.h:90
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::LineOfSightOptimizer::LabelIteratorType
PointSetType::PointDataContainerIterator LabelIteratorType
Definition: otbLineOfSightOptimizer.h:65
otb::LineOfSightOptimizer::m_GlobalResidue
PrecisionType m_GlobalResidue
Definition: otbLineOfSightOptimizer.h:101
otb::LineOfSightOptimizer::m_SecCumul
vnl_vector< PrecisionType > m_SecCumul
Definition: otbLineOfSightOptimizer.h:106
otb::LineOfSightOptimizer::m_Identity
vnl_matrix< PrecisionType > m_Identity
Definition: otbLineOfSightOptimizer.h:105
otb::LineOfSightOptimizer::MeshType
itk::DefaultStaticMeshTraits< TLabel, 3, 3, TPrecision > MeshType
Definition: otbLineOfSightOptimizer.h:60
otb::LineOfSightOptimizer::Superclass
itk::Object Superclass
Definition: otbLineOfSightOptimizer.h:47
otb::LineOfSightOptimizer::m_InvCumul
vnl_matrix< PrecisionType > m_InvCumul
Definition: otbLineOfSightOptimizer.h:104
otb::LineOfSightOptimizer::PointType
PointSetType::PointType PointType
Definition: otbLineOfSightOptimizer.h:62
otbLineOfSightOptimizer.hxx
otb::LineOfSightOptimizer::PointSetType
itk::PointSet< TLabel, 3, MeshType > PointSetType
Definition: otbLineOfSightOptimizer.h:61
otb::LineOfSightOptimizer::Self
LineOfSightOptimizer Self
Definition: otbLineOfSightOptimizer.h:46
otb::LineOfSightOptimizer::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbLineOfSightOptimizer.h:49
otb::LineOfSightOptimizer::PointSetPointerType
PointSetType::Pointer PointSetPointerType
Definition: otbLineOfSightOptimizer.h:63
otb::LineOfSightOptimizer::PrecisionType
TPrecision PrecisionType
Definition: otbLineOfSightOptimizer.h:55
otb::LineOfSightOptimizer::LabelType
TLabel LabelType
Definition: otbLineOfSightOptimizer.h:59
otb::LineOfSightOptimizer::ResidueType
std::vector< TPrecision > ResidueType
Definition: otbLineOfSightOptimizer.h:67