ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkPasteImageFilter.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 itkPasteImageFilter_h
19 #define itkPasteImageFilter_h
20 
21 #include "itkInPlaceImageFilter.h"
22 #include "itkSmartPointer.h"
23 
24 namespace itk
25 {
47 template< typename TInputImage, typename TSourceImage = TInputImage, typename TOutputImage = TInputImage >
48 class ITK_TEMPLATE_EXPORT PasteImageFilter:
49  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 GenerateInputRequestedRegion() override;
133 
134 
140  void VerifyInputInformation() ITKv5_CONST override {}
141 
142 protected:
144  ~PasteImageFilter() override = default;
145  void PrintSelf(std::ostream & os, Indent indent) const override;
146 
156  void DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
157 
158 
160 
162 };
163 } // end namespace itk
164 
165 #ifndef ITK_MANUAL_INSTANTIATION
166 #include "itkPasteImageFilter.hxx"
167 #endif
168 
169 #endif
typename OutputImageType::Pointer OutputImagePointer
typename SourceImageType::ConstPointer SourceImageConstPointer
SourceImageRegionType m_SourceRegion
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
void VerifyInputInformation() ITKv5_CONST override
typename SourceImageType::SizeType SourceImageSizeType
typename OutputImageType::IndexType OutputImageIndexType
Base class for all process objects that output image data.
Paste an image into another image.
typename OutputImageType::SizeType OutputImageSizeType
typename OutputImageType::PixelType OutputImagePixelType
typename InputImageType::PixelType InputImagePixelType
typename SourceImageType::RegionType SourceImageRegionType
typename SourceImageType::Pointer SourceImagePointer
typename InputImageType::Pointer InputImagePointer
InputImageIndexType m_DestinationIndex
typename OutputImageType::RegionType OutputImageRegionType
TOutputImage OutputImageType
typename InputImageType::IndexType InputImageIndexType
typename InputImageType::SizeType InputImageSizeType
typename SourceImageType::PixelType SourceImagePixelType
typename SourceImageType::IndexType SourceImageIndexType
typename InputImageType::RegionType InputImageRegionType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Base class for filters that take an image as input and overwrite that image as the output...