SimpleITK  2.0.0
sitkResampleImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 *
3 * Copyright NumFOCUS
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 
54  public:
56 
58  virtual ~ResampleImageFilter();
59 
63 
66 
67 \
68 
72  SITK_RETURN_SELF_TYPE_HEADER SetSize ( std::vector<uint32_t> Size ) { this->m_Size = std::move(Size); return *this; }
73 
77  std::vector<uint32_t> GetSize() const { return this->m_Size; }\
78 
81  SITK_RETURN_SELF_TYPE_HEADER SetTransform ( Transform Transform ) { this->m_Transform = Transform; return *this; }
82 
85  Transform GetTransform() const { return this->m_Transform; }\
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 SetOutputOrigin ( std::vector<double> OutputOrigin ) { this->m_OutputOrigin = std::move(OutputOrigin); return *this; }
101 
105  std::vector<double> GetOutputOrigin() const { return this->m_OutputOrigin; }\
106 
110  SITK_RETURN_SELF_TYPE_HEADER SetOutputSpacing ( std::vector<double> OutputSpacing ) { this->m_OutputSpacing = std::move(OutputSpacing); return *this; }
111 
115  std::vector<double> GetOutputSpacing() const { return this->m_OutputSpacing; }\
116 
120  SITK_RETURN_SELF_TYPE_HEADER SetOutputDirection ( std::vector<double> OutputDirection ) { this->m_OutputDirection = OutputDirection; return *this; }
121 
125  std::vector<double> GetOutputDirection() const { return this->m_OutputDirection; }\
126 
130  SITK_RETURN_SELF_TYPE_HEADER SetDefaultPixelValue ( double DefaultPixelValue ) { this->m_DefaultPixelValue = DefaultPixelValue; return *this; }
131 
135  double GetDefaultPixelValue() const { return this->m_DefaultPixelValue; }\
136 
140  SITK_RETURN_SELF_TYPE_HEADER SetOutputPixelType ( PixelIDValueEnum OutputPixelType ) { this->m_OutputPixelType = OutputPixelType; return *this; }
141 
145  PixelIDValueEnum GetOutputPixelType() const { return this->m_OutputPixelType; }\
146 
150  SITK_RETURN_SELF_TYPE_HEADER SetUseNearestNeighborExtrapolator ( bool UseNearestNeighborExtrapolator ) { this->m_UseNearestNeighborExtrapolator = UseNearestNeighborExtrapolator; return *this; }
151 
153  SITK_RETURN_SELF_TYPE_HEADER UseNearestNeighborExtrapolatorOn() { return this->SetUseNearestNeighborExtrapolator(true); }
154  SITK_RETURN_SELF_TYPE_HEADER UseNearestNeighborExtrapolatorOff() { return this->SetUseNearestNeighborExtrapolator(false); }
155 
158  bool GetUseNearestNeighborExtrapolator() const { return this->m_UseNearestNeighborExtrapolator; }
159 
161  std::string GetName() const { return std::string ("ResampleImageFilter"); }
162 
164  std::string ToString() const;
165 
166 
169  Image Execute ( const Image& image1 );
170 
171 
173  void SetReferenceImage(const Image & refImage );
174 
175 
176  private:
178  using MemberFunctionType = Image (Self::*)( const Image& image1 );
179 
181  template <class TImageType1, class TImageType2> Image DualExecuteInternal ( const Image& image1 );
183  template <class TImageType1, class TImageType2> Image DualExecuteInternalVector ( const Image& image1 );
184 
185  std::unique_ptr<detail::DualMemberFunctionFactory<MemberFunctionType> > m_DualMemberFactory;
186 
187 
188 
189  /* */
190  std::vector<uint32_t> m_Size{std::vector<uint32_t>(3, 0)};
191 
193 
194  /* */
196 
197  /* */
198  std::vector<double> m_OutputOrigin{std::vector<double>(3, 0.0)};
199 
200  /* */
201  std::vector<double> m_OutputSpacing{std::vector<double>(3, 1.0)};
202 
203  /* 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. */
204  std::vector<double> m_OutputDirection{std::vector<double>()};
205 
206  double m_DefaultPixelValue{0.0};
207 
209 
210  bool m_UseNearestNeighborExtrapolator{false};
211 
212 
213  };
214 
215 
216  }
217 }
218 #endif
itk::simple::Image
The Image class for SimpleITK.
Definition: sitkImage.h:75
itk::simple::ResampleImageFilter::GetOutputDirection
std::vector< double > GetOutputDirection() const
Definition: sitkResampleImageFilter.h:125
itk::simple::ResampleImageFilter::GetOutputOrigin
std::vector< double > GetOutputOrigin() const
Definition: sitkResampleImageFilter.h:105
sitkBasicFilters.h
itk::simple::sitkLinear
@ sitkLinear
N-D linear interpolation.
Definition: sitkInterpolator.h:39
itk::simple::ResampleImageFilter::GetName
std::string GetName() const
Definition: sitkResampleImageFilter.h:161
itk::simple::InterpolatorEnum
InterpolatorEnum
Definition: sitkInterpolator.h:30
itk::Size
itk::simple::Transform
A simplified wrapper around a variety of ITK transforms.
Definition: sitkTransform.h:80
itk::simple::ResampleImageFilter::UseNearestNeighborExtrapolatorOff
Self & UseNearestNeighborExtrapolatorOff()
Definition: sitkResampleImageFilter.h:154
itk::simple::ResampleImageFilter::SetSize
Self & SetSize(std::vector< uint32_t > Size)
Definition: sitkResampleImageFilter.h:72
itk::simple::ResampleImageFilter::GetTransform
Transform GetTransform() const
Definition: sitkResampleImageFilter.h:85
itk::simple::ResampleImageFilter::SetDefaultPixelValue
Self & SetDefaultPixelValue(double DefaultPixelValue)
Definition: sitkResampleImageFilter.h:130
itk::simple::PixelIDValueEnum
PixelIDValueEnum
Enumerated values of pixelIDs.
Definition: sitkPixelIDValues.h:90
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::ResampleImageFilter::GetOutputPixelType
PixelIDValueEnum GetOutputPixelType() const
Get the ouput pixel type.
Definition: sitkResampleImageFilter.h:145
itk::simple::detail::DualExecuteInternalVectorAddressor
Definition: sitkDetail.h:75
itk::simple::ResampleImageFilter::SetUseNearestNeighborExtrapolator
Self & SetUseNearestNeighborExtrapolator(bool UseNearestNeighborExtrapolator)
Enables the nearest neighbor extrapolator as opposed to the constant pixel value.
Definition: sitkResampleImageFilter.h:150
itk::simple::ResampleImageFilter
Resample an image via a coordinate transform.
Definition: sitkResampleImageFilter.h:53
sitkDualMemberFunctionFactory.h
itk::simple::ResampleImageFilter::GetDefaultPixelValue
double GetDefaultPixelValue() const
Definition: sitkResampleImageFilter.h:135
SITKBasicFilters_EXPORT
#define SITKBasicFilters_EXPORT
Definition: sitkBasicFilters.h:52
itk::simple::ResampleImageFilter::SetTransform
Self & SetTransform(Transform Transform)
Definition: sitkResampleImageFilter.h:81
itk::simple::ResampleImageFilter::GetOutputSpacing
std::vector< double > GetOutputSpacing() const
Definition: sitkResampleImageFilter.h:115
itk::simple::ResampleImageFilter::MemberFunctionType
Image(Self::*)(const Image &image1) MemberFunctionType
Definition: sitkResampleImageFilter.h:178
itk::simple::ResampleImageFilter::m_DualMemberFactory
std::unique_ptr< detail::DualMemberFunctionFactory< MemberFunctionType > > m_DualMemberFactory
Definition: sitkResampleImageFilter.h:185
itk::simple::detail::DualExecuteInternalAddressor
Definition: sitkDetail.h:44
itk::simple::ResampleImageFilter::SetOutputSpacing
Self & SetOutputSpacing(std::vector< double > OutputSpacing)
Definition: sitkResampleImageFilter.h:110
itk::simple::ResampleImageFilter::SetOutputPixelType
Self & SetOutputPixelType(PixelIDValueEnum OutputPixelType)
Set the output pixel type, if sitkUnknown then the input type is used.
Definition: sitkResampleImageFilter.h:140
itk::simple::ResampleImageFilter::GetInterpolator
InterpolatorEnum GetInterpolator() const
Definition: sitkResampleImageFilter.h:95
itk::simple::ResampleImageFilter::SetOutputOrigin
Self & SetOutputOrigin(std::vector< double > OutputOrigin)
Definition: sitkResampleImageFilter.h:100
itk::simple::ResampleImageFilter::UseNearestNeighborExtrapolatorOn
Self & UseNearestNeighborExtrapolatorOn()
Definition: sitkResampleImageFilter.h:153
itk
itk::simple::ResampleImageFilter::SetOutputDirection
Self & SetOutputDirection(std::vector< double > OutputDirection)
Definition: sitkResampleImageFilter.h:120
itk::simple::ImageFilter
The base interface for SimpleITK filters that take one input image.
Definition: sitkImageFilter.h:36
itk::simple::ResampleImageFilter::GetSize
std::vector< uint32_t > GetSize() const
Definition: sitkResampleImageFilter.h:77
itk::simple::ResampleImageFilter::GetUseNearestNeighborExtrapolator
bool GetUseNearestNeighborExtrapolator() const
Definition: sitkResampleImageFilter.h:158
itk::simple::sitkUnknown
@ sitkUnknown
Definition: sitkPixelIDValues.h:91
itk::simple::ResampleImageFilter::SetInterpolator
Self & SetInterpolator(InterpolatorEnum Interpolator)
Definition: sitkResampleImageFilter.h:90
itk::simple::ResampleImageFilter::PixelIDTypeList
BasicPixelIDTypeList PixelIDTypeList
Definition: sitkResampleImageFilter.h:65