SimpleITK  1.3.0.dev466
sitkResampleImageFilter.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 sitkResampleImageFilter_h
19 #define sitkResampleImageFilter_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 
76  public:
78 
80  virtual ~ResampleImageFilter();
81 
85 
88 
89 
90 
94  SITK_RETURN_SELF_TYPE_HEADER SetSize ( const std::vector<uint32_t> & Size ) { this->m_Size = Size; return *this; }
95 
99  std::vector<uint32_t> GetSize() const { return this->m_Size; }
100 
103  SITK_RETURN_SELF_TYPE_HEADER SetTransform ( Transform Transform ) { this->m_Transform = Transform; return *this; }
104 
107  Transform GetTransform() const { return this->m_Transform; }
108 
112  SITK_RETURN_SELF_TYPE_HEADER SetInterpolator ( InterpolatorEnum Interpolator ) { this->m_Interpolator = Interpolator; return *this; }
113 
117  InterpolatorEnum GetInterpolator() const { return this->m_Interpolator; }
118 
122  SITK_RETURN_SELF_TYPE_HEADER SetOutputOrigin ( const std::vector<double> & OutputOrigin ) { this->m_OutputOrigin = OutputOrigin; return *this; }
123 
127  std::vector<double> GetOutputOrigin() const { return this->m_OutputOrigin; }
128 
132  SITK_RETURN_SELF_TYPE_HEADER SetOutputSpacing ( const std::vector<double> & OutputSpacing ) { this->m_OutputSpacing = OutputSpacing; return *this; }
133 
137  std::vector<double> GetOutputSpacing() const { return this->m_OutputSpacing; }
138 
142  SITK_RETURN_SELF_TYPE_HEADER SetOutputDirection ( std::vector<double> OutputDirection ) { this->m_OutputDirection = OutputDirection; return *this; }
143 
147  std::vector<double> GetOutputDirection() const { return this->m_OutputDirection; }
148 
152  SITK_RETURN_SELF_TYPE_HEADER SetDefaultPixelValue ( double DefaultPixelValue ) { this->m_DefaultPixelValue = DefaultPixelValue; return *this; }
153 
157  double GetDefaultPixelValue() const { return this->m_DefaultPixelValue; }
158 
162  SITK_RETURN_SELF_TYPE_HEADER SetOutputPixelType ( PixelIDValueEnum OutputPixelType ) { this->m_OutputPixelType = OutputPixelType; return *this; }
163 
167  PixelIDValueEnum GetOutputPixelType() const { return this->m_OutputPixelType; }
168 
172  SITK_RETURN_SELF_TYPE_HEADER SetUseNearestNeighborExtrapolator ( bool UseNearestNeighborExtrapolator ) { this->m_UseNearestNeighborExtrapolator = UseNearestNeighborExtrapolator; return *this; }
173 
175  SITK_RETURN_SELF_TYPE_HEADER UseNearestNeighborExtrapolatorOn() { return this->SetUseNearestNeighborExtrapolator(true); }
176  SITK_RETURN_SELF_TYPE_HEADER UseNearestNeighborExtrapolatorOff() { return this->SetUseNearestNeighborExtrapolator(false); }
177 
180  bool GetUseNearestNeighborExtrapolator() const { return this->m_UseNearestNeighborExtrapolator; }
182  std::string GetName() const { return std::string ("ResampleImageFilter"); }
183 
185  std::string ToString() const;
186 
187 
189  Image Execute ( const Image& image1 );
190 
191 
193  Image Execute ( const Image& image1, const std::vector<uint32_t> & size, Transform transform, InterpolatorEnum interpolator, const std::vector<double> & outputOrigin, const std::vector<double> & outputSpacing, std::vector<double> outputDirection, double defaultPixelValue, PixelIDValueEnum outputPixelType, bool useNearestNeighborExtrapolator );
194 
195 
197  void SetReferenceImage(const Image & refImage );
198 
199 
200  private:
202  typedef Image (Self::*MemberFunctionType)( const Image& image1 );
203 
204  friend struct detail::DualExecuteInternalAddressor<MemberFunctionType>;
205  template <class TImageType1, class TImageType2> Image DualExecuteInternal ( const Image& image1 );
206  friend struct detail::DualExecuteInternalVectorAddressor<MemberFunctionType>;
207  template <class TImageType1, class TImageType2> Image DualExecuteInternalVector ( const Image& image1 );
208 
209  nsstd::auto_ptr<detail::DualMemberFunctionFactory<MemberFunctionType> > m_DualMemberFactory;
210 
211 
212 
213  /* */
214  std::vector<uint32_t> m_Size;
216  /* */
218  /* */
219  std::vector<double> m_OutputOrigin;
220  /* */
221  std::vector<double> m_OutputSpacing;
222  /* 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. */
223  std::vector<double> m_OutputDirection;
227  };
228 
229 
230 
231  }
232 }
233 #endif
#define SITKBasicFilters_EXPORT
Self & SetDefaultPixelValue(double DefaultPixelValue)
Self & SetOutputOrigin(const std::vector< double > &OutputOrigin)
PixelIDValueEnum GetOutputPixelType() const
Get the ouput pixel type.
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
Self & SetOutputDirection(std::vector< double > OutputDirection)
Self & SetInterpolator(InterpolatorEnum Interpolator)
Self & SetTransform(Transform Transform)
PixelIDValueEnum
Enumerated values of pixelIDs.
Self & SetSize(const std::vector< uint32_t > &Size)
Resample an image via a coordinate transform.
std::vector< double > GetOutputOrigin() const
Self & SetOutputSpacing(const std::vector< double > &OutputSpacing)
A simplified wrapper around a variety of ITK transforms.
Definition: sitkTransform.h:84
std::vector< double > GetOutputSpacing() const
The Image class for SimpleITK.
Definition: sitkImage.h:78
Self & SetUseNearestNeighborExtrapolator(bool UseNearestNeighborExtrapolator)
Enables the nearest neighbor extrapolator as opposed to the constant pixel value. ...
nsstd::auto_ptr< detail::DualMemberFunctionFactory< MemberFunctionType > > m_DualMemberFactory
Self & SetOutputPixelType(PixelIDValueEnum OutputPixelType)
Set the output pixel type, if sitkUnknown then the input type is used.
std::vector< double > GetOutputDirection() const
InterpolatorEnum GetInterpolator() const
The base interface for SimpleITK filters that take one input image.
std::vector< uint32_t > GetSize() const