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: 2003/12/04 16:00:40 $
00007   Version:   $Revision: 1.41 $
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);
00092 
00094   virtual void SetInput( const InputImageType *image);
00095   virtual void SetInput( unsigned int, const TInputImage * image);
00096   const InputImageType * GetInput(void);
00097   const InputImageType * GetInput(unsigned int idx);
00098 
00099 
00100  protected:
00101   ImageToImageFilter();
00102   ~ImageToImageFilter();
00103 
00104   virtual void PrintSelf(std::ostream& os, Indent indent) const;
00105 
00130   virtual void GenerateInputRequestedRegion();
00131 
00132 
00135   typedef ImageToImageFilterDetail::ImageRegionCopier<itkGetStaticConstMacro(OutputImageDimension),
00136                     itkGetStaticConstMacro(InputImageDimension)> InputToOutputRegionCopierType;
00137 
00140   typedef ImageToImageFilterDetail::ImageRegionCopier<itkGetStaticConstMacro(InputImageDimension),
00141                     itkGetStaticConstMacro(OutputImageDimension)> OutputToInputRegionCopierType;
00142 
00178   virtual void CallCopyOutputRegionToInputRegion(InputImageRegionType &destRegion,
00179                               const OutputImageRegionType &srcRegion);
00180 
00211   virtual void CallCopyInputRegionToOutputRegion(OutputImageRegionType &destRegion,
00212                               const InputImageRegionType &srcRegion);
00213   
00214 
00215 private:
00216   ImageToImageFilter(const Self&); //purposely not implemented
00217   void operator=(const Self&); //purposely not implemented
00218 };
00219 
00220 } // end namespace itk
00221 
00222 #ifndef ITK_MANUAL_INSTANTIATION
00223 #include "itkImageToImageFilter.txx"
00224 #endif
00225 
00226 #endif

Generated at Sun Jan 25 13:19:37 2004 for ITK by doxygen 1.3.3 written by Dimitri van Heesch, © 1997-2000