TiePointsLocator.h
Go to the documentation of this file.
1 /* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2 
3  This file is part of the TerraLib - a Framework for building GIS enabled applications.
4 
5  TerraLib is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  TerraLib is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with TerraLib. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@terralib.org>.
18  */
19 
20 /*!
21  \file terralib/rp/TiePointsLocator.h
22  \brief TiePointsLocator locator.
23  */
24 
25 #ifndef __TERRALIB_RP_INTERNAL_TIEPOINTSLOCATOR_H
26 #define __TERRALIB_RP_INTERNAL_TIEPOINTSLOCATOR_H
27 
28 #include "Algorithm.h"
31 #include "../geometry/GeometricTransformation.h"
32 #include "../geometry/GTParameters.h"
33 
34 #include <vector>
35 #include <memory>
36 
37 namespace te
38 {
39  namespace rp
40  {
41  /*!
42  \class TiePointsLocator
43  \brief Tie points locator.
44  \details Designed to find tie-points inside raster areas.
45  \ingroup rp_match
46  */
48  {
49  public:
50 
51  /*!
52  \class InputParameters
53  \brief TiePointsLocator input parameters
54  */
56 
57  /*!
58  \class OutputParameters
59  \brief TiePointsLocator output parameters
60  */
62  {
63  public:
64 
65  std::vector< te::gm::GTParameters::TiePoint > m_tiePoints; //!< The generated tie-points (te::gm::GTParameters::TiePoint::first are raster 1 line/column indexes, te::gm::GTParameters::TiePoint::second are raster 2 line/column indexes).
66 
67  std::vector< double > m_tiePointsWeights; //!< The generated tie-points weights.
68 
69  std::unique_ptr< te::gm::GeometricTransformation > m_transformationPtr; //!< The generated geometric transformation with the base mininum required tie-points set ( depending on the tie-points, a valid transformation may not exist, in this case, this pointer will be null).
70 
72 
74 
76 
77  //overload
78  void reset() throw( te::rp::Exception );
79 
80  //overload
81  const OutputParameters& operator=( const OutputParameters& params );
82 
83  //overload
84  AbstractParameters* clone() const;
85  };
86 
88 
90 
91  //overload
92  bool execute( AlgorithmOutputParameters& outputParams ) throw( te::rp::Exception );
93 
94  //overload
95  void reset() throw( te::rp::Exception );
96 
97  //overload
98  bool initialize( const AlgorithmInputParameters& inputParams ) throw( te::rp::Exception );
99 
100  bool isInitialized() const;
101 
102  protected:
103 
104  TiePointsLocator::InputParameters m_inputParameters; //!< TiePointsLocator input execution parameters.
105 
106  bool m_isInitialized; //!< Tells if this instance is initialized.
107 
108  /*!
109  \brief Convert matched interest points to tie-points
110  \param matchedInterestPoints The matched interest points.
111  \param tiePoints The generated tie-points.
112  \param tiePointsWeights The generated tie-points weights.
113  */
114  void convertMatchedInterestPoints2TiePoints(
115  const te::rp::TiePointsLocatorStrategy::MatchedInterestPointsSetT& matchedInterestPoints,
116  std::vector< te::gm::GTParameters::TiePoint >& tiePoints,
117  std::vector< double >& tiePointsWeights );
118 
119  };
120 
121  } // end namespace rp
122 } // end namespace te
123 
124 #endif
125 
te::rp::TiePointsLocator::InputParameters
TiePointsLocatorInputParameters InputParameters
Definition: TiePointsLocator.h:55
te::rp::TiePointsLocator::OutputParameters::reset
void reset()
Clear all internal allocated resources and reset the parameters instance to its initial state.
te
TerraLib.
Definition: AddressGeocodingOp.h:52
te::rp::AlgorithmOutputParameters
Raster Processing algorithm output parameters base interface.
Definition: AlgorithmOutputParameters.h:40
te::rp::TiePointsLocator::OutputParameters::m_transformationPtr
std::unique_ptr< te::gm::GeometricTransformation > m_transformationPtr
The generated geometric transformation with the base mininum required tie-points set ( depending on t...
Definition: TiePointsLocator.h:69
te::rp::AlgorithmInputParameters
Raster Processing algorithm input parameters base interface.
Definition: AlgorithmInputParameters.h:40
te::rp::TiePointsLocator::OutputParameters::m_tiePoints
std::vector< te::gm::GTParameters::TiePoint > m_tiePoints
The generated tie-points (te::gm::GTParameters::TiePoint::first are raster 1 line/column indexes,...
Definition: TiePointsLocator.h:65
te::rp::TiePointsLocator::OutputParameters::OutputParameters
OutputParameters()
te::rp::Algorithm
Raster Processing algorithm base interface.
Definition: Algorithm.h:42
TiePointsLocatorStrategy.h
Tie-Pointsr locator strategy.
te::Exception
Base exception class for plugin module.
Definition: Exception.h:42
te::rp::TiePointsLocator::OutputParameters::m_tiePointsWeights
std::vector< double > m_tiePointsWeights
The generated tie-points weights.
Definition: TiePointsLocator.h:67
TERPEXPORT
#define TERPEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:139
te::rp::TiePointsLocator::OutputParameters::OutputParameters
OutputParameters(const OutputParameters &)
te::rp::TiePointsLocator::OutputParameters
TiePointsLocator output parameters.
Definition: TiePointsLocator.h:62
te::rp::TiePointsLocatorStrategy
Tie-points locator strategy.
Definition: TiePointsLocatorStrategy.h:53
Algorithm.h
Abstract algorithm.
te::rp::TiePointsLocator::OutputParameters::~OutputParameters
~OutputParameters()
te::rp::TiePointsLocatorInputParameters
TiePointsLocator input parameters.
Definition: TiePointsLocatorInputParameters.h:49
TiePointsLocatorInputParameters.h
TiePointsLocator input parameters.
te::rp::TiePointsLocator
Tie points locator.
Definition: TiePointsLocator.h:48