ITK  4.6.0
Insight Segmentation and Registration Toolkit
itkImageToImageFilter.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 /*=========================================================================
19  *
20  * Portions of this file are subject to the VTK Toolkit Version 3 copyright.
21  *
22  * Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
23  *
24  * For complete copyright, license and disclaimer of warranty information
25  * please refer to the NOTICE file at the top of the ITK source tree.
26  *
27  *=========================================================================*/
28 #ifndef __itkImageToImageFilter_h
29 #define __itkImageToImageFilter_h
30 
31 #include "itkImageSource.h"
32 #include "itkConceptChecking.h"
34 
35 namespace itk
36 {
101 template< typename TInputImage, typename TOutputImage >
102 class ImageToImageFilter:public ImageSource< TOutputImage >
103 {
104 public:
110 
113 
117 
119  typedef TInputImage InputImageType;
120  typedef typename InputImageType::Pointer InputImagePointer;
121  typedef typename InputImageType::ConstPointer InputImageConstPointer;
122  typedef typename InputImageType::RegionType InputImageRegionType;
123  typedef typename InputImageType::PixelType InputImagePixelType;
124 
126  itkStaticConstMacro(InputImageDimension, unsigned int,
127  TInputImage::ImageDimension);
128  itkStaticConstMacro(OutputImageDimension, unsigned int,
129  TOutputImage::ImageDimension);
131 
133  using Superclass::SetInput;
134  virtual void SetInput(const InputImageType *image);
135 
136  virtual void SetInput(unsigned int, const TInputImage *image);
137 
138  const InputImageType * GetInput(void) const;
139 
140  const InputImageType * GetInput(unsigned int idx) const;
141 
161  virtual void PushBackInput(const InputImageType *image);
162 
163  virtual void PopBackInput();
164 
165  virtual void PushFrontInput(const InputImageType *image);
166 
167  virtual void PopFrontInput();
168 
174  itkSetMacro(CoordinateTolerance,double);
175  itkGetConstMacro(CoordinateTolerance,double);
177 
183  itkSetMacro(DirectionTolerance,double);
184  itkGetConstMacro(DirectionTolerance,double);
186 
187 protected:
190 
191  virtual void PrintSelf(std::ostream & os, Indent indent) const;
192 
212  virtual void VerifyInputInformation();
213 
238  virtual void GenerateInputRequestedRegion();
239 
242  typedef ImageToImageFilterDetail::ImageRegionCopier< itkGetStaticConstMacro(OutputImageDimension),
243  itkGetStaticConstMacro(InputImageDimension) >
245 
248  typedef ImageToImageFilterDetail::ImageRegionCopier< itkGetStaticConstMacro(InputImageDimension),
249  itkGetStaticConstMacro(OutputImageDimension) >
251 
288  const OutputImageRegionType & srcRegion);
289 
321  const InputImageRegionType & srcRegion);
322 
331  void PushBackInput(const DataObject *input)
332  { Superclass::PushBackInput(input); }
333  void PushFrontInput(const DataObject *input)
334  { Superclass::PushFrontInput(input); }
336 
337 private:
338  ImageToImageFilter(const Self &); //purposely not implemented
339  void operator=(const Self &); //purposely not implemented
346 };
347 } // end namespace itk
348 
349 #ifndef ITK_MANUAL_INSTANTIATION
350 #include "itkImageToImageFilter.hxx"
351 #endif
352 
353 #endif
virtual void VerifyInputInformation()
Verifies that the input images occupy the same physical space and the each index is at the same physi...
InputImageType::ConstPointer InputImageConstPointer
A Function object used to dispatching to a routine to copy a region (start index and size)...
virtual void PushFrontInput(const DataObject *input)
void PushBackInput(const DataObject *input)
InputImageType::Pointer InputImagePointer
virtual void CallCopyOutputRegionToInputRegion(InputImageRegionType &destRegion, const OutputImageRegionType &srcRegion)
Superclass::OutputImagePixelType OutputImagePixelType
void operator=(const Self &)
Base class for all process objects that output image data.
static const unsigned int InputImageDimension
SmartPointer< Self > Pointer
virtual void PopFrontInput()
virtual void SetInput(const InputImageType *image)
InputImageType::RegionType InputImageRegionType
ImageToImageFilterDetail::ImageRegionCopier< itkGetStaticConstMacro(InputImageDimension), itkGetStaticConstMacro(OutputImageDimension) > OutputToInputRegionCopierType
virtual void SetInput(const DataObjectIdentifierType &key, DataObject *input)
const InputImageType * GetInput(void) const
virtual void PushBackInput(const DataObject *input)
static const unsigned int OutputImageDimension
OutputImageType::PixelType OutputImagePixelType
ImageToImageFilterDetail::ImageRegionCopier< itkGetStaticConstMacro(OutputImageDimension), itkGetStaticConstMacro(InputImageDimension) > InputToOutputRegionCopierType
virtual void PushFrontInput(const InputImageType *image)
InputImageType::PixelType InputImagePixelType
virtual void PushBackInput(const InputImageType *image)
Base class for filters that take an image as input and produce an image as output.
virtual void GenerateInputRequestedRegion()
OutputImageType::RegionType OutputImageRegionType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
virtual void CallCopyInputRegionToOutputRegion(OutputImageRegionType &destRegion, const InputImageRegionType &srcRegion)
Superclass::OutputImageRegionType OutputImageRegionType
SmartPointer< const Self > ConstPointer
virtual void PopBackInput()
Base class for all data objects in ITK.
virtual void PrintSelf(std::ostream &os, Indent indent) const
ImageSource< TOutputImage > Superclass
void PushFrontInput(const DataObject *input)