ITK  4.8.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 >
49  public InPlaceImageFilter< TInputImage, TOutputImage >
50 {
51 public:
57 
59  itkNewMacro(Self);
60 
63 
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 
85  typedef typename OutputImageType::IndexType OutputImageIndexType;
86  typedef typename OutputImageType::SizeType OutputImageSizeType;
87  typedef typename InputImageType::IndexType InputImageIndexType;
88  typedef typename InputImageType::SizeType InputImageSizeType;
89  typedef typename SourceImageType::IndexType SourceImageIndexType;
90  typedef typename SourceImageType::SizeType SourceImageSizeType;
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:
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  PasteImageFilter(const Self &); //purposely not implemented
167  void operator=(const Self &); //purposely not implemented
168 };
169 } // end namespace itk
170 
171 #ifndef ITK_MANUAL_INSTANTIATION
172 #include "itkPasteImageFilter.hxx"
173 #endif
174 
175 #endif
InputImageType::PixelType InputImagePixelType
Superclass::OutputImagePointer OutputImagePointer
static const unsigned int OutputImageDimension
SourceImageType::Pointer SourceImagePointer
Superclass::OutputImagePointer OutputImagePointer
void operator=(const Self &)
OutputImageType::PixelType OutputImagePixelType
InputImageType::RegionType InputImageRegionType
SourceImageRegionType m_SourceRegion
Superclass::InputImagePointer InputImagePointer
OutputImageType::IndexType OutputImageIndexType
void SetSourceImage(const SourceImageType *src)
Base class for all process objects that output image data.
InPlaceImageFilter< TInputImage, TOutputImage > Superclass
Paste an image into another image.
void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId) override
virtual void GenerateInputRequestedRegion() override
InputImageIndexType m_DestinationIndex
const SourceImageType * GetSourceImage() const
SourceImageType::RegionType SourceImageRegionType
InputImageType::SizeType InputImageSizeType
unsigned int ThreadIdType
Definition: itkIntTypes.h:159
void PrintSelf(std::ostream &os, Indent indent) const override
virtual void VerifyInputInformation() override
SourceImageType::PixelType SourceImagePixelType
InputImageType::Pointer InputImagePointer
OutputImageType::RegionType OutputImageRegionType
OutputImageType::SizeType OutputImageSizeType
SourceImageType::IndexType SourceImageIndexType
void SetDestinationImage(const InputImageType *dest)
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...
static const unsigned int SourceImageDimension
static const unsigned int InputImageDimension
const InputImageType * GetDestinationImage() const