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: 2007/08/17 12:51:36 $
00007   Version:   $Revision: 1.47 $
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 
00081   typedef TInputImage InputImageType;
00082   typedef typename InputImageType::Pointer        InputImagePointer;
00083   typedef typename InputImageType::ConstPointer   InputImageConstPointer;
00084   typedef typename InputImageType::RegionType     InputImageRegionType; 
00085   typedef typename InputImageType::PixelType      InputImagePixelType; 
00086 
00088   itkStaticConstMacro(InputImageDimension, unsigned int,
00089                       TInputImage::ImageDimension);
00090   itkStaticConstMacro(OutputImageDimension, unsigned int,
00091                       TOutputImage::ImageDimension);
00093 
00095   virtual void SetInput( const InputImageType *image);
00096   virtual void SetInput( unsigned int, const TInputImage * image);
00097   const InputImageType * GetInput(void);
00098   const InputImageType * GetInput(unsigned int idx);
00100 
00120   virtual void PushBackInput( const InputImageType *image);
00121   virtual void PopBackInput();
00122   virtual void PushFrontInput( const InputImageType *image);
00123   virtual void PopFrontInput();
00125 
00126 
00127  protected:
00128   ImageToImageFilter();
00129   ~ImageToImageFilter();
00130 
00131   virtual void PrintSelf(std::ostream& os, Indent indent) const;
00132 
00157   virtual void GenerateInputRequestedRegion();
00158 
00159 
00162   typedef ImageToImageFilterDetail::ImageRegionCopier<itkGetStaticConstMacro(OutputImageDimension),
00163                     itkGetStaticConstMacro(InputImageDimension)> InputToOutputRegionCopierType;
00164 
00167   typedef ImageToImageFilterDetail::ImageRegionCopier<itkGetStaticConstMacro(InputImageDimension),
00168                     itkGetStaticConstMacro(OutputImageDimension)> OutputToInputRegionCopierType;
00169 
00205   virtual void CallCopyOutputRegionToInputRegion(InputImageRegionType &destRegion,
00206                               const OutputImageRegionType &srcRegion);
00207 
00238   virtual void CallCopyInputRegionToOutputRegion(OutputImageRegionType &destRegion,
00239                               const InputImageRegionType &srcRegion);
00240 
00241 
00250   void PushBackInput(const DataObject *input)
00251     { Superclass::PushBackInput(input); }
00252   void PushFrontInput(const DataObject *input)
00253     { Superclass::PushFrontInput(input); }
00255 
00256 private:
00257   ImageToImageFilter(const Self&); //purposely not implemented
00258   void operator=(const Self&); //purposely not implemented
00259 };
00260 
00261 } // end namespace itk
00262 
00263 // Define instantiation macro for this template.
00264 #define ITK_TEMPLATE_ImageToImageFilter(_, EXPORT, x, y) namespace itk { \
00265   _(2(class EXPORT ImageToImageFilter< ITK_TEMPLATE_2 x >)) \
00266   namespace Templates { typedef ImageToImageFilter< ITK_TEMPLATE_2 x > ImageToImageFilter##y; } \
00267   }
00268 
00269 #if ITK_TEMPLATE_EXPLICIT
00270 # include "Templates/itkImageToImageFilter+-.h"
00271 #endif
00272 
00273 #if ITK_TEMPLATE_TXX
00274 # include "itkImageToImageFilter.txx"
00275 #endif
00276 
00277 #endif
00278 

Generated at Sun Sep 23 13:10:06 2007 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000