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/09/11 19:57:13 $
00007   Version:   $Revision: 1.36 $
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   
00073   itkNewMacro(Self);
00074   
00076   itkTypeMacro(ImageToImageFilter,ImageSource);
00077 
00079   typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
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);
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);
00099 
00100 
00101  protected:
00102   ImageToImageFilter();
00103   ~ImageToImageFilter();
00104 
00105   virtual void PrintSelf(std::ostream& os, Indent indent) const;
00106 
00121   virtual void GenerateInputRequestedRegion();
00122 
00123 
00125   typedef ImageToImageFilterDetail::ImageRegionCopier<itkGetStaticConstMacro(InputImageDimension),
00126                                                       itkGetStaticConstMacro(OutputImageDimension)> RegionCopierType;
00127 
00165   virtual void CallCopyRegion(InputImageRegionType &destRegion,
00166                               const OutputImageRegionType &srcRegion);
00167 
00168 private:
00169   ImageToImageFilter(const Self&); //purposely not implemented
00170   void operator=(const Self&); //purposely not implemented
00171 };
00172 
00173 } // end namespace itk
00174 
00175 #ifndef ITK_MANUAL_INSTANTIATION
00176 #include "itkImageToImageFilter.txx"
00177 #endif
00178 
00179 #endif

Generated at Wed Mar 12 01:13:02 2003 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000