SimpleITK  1.1.0
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 
72  public:
74 
76  virtual ~WarpImageFilter();
77 
81 
84 
85 
86 
90  SITK_RETURN_SELF_TYPE_HEADER SetInterpolator ( InterpolatorEnum Interpolator ) { this->m_Interpolator = Interpolator; return *this; }
91 
95  InterpolatorEnum GetInterpolator() const { return this->m_Interpolator; }
96 
100  SITK_RETURN_SELF_TYPE_HEADER SetOutputSize ( const std::vector<uint32_t> & OutputSize ) { this->m_OutputSize = OutputSize; return *this; }
101 
105  std::vector<uint32_t> GetOutputSize() const { return this->m_OutputSize; }
106 
110  SITK_RETURN_SELF_TYPE_HEADER SetOutputOrigin ( const std::vector<double> & OutputOrigin ) { this->m_OutputOrigin = OutputOrigin; return *this; }
111 
115  std::vector<double> GetOutputOrigin() const { return this->m_OutputOrigin; }
116 
120  SITK_RETURN_SELF_TYPE_HEADER SetOutputSpacing ( const std::vector<double> & OutputSpacing ) { this->m_OutputSpacing = OutputSpacing; return *this; }
121 
125  std::vector<double> GetOutputSpacing() const { return this->m_OutputSpacing; }
126 
130  SITK_RETURN_SELF_TYPE_HEADER SetOutputDirection ( std::vector<double> OutputDirection ) { this->m_OutputDirection = OutputDirection; return *this; }
131 
135  std::vector<double> GetOutputDirection() const { return this->m_OutputDirection; }
136 
140  SITK_RETURN_SELF_TYPE_HEADER SetEdgePaddingValue ( double EdgePaddingValue ) { this->m_EdgePaddingValue = EdgePaddingValue; return *this; }
141 
145  double GetEdgePaddingValue() const { return this->m_EdgePaddingValue; }
147  std::string GetName() const { return std::string ("WarpImageFilter"); }
148 
150  std::string ToString() const;
151 
152 
154  Image Execute ( const Image & image, const Image & displacementField );
155 
156 
158  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 );
159 
160 
162  void SetOutputParameteresFromImage(const Image & refImage );
163 
164 
165  private:
167  typedef Image (Self::*MemberFunctionType)( const Image * image, const Image * displacementField );
168 
169  friend struct detail::DualExecuteInternalAddressor<MemberFunctionType>;
170  template <class TImageType1, class TImageType2> Image DualExecuteInternal ( const Image * image, const Image * displacementField );
171  friend struct detail::DualExecuteInternalVectorAddressor<MemberFunctionType>;
172  template <class TImageType1, class TImageType2> Image DualExecuteInternalVector ( const Image * image, const Image * displacementField );
173 
174  nsstd::auto_ptr<detail::DualMemberFunctionFactory<MemberFunctionType> > m_DualMemberFactory;
175 
176 
177 
178  /* */
180  /* */
181  std::vector<uint32_t> m_OutputSize;
182  /* */
183  std::vector<double> m_OutputOrigin;
184  /* */
185  std::vector<double> m_OutputSpacing;
186  /* 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. */
187  std::vector<double> m_OutputDirection;
189  };
190 
191 
192 
201  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 );
202 
203  }
204 }
205 #endif
itk::simple::Image
The main Image class for SimpleITK.
Definition: sitkImage.h:54
sitkBasicFilters.h
itk::simple::sitkLinear
@ sitkLinear
N-D linear interpolation.
Definition: sitkInterpolator.h:39
itk::simple::WarpImageFilter::SetOutputDirection
Self & SetOutputDirection(std::vector< double > OutputDirection)
Definition: sitkWarpImageFilter.h:130
itk::simple::InterpolatorEnum
InterpolatorEnum
Definition: sitkInterpolator.h:30
itk::simple::WarpImageFilter::SetOutputSpacing
Self & SetOutputSpacing(const std::vector< double > &OutputSpacing)
Definition: sitkWarpImageFilter.h:120
itk::simple::WarpImageFilter::GetEdgePaddingValue
double GetEdgePaddingValue() const
Definition: sitkWarpImageFilter.h:145
itk::simple::WarpImageFilter
Warps an image using an input displacement field.
Definition: sitkWarpImageFilter.h:71
itk::simple::WarpImageFilter::GetName
std::string GetName() const
Definition: sitkWarpImageFilter.h:147
itk::simple::WarpImageFilter::m_OutputOrigin
std::vector< double > m_OutputOrigin
Definition: sitkWarpImageFilter.h:183
itk::simple::WarpImageFilter::SetInterpolator
Self & SetInterpolator(InterpolatorEnum Interpolator)
Definition: sitkWarpImageFilter.h:90
itk::simple::WarpImageFilter::GetOutputDirection
std::vector< double > GetOutputDirection() const
Definition: sitkWarpImageFilter.h:135
itk::simple::WarpImageFilter::PixelIDTypeList
BasicPixelIDTypeList PixelIDTypeList
Definition: sitkWarpImageFilter.h:83
itk::simple::BasicPixelIDTypeList
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
Definition: sitkPixelIDTypeLists.h:53
sitkImageFilter.h
itk::simple::WarpImageFilter::SetOutputOrigin
Self & SetOutputOrigin(const std::vector< double > &OutputOrigin)
Definition: sitkWarpImageFilter.h:110
itk::simple::WarpImageFilter::Self
WarpImageFilter Self
Definition: sitkWarpImageFilter.h:73
itk::simple::WarpImageFilter::SetEdgePaddingValue
Self & SetEdgePaddingValue(double EdgePaddingValue)
Definition: sitkWarpImageFilter.h:140
itk::simple::WarpImageFilter::GetOutputSize
std::vector< uint32_t > GetOutputSize() const
Definition: sitkWarpImageFilter.h:105
itk::simple::detail::DualExecuteInternalVectorAddressor
Definition: sitkDetail.h:75
itk::simple::WarpImageFilter::GetOutputSpacing
std::vector< double > GetOutputSpacing() const
Definition: sitkWarpImageFilter.h:125
itk::simple::WarpImageFilter::m_DualMemberFactory
nsstd::auto_ptr< detail::DualMemberFunctionFactory< MemberFunctionType > > m_DualMemberFactory
Definition: sitkWarpImageFilter.h:174
itk::simple::WarpImageFilter::m_Interpolator
InterpolatorEnum m_Interpolator
Definition: sitkWarpImageFilter.h:179
itk::simple::WarpImageFilter::m_OutputSize
std::vector< uint32_t > m_OutputSize
Definition: sitkWarpImageFilter.h:181
sitkDualMemberFunctionFactory.h
SITKBasicFilters_EXPORT
#define SITKBasicFilters_EXPORT
Definition: sitkBasicFilters.h:50
itk::simple::WarpImageFilter::m_EdgePaddingValue
double m_EdgePaddingValue
Definition: sitkWarpImageFilter.h:188
itk::simple::WarpImageFilter::m_OutputSpacing
std::vector< double > m_OutputSpacing
Definition: sitkWarpImageFilter.h:185
itk::simple::detail::DualExecuteInternalAddressor
Definition: sitkDetail.h:44
itk::simple::Warp
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.
itk::simple::WarpImageFilter::SetOutputSize
Self & SetOutputSize(const std::vector< uint32_t > &OutputSize)
Definition: sitkWarpImageFilter.h:100
itk
itk::simple::ImageFilter
The base interface for SimpleITK filters that take one input image.
Definition: sitkImageFilter.h:37
itk::simple::ProcessObject
Base class for SimpleITK classes based on ProcessObject.
Definition: sitkProcessObject.h:50
itk::simple::WarpImageFilter::GetInterpolator
InterpolatorEnum GetInterpolator() const
Definition: sitkWarpImageFilter.h:95
itk::simple::WarpImageFilter::m_OutputDirection
std::vector< double > m_OutputDirection
Definition: sitkWarpImageFilter.h:187
itk::simple::WarpImageFilter::GetOutputOrigin
std::vector< double > GetOutputOrigin() const
Definition: sitkWarpImageFilter.h:115