OTB  9.0.0
Orfeo Toolbox
otbLandmark.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 otbLandmark_h
22 #define otbLandmark_h
23 
24 #include "itkDataObject.h"
25 #include "otbMacro.h"
26 #include "itkObjectFactory.h"
27 
28 namespace otb
29 {
39 template <class TPoint, class TPointData, class TLandmarkData = TPointData>
40 class ITK_EXPORT Landmark : public itk::DataObject
41 {
42 public:
44  typedef Landmark Self;
45  typedef itk::DataObject Superclass;
46  typedef itk::SmartPointer<Self> Pointer;
47  typedef itk::SmartPointer<const Self> ConstPointer;
48 
50  itkNewMacro(Self);
51  itkTypeMacro(Landmark, DataObject);
52 
54  typedef TPoint PointType;
55  typedef TPointData PointDataType;
56  typedef TLandmarkData LandmarkDataType;
57 
59  itkSetMacro(Point1, PointType);
60  itkGetConstReferenceMacro(Point1, PointType);
61  itkSetMacro(PointData1, PointDataType);
62  itkGetConstReferenceMacro(PointData1, PointDataType);
63  itkSetMacro(Point2, PointType);
64  itkGetConstReferenceMacro(Point2, PointType);
65  itkSetMacro(PointData2, PointDataType);
66  itkGetConstReferenceMacro(PointData2, PointDataType);
67  itkSetMacro(LandmarkData, LandmarkDataType);
68  itkGetConstReferenceMacro(LandmarkData, LandmarkDataType);
69 
70 protected:
73  {
74  }
76  ~Landmark() override
77  {
78  }
80  void PrintSelf(std::ostream& os, itk::Indent indent) const override
81  {
82  Superclass::PrintSelf(os, indent);
83  os << indent << "Landmark: P1= " << m_Point1 << " P2= " << m_Point2 << std::endl;
84  }
85 
86 private:
87  Landmark(const Self&) = delete;
88  void operator=(const Self&) = delete;
89 
100 };
101 } // end namespace otb
102 #endif
otb::Landmark::m_PointData2
PointDataType m_PointData2
Second landmark point data.
Definition: otbLandmark.h:97
otb::Landmark::m_LandmarkData
LandmarkDataType m_LandmarkData
Landmark data.
Definition: otbLandmark.h:99
otb::Landmark::Superclass
itk::DataObject Superclass
Definition: otbLandmark.h:45
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::Landmark::~Landmark
~Landmark() override
Destructor.
Definition: otbLandmark.h:76
otb::Landmark::PointType
TPoint PointType
template typedefs
Definition: otbLandmark.h:51
otbMacro.h
otb::Landmark::Landmark
Landmark()
Constructor.
Definition: otbLandmark.h:72
otb::Landmark::LandmarkDataType
TLandmarkData LandmarkDataType
Definition: otbLandmark.h:56
otb::Landmark::PrintSelf
void PrintSelf(std::ostream &os, itk::Indent indent) const override
PrintSelf method.
Definition: otbLandmark.h:80
otb::Landmark::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbLandmark.h:47
otb::Landmark::m_Point2
PointType m_Point2
Second landmark point.
Definition: otbLandmark.h:93
otb::Landmark::m_Point1
PointType m_Point1
First landmark point.
Definition: otbLandmark.h:91
otb::Landmark::Self
Landmark Self
standard class typedefs
Definition: otbLandmark.h:44
otb::Landmark::m_PointData1
PointDataType m_PointData1
First landmark point data.
Definition: otbLandmark.h:95
otb::Landmark
This class represent point and point data binary matching.
Definition: otbLandmark.h:40
otb::Landmark::PointDataType
TPointData PointDataType
Definition: otbLandmark.h:55
otb::Landmark::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbLandmark.h:46