All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Register.h
Go to the documentation of this file.
1 /* Copyright (C) 2001-2009 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/Register.h
22  \brief Performs raster data registering into a SRS using a set of tie points.
23  */
24 
25 #ifndef __TERRALIB_RP_INTERNAL_REGISTER_H
26 #define __TERRALIB_RP_INTERNAL_REGISTER_H
27 
28 #include "Algorithm.h"
29 #include "../raster/Raster.h"
30 #include "../raster/Interpolator.h"
31 #include "../geometry/GTParameters.h"
32 
33 #include <vector>
34 #include <string>
35 #include <memory>
36 
37 namespace te
38 {
39  namespace rp
40  {
41  /*!
42  \class Register
43  \brief Performs raster data registering into a SRS using a set of tie points.
44  \ingroup rp
45  */
46  class TERPEXPORT Register : public Algorithm
47  {
48  public:
49 
50  /*!
51  \class InputParameters
52  \brief Register input parameters
53  */
55  {
56  public:
57 
58  te::rst::Raster const* m_inputRasterPtr; //!< Input raster.
59 
60  std::vector< unsigned int > m_inputRasterBands; //!< Bands to process from the input raster.
61 
62  std::vector< te::gm::GTParameters::TiePoint > m_tiePoints; //!< Tie-points between each raster point (te::gm::GTParameters::TiePoint::first are raster lines/columns ) and their respective coordinates under the chosen SRS (te::gm::GTParameters::TiePoint::second).
63 
64  int m_outputSRID; //!< The output raster SRID (default:0).
65 
66  double m_outputResolutionX; //!< The output raster X axis resolution (default:1).
67 
68  double m_outputResolutionY; //!< The output raster Y axis resolution (default:1).
69 
70  te::rst::Interpolator::Method m_interpMethod; //!< The raster interpolator method (default:NearestNeighbor).
71 
72  double m_noDataValue; //!< The pixel value used where no raster data is avaliable (defaul:0).
73 
74  std::string m_geomTransfName; //!< The name of the geometric transformation used (see each te::gm::GTFactory inherited classes to find each factory key/name, default:Affine).
75 
77 
79 
80  ~InputParameters();
81 
82  //overload
83  void reset() throw( te::rp::Exception );
84 
85  //overload
86  const InputParameters& operator=( const InputParameters& params );
87 
88  //overload
89  AbstractParameters* clone() const;
90  };
91 
92  /*!
93  \class OutputParameters
94  \brief Register output parameters
95  */
97  {
98  public:
99 
100  std::string m_rType; //!< Output raster data source type (as described in te::raster::RasterFactory ).
101 
102  std::map< std::string, std::string > m_rInfo; //!< The necessary information to create the output rasters (as described in te::raster::RasterFactory).
103 
104  std::auto_ptr< te::rst::Raster > m_outputRasterPtr; //!< The generated output registered raster.
105 
107 
109 
110  ~OutputParameters();
111 
112  //overload
113  void reset() throw( te::rp::Exception );
114 
115  //overload
116  const OutputParameters& operator=( const OutputParameters& params );
117 
118  //overload
119  AbstractParameters* clone() const;
120  };
121 
122  Register();
123 
124  ~Register();
125 
126  //overload
127  bool execute( AlgorithmOutputParameters& outputParams ) throw( te::rp::Exception );
128 
129  //overload
130  void reset() throw( te::rp::Exception );
131 
132  //overload
133  bool initialize( const AlgorithmInputParameters& inputParams ) throw( te::rp::Exception );
134 
135  bool isInitialized() const;
136 
137  protected:
138 
139  Register::InputParameters m_inputParameters; //!< Input execution parameters.
140 
141  bool m_isInitialized; //!< Tells if this instance is initialized.
142 
143 
144  };
145 
146  } // end namespace rp
147 } // end namespace te
148 
149 #endif
150 
te::rst::Interpolator::Method m_interpMethod
The raster interpolator method (default:NearestNeighbor).
Definition: Register.h:70
std::string m_geomTransfName
The name of the geometric transformation used (see each te::gm::GTFactory inherited classes to find e...
Definition: Register.h:74
std::string m_rType
Output raster data source type (as described in te::raster::RasterFactory ).
Definition: Register.h:100
Raster Processing algorithm base interface class.
double m_noDataValue
The pixel value used where no raster data is avaliable (defaul:0).
Definition: Register.h:72
te::rst::Raster const * m_inputRasterPtr
Input raster.
Definition: Register.h:58
Performs raster data registering into a SRS using a set of tie points.
Definition: Register.h:46
Raster Processing algorithm base interface.
Definition: Algorithm.h:42
Method
Allowed interpolation methods.
Definition: Interpolator.h:58
std::vector< te::gm::GTParameters::TiePoint > m_tiePoints
Tie-points between each raster point (te::gm::GTParameters::TiePoint::first are raster lines/columns ...
Definition: Register.h:62
Register output parameters.
Definition: Register.h:96
std::map< std::string, std::string > m_rInfo
The necessary information to create the output rasters (as described in te::raster::RasterFactory).
Definition: Register.h:102
Register input parameters.
Definition: Register.h:54
double m_outputResolutionY
The output raster Y axis resolution (default:1).
Definition: Register.h:68
double m_outputResolutionX
The output raster X axis resolution (default:1).
Definition: Register.h:66
Raster Processing algorithm output parameters base interface.
An abstract class for raster data strucutures.
Definition: Raster.h:70
int m_outputSRID
The output raster SRID (default:0).
Definition: Register.h:64
std::vector< unsigned int > m_inputRasterBands
Bands to process from the input raster.
Definition: Register.h:60
std::auto_ptr< te::rst::Raster > m_outputRasterPtr
The generated output registered raster.
Definition: Register.h:104
#define TERPEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:91
Raster Processing algorithm input parameters base interface.