SimpleITK  
sitkPasteImageFilter.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 sitkPasteImageFilter_h
19 #define sitkPasteImageFilter_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 sitkImageFilterTemplate.h.in to make changes.
25  */
26 
27 #include <memory>
28 
29 #include "sitkBasicFilters.h"
30 #include "sitkImageFilter.h"
31 
32 namespace itk::simple
33 {
34 
56 {
57 public:
59 
61  virtual ~PasteImageFilter();
62 
66 
69 
70 
73  SITK_RETURN_SELF_TYPE_HEADER
74  SetSourceSize(std::vector<unsigned int> SourceSize)
75  {
76  this->m_SourceSize = std::move(SourceSize);
77  return *this;
78  }
79 
82  std::vector<unsigned int>
83  GetSourceSize() const
84  {
85  return this->m_SourceSize;
86  }
87 
90  SITK_RETURN_SELF_TYPE_HEADER
91  SetSourceIndex(std::vector<int> SourceIndex)
92  {
93  this->m_SourceIndex = std::move(SourceIndex);
94  return *this;
95  }
96 
99  std::vector<int>
101  {
102  return this->m_SourceIndex;
103  }
104 
108  SITK_RETURN_SELF_TYPE_HEADER
109  SetDestinationIndex(std::vector<int> DestinationIndex)
110  {
111  this->m_DestinationIndex = std::move(DestinationIndex);
112  return *this;
113  }
114 
118  std::vector<int>
120  {
121  return this->m_DestinationIndex;
122  }
123 
124 
133  SITK_RETURN_SELF_TYPE_HEADER
134  SetDestinationSkipAxes(std::vector<bool> DestinationSkipAxes)
135  {
136  this->m_DestinationSkipAxes = std::move(DestinationSkipAxes);
137  return *this;
138  }
139 
148  std::vector<bool>
150  {
151  return this->m_DestinationSkipAxes;
152  }
153 
154 
156  std::string
157  GetName() const
158  {
159  return std::string("PasteImageFilter");
160  }
161 
163  std::string
164  ToString() const;
165 
166 
168 #ifndef SWIG
169  Image
170  Execute(Image && destinationImage, const Image & sourceImage);
171  Image
172  Execute(Image && destinationImage, double constant);
173 #endif
174  Image
175  Execute(const Image & destinationImage, const Image & sourceImage);
176  Image
177  Execute(const Image & destinationImage, double constant);
178 
179 
180 private:
183  using MemberFunctionType = Image (Self::*)(const Image * destinationImage, const Image * sourceImage);
184  template <class TImageType>
185  Image
186  ExecuteInternal(const Image * destinationImage, const Image * sourceImage);
187 
188  template <class TImageType, unsigned int OutputDimension>
189  Image
190  ExecuteInternal(const TImageType * destinationImage,
191  const Image * sourceImage,
192  std::integral_constant<unsigned int, OutputDimension> meta);
193  template <class TImageType>
194  Image
195  ExecuteInternal(const TImageType * destinationImage,
196  const Image * sourceImage,
197  std::integral_constant<unsigned int, 1> meta);
198 
199 
201 
202  std::unique_ptr<detail::MemberFunctionFactory<MemberFunctionType>> m_MemberFactory;
203 
204  using MemberFunction2Type = Image (Self::*)(const Image * image, double constant);
205  template <class TImageType>
206  Image
207  ExecuteInternal(const Image * image, double constant);
209  std::unique_ptr<detail::MemberFunctionFactory<MemberFunction2Type>> m_MemberFactory2;
210 
211 
212  std::vector<unsigned int> m_SourceSize{ std::vector<unsigned int>(SITK_MAX_DIMENSION, 1) };
213 
214  std::vector<int> m_SourceIndex{ std::vector<int>(SITK_MAX_DIMENSION, 0) };
215 
216  std::vector<int> m_DestinationIndex{ std::vector<int>(SITK_MAX_DIMENSION, 0) };
217 
218  std::vector<bool> m_DestinationSkipAxes{};
219 
220  bool m_InPlace{ false };
221 };
222 
232 #ifndef SWIG
234 Paste(Image && destinationImage,
235  const Image & sourceImage,
236  std::vector<unsigned int> sourceSize = std::vector<unsigned int>(SITK_MAX_DIMENSION, 1),
237  std::vector<int> sourceIndex = std::vector<int>(SITK_MAX_DIMENSION, 0),
238  std::vector<int> destinationIndex = std::vector<int>(SITK_MAX_DIMENSION, 0),
239  std::vector<bool> DestinationSkipAxes = std::vector<bool>());
240 #endif
242 Paste(const Image & destinationImage,
243  const Image & sourceImage,
244  std::vector<unsigned int> sourceSize = std::vector<unsigned int>(SITK_MAX_DIMENSION, 1),
245  std::vector<int> sourceIndex = std::vector<int>(SITK_MAX_DIMENSION, 0),
246  std::vector<int> destinationIndex = std::vector<int>(SITK_MAX_DIMENSION, 0),
247  std::vector<bool> DestinationSkipAxes = std::vector<bool>());
248 
250 } // namespace itk::simple
251 #endif
itk::simple::Image
The Image class for SimpleITK.
Definition: sitkImage.h:76
sitkBasicFilters.h
itk::simple::detail::MemberFunctionAddressor
Definition: sitkDetail.h:29
itk::simple::PasteImageFilter::GetSourceIndex
std::vector< int > GetSourceIndex() const
Definition: sitkPasteImageFilter.h:100
itk::simple::PasteImageFilter::GetDestinationIndex
std::vector< int > GetDestinationIndex() const
Definition: sitkPasteImageFilter.h:119
itk::simple::PasteImageFilter::GetDestinationSkipAxes
std::vector< bool > GetDestinationSkipAxes() const
Definition: sitkPasteImageFilter.h:149
sitkImageFilter.h
itk::simple::Paste
Image Paste(Image &&destinationImage, const Image &sourceImage, std::vector< unsigned int > sourceSize=std::vector< unsigned int >(SITK_MAX_DIMENSION, 1), std::vector< int > sourceIndex=std::vector< int >(SITK_MAX_DIMENSION, 0), std::vector< int > destinationIndex=std::vector< int >(SITK_MAX_DIMENSION, 0), std::vector< bool > DestinationSkipAxes=std::vector< bool >())
Paste an image into another image.
itk::simple::PasteImageFilter::m_MemberFactory
std::unique_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
Definition: sitkPasteImageFilter.h:202
itk::simple::PasteImageFilter::SetDestinationSkipAxes
Self & SetDestinationSkipAxes(std::vector< bool > DestinationSkipAxes)
Definition: sitkPasteImageFilter.h:134
SITK_MAX_DIMENSION
#define SITK_MAX_DIMENSION
Definition: sitkConfigure.h:30
itk::simple::PasteImageFilter::PixelIDTypeList
NonLabelPixelIDTypeList PixelIDTypeList
Definition: sitkPasteImageFilter.h:68
itk::simple::PasteImageFilter
Paste an image (or a constant value) into another image.
Definition: sitkPasteImageFilter.h:55
itk::simple::PasteImageFilter::SetDestinationIndex
Self & SetDestinationIndex(std::vector< int > DestinationIndex)
Definition: sitkPasteImageFilter.h:109
SITKBasicFilters_EXPORT
#define SITKBasicFilters_EXPORT
Definition: sitkBasicFilters.h:52
itk::simple::NonLabelPixelIDTypeList
typelist2::append< BasicPixelIDTypeList, ComplexPixelIDTypeList, VectorPixelIDTypeList >::type NonLabelPixelIDTypeList
Definition: sitkPixelIDTypeLists.h:180
itk::simple::PasteImageFilter::MemberFunction2Type
Image(Self::*)(const Image *image, double constant) MemberFunction2Type
Definition: sitkPasteImageFilter.h:204
itk::simple::PasteImageFilter::SetSourceIndex
Self & SetSourceIndex(std::vector< int > SourceIndex)
Definition: sitkPasteImageFilter.h:91
itk::simple::PasteImageFilter::SetSourceSize
Self & SetSourceSize(std::vector< unsigned int > SourceSize)
Definition: sitkPasteImageFilter.h:74
itk::simple::ImageFilter
The base interface for SimpleITK filters that take one input image.
Definition: sitkImageFilter.h:35
itk::Image
Definition: sitkPixelIDTypes.h:28
itk::simple::PasteImageFilter::GetSourceSize
std::vector< unsigned int > GetSourceSize() const
Definition: sitkPasteImageFilter.h:83
itk::simple::PasteImageFilter::m_MemberFactory2
std::unique_ptr< detail::MemberFunctionFactory< MemberFunction2Type > > m_MemberFactory2
Definition: sitkPasteImageFilter.h:209
itk::simple
Definition: sitkAdditionalProcedures.h:28
itk::simple::PasteImageFilter::MemberFunctionType
Image(Self::*)(const Image *destinationImage, const Image *sourceImage) MemberFunctionType
Definition: sitkPasteImageFilter.h:183
itk::simple::PasteImageFilter::GetName
std::string GetName() const
Definition: sitkPasteImageFilter.h:157