SimpleITK  1.3.0.dev466
sitkWarpImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 *
3 * Copyright Insight Software Consortium
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18 #ifndef sitkWarpImageFilter_h
19 #define sitkWarpImageFilter_h
20 
21 /*
22  * WARNING: DO NOT EDIT THIS FILE!
23  * THIS FILE IS AUTOMATICALLY GENERATED BY THE SIMPLEITK BUILD PROCESS.
24  * Please look at sitkDualImageFilterTemplate.h.in to make changes.
25  */
26 
27 #include <memory>
28 
29 #include "sitkImageFilter.h"
31 #include "sitkBasicFilters.h"
32 
33 namespace itk {
34  namespace simple {
35 
66  public:
68 
70  virtual ~WarpImageFilter();
71 
75 
78 
79 
80 
84  SITK_RETURN_SELF_TYPE_HEADER SetInterpolator ( InterpolatorEnum Interpolator ) { this->m_Interpolator = Interpolator; return *this; }
85 
89  InterpolatorEnum GetInterpolator() const { return this->m_Interpolator; }
90 
94  SITK_RETURN_SELF_TYPE_HEADER SetOutputSize ( const std::vector<uint32_t> & OutputSize ) { this->m_OutputSize = OutputSize; return *this; }
95 
99  std::vector<uint32_t> GetOutputSize() const { return this->m_OutputSize; }
100 
104  SITK_RETURN_SELF_TYPE_HEADER SetOutputOrigin ( const std::vector<double> & OutputOrigin ) { this->m_OutputOrigin = OutputOrigin; return *this; }
105 
109  std::vector<double> GetOutputOrigin() const { return this->m_OutputOrigin; }
110 
114  SITK_RETURN_SELF_TYPE_HEADER SetOutputSpacing ( const std::vector<double> & OutputSpacing ) { this->m_OutputSpacing = OutputSpacing; return *this; }
115 
119  std::vector<double> GetOutputSpacing() const { return this->m_OutputSpacing; }
120 
124  SITK_RETURN_SELF_TYPE_HEADER SetOutputDirection ( std::vector<double> OutputDirection ) { this->m_OutputDirection = OutputDirection; return *this; }
125 
129  std::vector<double> GetOutputDirection() const { return this->m_OutputDirection; }
130 
134  SITK_RETURN_SELF_TYPE_HEADER SetEdgePaddingValue ( double EdgePaddingValue ) { this->m_EdgePaddingValue = EdgePaddingValue; return *this; }
135 
139  double GetEdgePaddingValue() const { return this->m_EdgePaddingValue; }
141  std::string GetName() const { return std::string ("WarpImageFilter"); }
142 
144  std::string ToString() const;
145 
146 
148  Image Execute ( const Image & image, const Image & displacementField );
149 
150 
152  Image Execute ( const Image & image, const Image & displacementField, InterpolatorEnum interpolator, const std::vector<uint32_t> & outputSize, const std::vector<double> & outputOrigin, const std::vector<double> & outputSpacing, std::vector<double> outputDirection, double edgePaddingValue );
153 
154 
156  void SetOutputParameteresFromImage(const Image & refImage );
157 
158 
159  private:
161  typedef Image (Self::*MemberFunctionType)( const Image * image, const Image * displacementField );
162 
163  friend struct detail::DualExecuteInternalAddressor<MemberFunctionType>;
164  template <class TImageType1, class TImageType2> Image DualExecuteInternal ( const Image * image, const Image * displacementField );
165  friend struct detail::DualExecuteInternalVectorAddressor<MemberFunctionType>;
166  template <class TImageType1, class TImageType2> Image DualExecuteInternalVector ( const Image * image, const Image * displacementField );
167 
168  nsstd::auto_ptr<detail::DualMemberFunctionFactory<MemberFunctionType> > m_DualMemberFactory;
169 
170 
171 
172  /* */
174  /* */
175  std::vector<uint32_t> m_OutputSize;
176  /* */
177  std::vector<double> m_OutputOrigin;
178  /* */
179  std::vector<double> m_OutputSpacing;
180  /* Passing a zero sized array, defaults to identiy matrix. The size of the array must exactly match the direction matrix for the dimension of the image. */
181  std::vector<double> m_OutputDirection;
183  };
184 
185 
186 
195  SITKBasicFilters_EXPORT Image Warp ( const Image & image, const Image & displacementField, InterpolatorEnum interpolator = itk::simple::sitkLinear, const std::vector<uint32_t> & outputSize = std::vector<uint32_t>(3, 0), const std::vector<double> & outputOrigin = std::vector<double>(3, 0.0), const std::vector<double> & outputSpacing = std::vector<double>(3, 1.0), std::vector<double> outputDirection = std::vector<double>(), double edgePaddingValue = 0.0 );
196 
197  }
198 }
199 #endif
Self & SetOutputSpacing(const std::vector< double > &OutputSpacing)
std::vector< double > GetOutputSpacing() const
Self & SetInterpolator(InterpolatorEnum Interpolator)
N-D linear interpolation.
#define SITKBasicFilters_EXPORT
typelist::MakeTypeList< BasicPixelID< int8_t >, BasicPixelID< uint8_t >, BasicPixelID< int16_t >, BasicPixelID< uint16_t >, BasicPixelID< int32_t >, BasicPixelID< uint32_t >, BasicPixelID< float >, BasicPixelID< double > >::Type BasicPixelIDTypeList
std::vector< uint32_t > GetOutputSize() const
InterpolatorEnum GetInterpolator() const
BasicPixelIDTypeList PixelIDTypeList
Self & SetOutputOrigin(const std::vector< double > &OutputOrigin)
Self & SetOutputDirection(std::vector< double > OutputDirection)
Warps an image using an input displacement field.
std::vector< double > GetOutputDirection() const
std::vector< uint32_t > m_OutputSize
std::vector< double > GetOutputOrigin() const
The Image class for SimpleITK.
Definition: sitkImage.h:78
std::vector< double > m_OutputSpacing
std::vector< double > m_OutputDirection
Image Warp(const Image &image, const Image &displacementField, InterpolatorEnum interpolator=itk::simple::sitkLinear, const std::vector< uint32_t > &outputSize=std::vector< uint32_t >(3, 0), const std::vector< double > &outputOrigin=std::vector< double >(3, 0.0), const std::vector< double > &outputSpacing=std::vector< double >(3, 1.0), std::vector< double > outputDirection=std::vector< double >(), double edgePaddingValue=0.0)
Warps an image using an input displacement field.
std::vector< double > m_OutputOrigin
Self & SetEdgePaddingValue(double EdgePaddingValue)
The base interface for SimpleITK filters that take one input image.
Self & SetOutputSize(const std::vector< uint32_t > &OutputSize)
nsstd::auto_ptr< detail::DualMemberFunctionFactory< MemberFunctionType > > m_DualMemberFactory