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: 2002/12/10 16:05:03 $
00007   Version:   $Revision: 1.37 $
00008 
00009   Copyright (c) 2002 Insight 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 "itkImageSource.h"
00024 #include "itkConceptChecking.h"
00025 #include "itkImageToImageFilterDetail.h"
00026 
00027 namespace itk
00028 {
00029   
00062 template <class TInputImage, class TOutputImage>
00063 class ITK_EXPORT ImageToImageFilter : public ImageSource<TOutputImage>
00064 {
00065 public:
00067   typedef ImageToImageFilter  Self;
00068   typedef ImageSource<TOutputImage>  Superclass;
00069   typedef SmartPointer<Self>  Pointer;
00070   typedef SmartPointer<const Self>  ConstPointer;
00071   
00072   
00074   itkTypeMacro(ImageToImageFilter,ImageSource);
00075 
00077   typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
00078 
00080   typedef TInputImage InputImageType;
00081   typedef typename InputImageType::Pointer        InputImagePointer;
00082   typedef typename InputImageType::ConstPointer   InputImageConstPointer;
00083   typedef typename InputImageType::RegionType     InputImageRegionType; 
00084   typedef typename InputImageType::PixelType      InputImagePixelType; 
00085   
00087   itkStaticConstMacro(InputImageDimension, unsigned int,
00088                       TInputImage::ImageDimension);
00089   itkStaticConstMacro(OutputImageDimension, unsigned int,
00090                       TOutputImage::ImageDimension);
00091 
00093   virtual void SetInput( const InputImageType *image);
00094   virtual void SetInput( unsigned int, const TInputImage * image);
00095   const InputImageType * GetInput(void);
00096   const InputImageType * GetInput(unsigned int idx);
00097 
00098 
00099  protected:
00100   ImageToImageFilter();
00101   ~ImageToImageFilter();
00102 
00103   virtual void PrintSelf(std::ostream& os, Indent indent) const;
00104 
00119   virtual void GenerateInputRequestedRegion();
00120 
00121 
00123   typedef ImageToImageFilterDetail::ImageRegionCopier<itkGetStaticConstMacro(InputImageDimension),
00124                                                       itkGetStaticConstMacro(OutputImageDimension)> RegionCopierType;
00125 
00163   virtual void CallCopyRegion(InputImageRegionType &destRegion,
00164                               const OutputImageRegionType &srcRegion);
00165 
00166 private:
00167   ImageToImageFilter(const Self&); //purposely not implemented
00168   void operator=(const Self&); //purposely not implemented
00169 };
00170 
00171 } // end namespace itk
00172 
00173 #ifndef ITK_MANUAL_INSTANTIATION
00174 #include "itkImageToImageFilter.txx"
00175 #endif
00176 
00177 #endif

Generated at Fri May 21 01:14:56 2004 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000