ITK  5.2.0
Insight Toolkit
itkPasteImageFilter.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 itkPasteImageFilter_h
19 #define itkPasteImageFilter_h
20 
21 #include "itkInPlaceImageFilter.h"
22 #include "itkSmartPointer.h"
23 
24 namespace itk
25 {
48 template <typename TInputImage, typename TSourceImage = TInputImage, typename TOutputImage = TInputImage>
49 class ITK_TEMPLATE_EXPORT PasteImageFilter : public InPlaceImageFilter<TInputImage, TOutputImage>
50 {
51 public:
52  ITK_DISALLOW_COPY_AND_ASSIGN(PasteImageFilter);
53 
59 
61  itkNewMacro(Self);
62 
64  itkTypeMacro(PasteImageFilter, InPlaceImageFilter);
65 
67  using InputImagePointer = typename Superclass::InputImagePointer;
68  using OutputImagePointer = typename Superclass::OutputImagePointer;
69 
71  using InputImageType = TInputImage;
72  using OutputImageType = TOutputImage;
73  using SourceImageType = TSourceImage;
77 
78  using SourceImagePointer = typename SourceImageType::Pointer;
79  using SourceImageConstPointer = typename SourceImageType::ConstPointer;
80 
82  using OutputImagePixelType = typename OutputImageType::PixelType;
83  using InputImagePixelType = typename InputImageType::PixelType;
84  using SourceImagePixelType = typename SourceImageType::PixelType;
85 
93 
95  static constexpr unsigned int InputImageDimension = InputImageType::ImageDimension;
96  static constexpr unsigned int OutputImageDimension = OutputImageType::ImageDimension;
97  static constexpr unsigned int SourceImageDimension = SourceImageType::ImageDimension;
98 
101  itkSetMacro(DestinationIndex, InputImageIndexType);
102  itkGetConstMacro(DestinationIndex, InputImageIndexType);
104 
107  itkSetMacro(SourceRegion, SourceImageRegionType);
108  itkGetConstMacro(SourceRegion, SourceImageRegionType);
110 
113  itkSetInputMacro(DestinationImage, InputImageType);
114  itkGetInputMacro(DestinationImage, InputImageType);
116 
119  itkSetInputMacro(SourceImage, SourceImageType);
120  itkGetInputMacro(SourceImage, SourceImageType);
122 
132  void
133  GenerateInputRequestedRegion() override;
134 
135 
141  void
142  VerifyInputInformation() ITKv5_CONST override
143  {}
144 
145 protected:
147  ~PasteImageFilter() override = default;
148  void
149  PrintSelf(std::ostream & os, Indent indent) const override;
150 
160  void
161  DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
162 
163 
165 
167 };
168 } // end namespace itk
169 
170 #ifndef ITK_MANUAL_INSTANTIATION
171 # include "itkPasteImageFilter.hxx"
172 #endif
173 
174 #endif
itk::PasteImageFilter::VerifyInputInformation
void VerifyInputInformation() ITKv5_CONST override
Definition: itkPasteImageFilter.h:142
itk::ImageSource::OutputImagePointer
typename OutputImageType::Pointer OutputImagePointer
Definition: itkImageSource.h:91
itk::PasteImageFilter::m_DestinationIndex
InputImageIndexType m_DestinationIndex
Definition: itkPasteImageFilter.h:166
itk::InPlaceImageFilter
Base class for filters that take an image as input and overwrite that image as the output.
Definition: itkInPlaceImageFilter.h:77
itk::PasteImageFilter::OutputImageSizeType
typename OutputImageType::SizeType OutputImageSizeType
Definition: itkPasteImageFilter.h:88
itk::PasteImageFilter::SourceImageRegionType
typename SourceImageType::RegionType SourceImageRegionType
Definition: itkPasteImageFilter.h:76
itk::GTest::TypedefsAndConstructors::Dimension2::SizeType
ImageBaseType::SizeType SizeType
Definition: itkGTestTypedefsAndConstructors.h:49
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::PasteImageFilter::InputImageSizeType
typename InputImageType::SizeType InputImageSizeType
Definition: itkPasteImageFilter.h:90
itk::PasteImageFilter::SourceImageIndexType
typename SourceImageType::IndexType SourceImageIndexType
Definition: itkPasteImageFilter.h:91
itk::PasteImageFilter
Paste an image into another image.
Definition: itkPasteImageFilter.h:49
itk::ImageToImageFilter::InputImagePixelType
typename InputImageType::PixelType InputImagePixelType
Definition: itkImageToImageFilter.h:133
itk::GTest::TypedefsAndConstructors::Dimension2::IndexType
ImageBaseType::IndexType IndexType
Definition: itkGTestTypedefsAndConstructors.h:50
itk::ImageSource
Base class for all process objects that output image data.
Definition: itkImageSource.h:67
itk::PasteImageFilter::SourceImageConstPointer
typename SourceImageType::ConstPointer SourceImageConstPointer
Definition: itkPasteImageFilter.h:79
itk::ImageToImageFilter::InputImagePointer
typename InputImageType::Pointer InputImagePointer
Definition: itkImageToImageFilter.h:130
itk::PasteImageFilter::SourceImagePixelType
typename SourceImageType::PixelType SourceImagePixelType
Definition: itkPasteImageFilter.h:84
itk::PasteImageFilter::SourceImageSizeType
typename SourceImageType::SizeType SourceImageSizeType
Definition: itkPasteImageFilter.h:92
itk::PasteImageFilter::OutputImageIndexType
typename OutputImageType::IndexType OutputImageIndexType
Definition: itkPasteImageFilter.h:87
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::PasteImageFilter::m_SourceRegion
SourceImageRegionType m_SourceRegion
Definition: itkPasteImageFilter.h:164
itk::PasteImageFilter::SourceImageType
TSourceImage SourceImageType
Definition: itkPasteImageFilter.h:73
itk::ImageToImageFilter::InputImageType
TInputImage InputImageType
Definition: itkImageToImageFilter.h:129
itk::ImageSource::OutputImageRegionType
typename OutputImageType::RegionType OutputImageRegionType
Definition: itkImageSource.h:92
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itkInPlaceImageFilter.h
itk::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:138
itk::PasteImageFilter::InputImageIndexType
typename InputImageType::IndexType InputImageIndexType
Definition: itkPasteImageFilter.h:89
itk::ImageSource::OutputImagePixelType
typename OutputImageType::PixelType OutputImagePixelType
Definition: itkImageSource.h:93
itkSmartPointer.h
itk::PasteImageFilter::SourceImagePointer
typename SourceImageType::Pointer SourceImagePointer
Definition: itkPasteImageFilter.h:78
itk::ImageToImageFilter::InputImageRegionType
typename InputImageType::RegionType InputImageRegionType
Definition: itkImageToImageFilter.h:132
itk::ImageSource::OutputImageType
TOutputImage OutputImageType
Definition: itkImageSource.h:90