Orfeo Toolbox  3.16
otbStreamingResampleImageFilter.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 __otbStreamingResampleImageFilter_h
19 #define __otbStreamingResampleImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
26 #include "otbImage.h"
27 #include "itkVector.h"
28 
29 #include "otbMacro.h"
30 
31 namespace otb
32 {
33 
54 template <class TInputImage, class TOutputImage,
55  class TInterpolatorPrecisionType = double>
57  public itk::ImageToImageFilter<TInputImage, TOutputImage>
58 {
59 public:
65 
67  itkNewMacro(Self);
68 
71 
73  typedef TInputImage InputImageType;
74  typedef TOutputImage OutputImageType;
75 
77  typedef itk::Vector<double,
78  TOutputImage::ImageDimension> DeformationType;
80 
85 
95 
98  TInterpolatorPrecisionType> InterpolatorType;
101  TInterpolatorPrecisionType> DefaultInterpolatorType;
102 
105 
106 
108  void SetTransform(TransformType * transform)
109  {
110  m_DeformationFilter->SetTransform(transform);
111  this->Modified();
112  }
113  otbGetObjectMemberConstMacro(DeformationFilter, Transform, const TransformType*);
114 
116  void SetDeformationFieldSpacing(const SpacingType & spacing)
117  {
118  m_DeformationFilter->SetOutputSpacing(spacing);
119  this->Modified();
120  }
121  const SpacingType & GetDeformationFieldSpacing() const
122  {
123  return m_DeformationFilter->GetOutputSpacing();
124  }
125 
127  // Output Origin
128  void SetOutputOrigin(const OriginType & origin)
129  {
130  m_DeformationFilter->SetOutputOrigin(origin);
131  m_WarpFilter->SetOutputOrigin(origin);
132  this->Modified();
133  }
134  otbGetObjectMemberConstReferenceMacro(WarpFilter, OutputOrigin, OriginType);
135 
136  // Output Start index
137  otbSetObjectMemberMacro(WarpFilter, OutputStartIndex, IndexType);
138  otbGetObjectMemberConstReferenceMacro(WarpFilter, OutputStartIndex, IndexType);
139 
140  // Output Size
141  otbSetObjectMemberMacro(WarpFilter, OutputSize, SizeType);
142  otbGetObjectMemberConstReferenceMacro(WarpFilter, OutputSize, SizeType);
143 
144  // Output Spacing
145  otbSetObjectMemberMacro(WarpFilter, OutputSpacing, SpacingType);
146  otbGetObjectMemberConstReferenceMacro(WarpFilter, OutputSpacing, SpacingType);
147 
149  void SetInterpolator(InterpolatorType * interpolator)
150  {
151  m_WarpFilter->SetInterpolator(interpolator);
152  this->Modified();
153  }
154  otbGetObjectMemberConstMacro(WarpFilter, Interpolator, const InterpolatorType *);
155 
157  otbSetObjectMemberMacro(WarpFilter,
158  EdgePaddingValue,
159  typename OutputImageType::PixelType);
160  otbGetObjectMemberMacro(WarpFilter,
161  EdgePaddingValue,
162  typename OutputImageType::PixelType);
163 
165  void SetOutputParametersFromImage(const ImageBaseType * image);
166 
167 protected:
169 
172 
173  virtual void GenerateData();
174 
175  virtual void GenerateOutputInformation();
176 
177  virtual void GenerateInputRequestedRegion();
178 
179  void PrintSelf(std::ostream& os, itk::Indent indent) const;
180 
181 private:
182  StreamingResampleImageFilter(const Self &); //purposely not implemented
183  void operator =(const Self&); //purposely not implemented
184 
187 };
188 
189 } // namespace otb
190 
191 #ifndef OTB_MANUAL_INSTANTIATION
193 #endif
194 
195 #endif

Generated at Sun May 19 2013 00:51:43 for Orfeo Toolbox with doxygen 1.8.3.1