Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkImageToImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkImageToImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-02-05 19:04:57 $
00007   Version:   $Revision: 1.49 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012   Portions of this code are covered under the VTK copyright.
00013   See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm for details.
00014 
00015      This software is distributed WITHOUT ANY WARRANTY; without even 
00016      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00017      PURPOSE.  See the above copyright notices for more information.
00018 
00019 =========================================================================*/
00020 #ifndef __itkImageToImageFilter_h
00021 #define __itkImageToImageFilter_h
00022 
00023 #include "itkImage.h"
00024 #include "itkImageSource.h"
00025 #include "itkConceptChecking.h"
00026 #include "itkImageToImageFilterDetail.h"
00027 
00028 namespace itk
00029 {
00030   
00063 template <class TInputImage, class TOutputImage>
00064 class ITK_EXPORT ImageToImageFilter : public ImageSource<TOutputImage>
00065 {
00066 public:
00068   typedef ImageToImageFilter         Self;
00069   typedef ImageSource<TOutputImage>  Superclass;
00070   typedef SmartPointer<Self>         Pointer;
00071   typedef SmartPointer<const Self>   ConstPointer;
00072 
00073   
00075   itkTypeMacro(ImageToImageFilter,ImageSource);
00076 
00078   typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
00079   typedef typename Superclass::OutputImagePixelType  OutputImagePixelType;
00080 
00082   typedef TInputImage                             InputImageType;
00083   typedef typename InputImageType::Pointer        InputImagePointer;
00084   typedef typename InputImageType::ConstPointer   InputImageConstPointer;
00085   typedef typename InputImageType::RegionType     InputImageRegionType; 
00086   typedef typename InputImageType::PixelType      InputImagePixelType; 
00087 
00089   itkStaticConstMacro(InputImageDimension, unsigned int,
00090                       TInputImage::ImageDimension);
00091   itkStaticConstMacro(OutputImageDimension, unsigned int,
00092                       TOutputImage::ImageDimension);
00094 
00096   virtual void SetInput( const InputImageType *image);
00097   virtual void SetInput( unsigned int, const TInputImage * image);
00098   const InputImageType * GetInput(void);
00099   const InputImageType * GetInput(unsigned int idx);
00101 
00121   virtual void PushBackInput( const InputImageType *image);
00122   virtual void PopBackInput();
00123   virtual void PushFrontInput( const InputImageType *image);
00124   virtual void PopFrontInput();
00126 
00127 
00128 protected:
00129   ImageToImageFilter();
00130   ~ImageToImageFilter();
00131 
00132   virtual void PrintSelf(std::ostream& os, Indent indent) const;
00133 
00158   virtual void GenerateInputRequestedRegion();
00159 
00160 
00163   typedef ImageToImageFilterDetail::ImageRegionCopier<itkGetStaticConstMacro(OutputImageDimension),
00164                     itkGetStaticConstMacro(InputImageDimension)> InputToOutputRegionCopierType;
00165 
00168   typedef ImageToImageFilterDetail::ImageRegionCopier<itkGetStaticConstMacro(InputImageDimension),
00169                     itkGetStaticConstMacro(OutputImageDimension)> OutputToInputRegionCopierType;
00170 
00206   virtual void CallCopyOutputRegionToInputRegion(InputImageRegionType &destRegion,
00207                               const OutputImageRegionType &srcRegion);
00208 
00239   virtual void CallCopyInputRegionToOutputRegion(OutputImageRegionType &destRegion,
00240                               const InputImageRegionType &srcRegion);
00241 
00242 
00251   void PushBackInput(const DataObject *input)
00252     { Superclass::PushBackInput(input); }
00253   void PushFrontInput(const DataObject *input)
00254     { Superclass::PushFrontInput(input); }
00256 
00257 private:
00258   ImageToImageFilter(const Self&); //purposely not implemented
00259   void operator=(const Self&); //purposely not implemented
00260 };
00261 
00262 } // end namespace itk
00263 
00264 // Define instantiation macro for this template.
00265 #define ITK_TEMPLATE_ImageToImageFilter(_, EXPORT, x, y) namespace itk { \
00266   _(2(class EXPORT ImageToImageFilter< ITK_TEMPLATE_2 x >)) \
00267   namespace Templates { typedef ImageToImageFilter< ITK_TEMPLATE_2 x > ImageToImageFilter##y; } \
00268   }
00269 
00270 #if ITK_TEMPLATE_EXPLICIT
00271 # include "Templates/itkImageToImageFilter+-.h"
00272 #endif
00273 
00274 #if ITK_TEMPLATE_TXX
00275 # include "itkImageToImageFilter.txx"
00276 #endif
00277 
00278 #endif
00279 

Generated at Mon Jul 12 2010 18:47:13 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000