SimpleITK  
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::simple {
34 
53  public:
55 
57  virtual ~ResampleImageFilter();
58 
62 
65 
66 \
67 
71  SITK_RETURN_SELF_TYPE_HEADER SetSize ( std::vector<uint32_t> Size ) { this->m_Size = std::move(Size); return *this; }
72 
76  std::vector<uint32_t> GetSize() const { return this->m_Size; }\
77 
80  SITK_RETURN_SELF_TYPE_HEADER SetTransform ( Transform Transform ) { this->m_Transform = Transform; return *this; }
81 
84  Transform GetTransform() const { return this->m_Transform; }\
85 
89  SITK_RETURN_SELF_TYPE_HEADER SetInterpolator ( InterpolatorEnum Interpolator ) { this->m_Interpolator = Interpolator; return *this; }
90 
94  InterpolatorEnum GetInterpolator() const { return this->m_Interpolator; }\
95 
99  SITK_RETURN_SELF_TYPE_HEADER SetOutputOrigin ( std::vector<double> OutputOrigin ) { this->m_OutputOrigin = std::move(OutputOrigin); return *this; }
100 
104  std::vector<double> GetOutputOrigin() const { return this->m_OutputOrigin; }\
105 
109  SITK_RETURN_SELF_TYPE_HEADER SetOutputSpacing ( std::vector<double> OutputSpacing ) { this->m_OutputSpacing = std::move(OutputSpacing); return *this; }
110 
114  std::vector<double> GetOutputSpacing() const { return this->m_OutputSpacing; }\
115 
119  SITK_RETURN_SELF_TYPE_HEADER SetOutputDirection ( std::vector<double> OutputDirection ) { this->m_OutputDirection = OutputDirection; return *this; }
120 
124  std::vector<double> GetOutputDirection() const { return this->m_OutputDirection; }\
125 
129  SITK_RETURN_SELF_TYPE_HEADER SetDefaultPixelValue ( double DefaultPixelValue ) { this->m_DefaultPixelValue = DefaultPixelValue; return *this; }
130 
134  double GetDefaultPixelValue() const { return this->m_DefaultPixelValue; }\
135 
139  SITK_RETURN_SELF_TYPE_HEADER SetOutputPixelType ( PixelIDValueEnum OutputPixelType ) { this->m_OutputPixelType = OutputPixelType; return *this; }
140 
144  PixelIDValueEnum GetOutputPixelType() const { return this->m_OutputPixelType; }\
145 
149  SITK_RETURN_SELF_TYPE_HEADER SetUseNearestNeighborExtrapolator ( bool UseNearestNeighborExtrapolator ) { this->m_UseNearestNeighborExtrapolator = UseNearestNeighborExtrapolator; return *this; }
150 
152  SITK_RETURN_SELF_TYPE_HEADER UseNearestNeighborExtrapolatorOn() { return this->SetUseNearestNeighborExtrapolator(true); }
153  SITK_RETURN_SELF_TYPE_HEADER UseNearestNeighborExtrapolatorOff() { return this->SetUseNearestNeighborExtrapolator(false); }
154 
157  bool GetUseNearestNeighborExtrapolator() const { return this->m_UseNearestNeighborExtrapolator; }
158 
160  std::string GetName() const { return std::string ("ResampleImageFilter"); }
161 
163  std::string ToString() const;
164 
165 
168  Image Execute ( const Image& image1 );
169 
170 
172  void SetReferenceImage(const Image & refImage );
173 
174 
175  private:
177  using MemberFunctionType = Image (Self::*)( const Image& image1 );
178 
180  template <class TImageType1, class TImageType2> Image DualExecuteInternal ( const Image& image1 );
182  template <class TImageType1, class TImageType2> Image DualExecuteInternalVector ( const Image& image1 );
183 
184  std::unique_ptr<detail::DualMemberFunctionFactory<MemberFunctionType> > m_DualMemberFactory;
185 
186 
187 
188  /* */
189  std::vector<uint32_t> m_Size{std::vector<uint32_t>(3, 0)};
190 
192 
193  /* */
195 
196  /* */
197  std::vector<double> m_OutputOrigin{std::vector<double>(3, 0.0)};
198 
199  /* */
200  std::vector<double> m_OutputSpacing{std::vector<double>(3, 1.0)};
201 
202  /* 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. */
203  std::vector<double> m_OutputDirection{std::vector<double>()};
204 
205  double m_DefaultPixelValue{0.0};
206 
208 
209  bool m_UseNearestNeighborExtrapolator{false};
210 
211 
212  };
213 
214 
215 }
216 #endif
itk::simple::Image
The Image class for SimpleITK.
Definition: sitkImage.h:76
itk::simple::ResampleImageFilter::GetOutputDirection
std::vector< double > GetOutputDirection() const
Definition: sitkResampleImageFilter.h:124
itk::simple::ResampleImageFilter::GetOutputOrigin
std::vector< double > GetOutputOrigin() const
Definition: sitkResampleImageFilter.h:104
sitkBasicFilters.h
itk::simple::sitkLinear
@ sitkLinear
N-D linear interpolation.
Definition: sitkInterpolator.h:37
itk::simple::ResampleImageFilter::GetName
std::string GetName() const
Definition: sitkResampleImageFilter.h:160
itk::simple::InterpolatorEnum
InterpolatorEnum
Definition: sitkInterpolator.h:28
itk::Size
itk::simple::Transform
A simplified wrapper around a variety of ITK transforms.
Definition: sitkTransform.h:81
itk::simple::ResampleImageFilter::UseNearestNeighborExtrapolatorOff
Self & UseNearestNeighborExtrapolatorOff()
Definition: sitkResampleImageFilter.h:153
itk::simple::ResampleImageFilter::SetSize
Self & SetSize(std::vector< uint32_t > Size)
Definition: sitkResampleImageFilter.h:71
itk::simple::BasicPixelIDTypeList
typelist2::typelist< BasicPixelID< int8_t >, BasicPixelID< uint8_t >, BasicPixelID< int16_t >, BasicPixelID< uint16_t >, BasicPixelID< int32_t >, BasicPixelID< uint32_t >, BasicPixelID< float >, BasicPixelID< double > > BasicPixelIDTypeList
Definition: sitkPixelIDTypeLists.h:51
itk::simple::ResampleImageFilter::GetTransform
Transform GetTransform() const
Definition: sitkResampleImageFilter.h:84
itk::simple::ResampleImageFilter::SetDefaultPixelValue
Self & SetDefaultPixelValue(double DefaultPixelValue)
Definition: sitkResampleImageFilter.h:129
itk::simple::PixelIDValueEnum
PixelIDValueEnum
Enumerated values of pixelIDs.
Definition: sitkPixelIDValues.h:91
sitkImageFilter.h
itk::simple::ResampleImageFilter::GetOutputPixelType
PixelIDValueEnum GetOutputPixelType() const
Get the ouput pixel type.
Definition: sitkResampleImageFilter.h:144
itk::simple::detail::DualExecuteInternalVectorAddressor
Definition: sitkDetail.h:78
itk::simple::ResampleImageFilter::SetUseNearestNeighborExtrapolator
Self & SetUseNearestNeighborExtrapolator(bool UseNearestNeighborExtrapolator)
Enables the nearest neighbor extrapolator as opposed to the constant pixel value.
Definition: sitkResampleImageFilter.h:149
itk::simple::ResampleImageFilter
Resample an image via a coordinate transform.
Definition: sitkResampleImageFilter.h:52
sitkDualMemberFunctionFactory.h
itk::simple::ResampleImageFilter::GetDefaultPixelValue
double GetDefaultPixelValue() const
Definition: sitkResampleImageFilter.h:134
SITKBasicFilters_EXPORT
#define SITKBasicFilters_EXPORT
Definition: sitkBasicFilters.h:52
itk::simple::ResampleImageFilter::SetTransform
Self & SetTransform(Transform Transform)
Definition: sitkResampleImageFilter.h:80
itk::simple::ResampleImageFilter::GetOutputSpacing
std::vector< double > GetOutputSpacing() const
Definition: sitkResampleImageFilter.h:114
itk::simple::ResampleImageFilter::MemberFunctionType
Image(Self::*)(const Image &image1) MemberFunctionType
Definition: sitkResampleImageFilter.h:177
itk::simple::ResampleImageFilter::m_DualMemberFactory
std::unique_ptr< detail::DualMemberFunctionFactory< MemberFunctionType > > m_DualMemberFactory
Definition: sitkResampleImageFilter.h:184
itk::simple::detail::DualExecuteInternalAddressor
Definition: sitkDetail.h:40
itk::simple::ResampleImageFilter::SetOutputSpacing
Self & SetOutputSpacing(std::vector< double > OutputSpacing)
Definition: sitkResampleImageFilter.h:109
itk::simple::ResampleImageFilter::SetOutputPixelType
Self & SetOutputPixelType(PixelIDValueEnum OutputPixelType)
Set the output pixel type, if sitkUnknown then the input type is used.
Definition: sitkResampleImageFilter.h:139
itk::simple::ResampleImageFilter::GetInterpolator
InterpolatorEnum GetInterpolator() const
Definition: sitkResampleImageFilter.h:94
itk::simple::ResampleImageFilter::SetOutputOrigin
Self & SetOutputOrigin(std::vector< double > OutputOrigin)
Definition: sitkResampleImageFilter.h:99
itk::simple::ResampleImageFilter::UseNearestNeighborExtrapolatorOn
Self & UseNearestNeighborExtrapolatorOn()
Definition: sitkResampleImageFilter.h:152
itk::simple::ResampleImageFilter::SetOutputDirection
Self & SetOutputDirection(std::vector< double > OutputDirection)
Definition: sitkResampleImageFilter.h:119
itk::simple::ImageFilter
The base interface for SimpleITK filters that take one input image.
Definition: sitkImageFilter.h:34
itk::simple::ResampleImageFilter::GetSize
std::vector< uint32_t > GetSize() const
Definition: sitkResampleImageFilter.h:76
itk::simple::ResampleImageFilter::GetUseNearestNeighborExtrapolator
bool GetUseNearestNeighborExtrapolator() const
Definition: sitkResampleImageFilter.h:157
itk::simple
Definition: sitkAdditionalProcedures.h:28
itk::simple::sitkUnknown
@ sitkUnknown
Definition: sitkPixelIDValues.h:92
itk::simple::ResampleImageFilter::SetInterpolator
Self & SetInterpolator(InterpolatorEnum Interpolator)
Definition: sitkResampleImageFilter.h:89
itk::simple::ResampleImageFilter::PixelIDTypeList
BasicPixelIDTypeList PixelIDTypeList
Definition: sitkResampleImageFilter.h:64