Orfeo Toolbox  4.0
otbImageToGenericRSOutputParameters.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ORFEO Toolbox
4  Language: C++
5  Date: $Date$
6  Version: $Revision$
7 
8 
9  Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
10  See OTBCopyright.txt for details.
11 
12 
13  This software is distributed WITHOUT ANY WARRANTY; without even
14  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  PURPOSE. See the above copyright notices for more information.
16 
17 =========================================================================*/
18 #ifndef __otbImageToGenericRSOutputParameters_h
19 #define __otbImageToGenericRSOutputParameters_h
20 
21 #include "itkObject.h"
22 #include "otbGenericRSTransform.h"
23 
24 namespace otb {
25 
48 template<class TImage>
50  public itk::Object
51 {
52 public:
58 
61 
63  itkNewMacro(Self);
64 
66  typedef TImage ImageType;
67  typedef typename ImageType::SizeType SizeType;
68  typedef typename ImageType::IndexType IndexType;
69  typedef typename ImageType::SpacingType SpacingType;
70  typedef typename ImageType::PointType PointType;
71 
75 
80  double minX;
81  double maxX;
82  double minY;
83  double maxY;
84  };
85 
87  itkSetConstObjectMacro(Input, ImageType);
88  itkGetConstObjectMacro(Input, ImageType);
89 
91  itkSetMacro(OutputOrigin, PointType);
92  itkGetMacro(OutputOrigin, PointType);
93 
95  itkSetMacro(OutputSpacing, SpacingType);
96  itkGetMacro(OutputSpacing, SpacingType);
97 
99  itkSetMacro(OutputSize, SizeType);
100  itkGetMacro(OutputSize, SizeType);
101 
103  itkSetMacro(EstimateIsotropicSpacing, bool);
104  itkGetMacro(EstimateIsotropicSpacing, bool);
105  itkBooleanMacro(EstimateIsotropicSpacing);
106 
111  void ForceSpacingTo(const SpacingType& spacing)
112  {
113  m_ForceSpacing = true;
114  this->SetOutputSpacing(spacing);
115  }
116 
121  void ForceSizeTo(const SizeType& size)
122  {
123  m_ForceSize = true;
124  this->SetOutputSize(size);
125  }
126 
133  void SetOutputProjectionRef(const std::string& ref)
134  {
135  m_Transform->SetInputProjectionRef(ref);
136  this->Modified();
137  }
138 
139  std::string GetInputProjectionRef() const
140  {
141  return m_Transform->GetOutputProjectionRef();
142  }
143 
146  {
147  m_Transform->SetOutputKeywordList(kwl);
148  this->Modified();
149  }
150 
152  {
153  return m_Transform->GetOutputKeywordList();
154  }
155 
157  void Compute();
158 
159 protected:
162 
163 private:
164  ImageToGenericRSOutputParameters(const Self&); //purposely not implemented
165  void operator=(const Self&); //purposely not implemented
166 
167  void UpdateTransform();
169  void EstimateOutputSpacing();
170  void EstimateOutputSize();
171  void EstimateOutputOrigin();
172 
173  typename ImageType::ConstPointer m_Input;
178 
180 
184 
185 }; // end of class ImageToGenericRSOutputParameters
186 
187 } // end of namespace otb
188 
189 #ifndef OTB_MANUAL_INSTANTIATION
191 #endif
192 
193 #endif

Generated at Sat Mar 8 2014 16:01:18 for Orfeo Toolbox with doxygen 1.8.3.1