ITK  4.13.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:
57 
59  itkNewMacro(Self);
60 
63 
65  typedef typename Superclass::InputImagePointer InputImagePointer;
66  typedef typename Superclass::OutputImagePointer OutputImagePointer;
67 
69  typedef TInputImage InputImageType;
70  typedef TOutputImage OutputImageType;
71  typedef TSourceImage SourceImageType;
72  typedef typename OutputImageType::RegionType OutputImageRegionType;
73  typedef typename InputImageType::RegionType InputImageRegionType;
74  typedef typename SourceImageType::RegionType SourceImageRegionType;
75 
76  typedef typename SourceImageType::Pointer SourceImagePointer;
77  typedef typename SourceImageType::ConstPointer SourceImageConstPointer;
78 
80  typedef typename OutputImageType::PixelType OutputImagePixelType;
81  typedef typename InputImageType::PixelType InputImagePixelType;
82  typedef typename SourceImageType::PixelType SourceImagePixelType;
83 
91 
93  itkStaticConstMacro(InputImageDimension, unsigned int,
94  InputImageType::ImageDimension);
95  itkStaticConstMacro(OutputImageDimension, unsigned int,
96  OutputImageType::ImageDimension);
97  itkStaticConstMacro(SourceImageDimension, unsigned int,
98  SourceImageType::ImageDimension);
100 
103  itkSetMacro(DestinationIndex, InputImageIndexType);
104  itkGetConstMacro(DestinationIndex, InputImageIndexType);
106 
109  itkSetMacro(SourceRegion, SourceImageRegionType);
110  itkGetConstMacro(SourceRegion, SourceImageRegionType);
112 
115  void SetDestinationImage(const InputImageType *dest);
116 
117  const InputImageType * GetDestinationImage() const;
118 
121  void SetSourceImage(const SourceImageType *src);
122 
123  const SourceImageType * GetSourceImage() const;
124 
134  virtual void GenerateInputRequestedRegion() ITK_OVERRIDE;
135 
136 
142  virtual void VerifyInputInformation() ITK_OVERRIDE {}
143 
144 protected:
146  ~PasteImageFilter() ITK_OVERRIDE {}
147  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
148 
158  void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread,
159  ThreadIdType threadId) ITK_OVERRIDE;
160 
162 
164 
165 private:
166  ITK_DISALLOW_COPY_AND_ASSIGN(PasteImageFilter);
167 };
168 } // end namespace itk
169 
170 #ifndef ITK_MANUAL_INSTANTIATION
171 #include "itkPasteImageFilter.hxx"
172 #endif
173 
174 #endif
InputImageType::PixelType InputImagePixelType
Superclass::OutputImagePointer OutputImagePointer
SourceImageType::Pointer SourceImagePointer
OutputImageType::PixelType OutputImagePixelType
InputImageType::RegionType InputImageRegionType
SourceImageRegionType m_SourceRegion
Superclass::InputImagePointer InputImagePointer
OutputImageType::IndexType OutputImageIndexType
Base class for all process objects that output image data.
InPlaceImageFilter< TInputImage, TOutputImage > Superclass
Paste an image into another image.
InputImageIndexType m_DestinationIndex
SourceImageType::RegionType SourceImageRegionType
InputImageType::SizeType InputImageSizeType
unsigned int ThreadIdType
Definition: itkIntTypes.h:159
SourceImageType::PixelType SourceImagePixelType
OutputImageType::RegionType OutputImageRegionType
OutputImageType::SizeType OutputImageSizeType
SourceImageType::IndexType SourceImageIndexType
SmartPointer< Self > Pointer
SourceImageType::ConstPointer SourceImageConstPointer
SourceImageType::SizeType SourceImageSizeType
SmartPointer< const Self > ConstPointer
InputImageType::IndexType InputImageIndexType
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...