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

itkNonThreadedShrinkImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkNonThreadedShrinkImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2003/09/10 14:28:53 $
00007   Version:   $Revision: 1.17 $
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      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
00015 
00016 =========================================================================*/
00017 #ifndef __itkNonThreadedShrinkImageFilter_h
00018 #define __itkNonThreadedShrinkImageFilter_h
00019 
00020 #include "itkImageToImageFilter.h"
00021 
00022 namespace itk
00023 {
00024 
00040 template <class TInputImage, class TOutputImage>
00041 class ITK_EXPORT NonThreadedShrinkImageFilter:
00042     public ImageToImageFilter<TInputImage,TOutputImage>
00043 {
00044 public:
00046   typedef NonThreadedShrinkImageFilter         Self;
00047   typedef ImageToImageFilter<TInputImage,TOutputImage>  Superclass;
00048   typedef SmartPointer<Self>  Pointer;
00049   typedef SmartPointer<const Self>  ConstPointer;
00050 
00052   itkNewMacro(Self);  
00053 
00055   itkTypeMacro(NonThreadedShrinkImageFilter, ImageToImageFilter);
00056 
00058   typedef TOutputImage                                OutputImageType;
00059   typedef TInputImage                                 InputImageType;
00060   typedef typename OutputImageType::Pointer           OutputImagePointer;
00061   typedef typename InputImageType::Pointer            InputImagePointer;
00062   typedef typename InputImageType::ConstPointer       InputImageConstPointer;
00063 
00065   typedef typename TOutputImage::RegionType OutputImageRegionType;
00066 
00068   itkStaticConstMacro(ImageDimension, unsigned int,
00069                       TInputImage::ImageDimension );
00070 
00073   void SetShrinkFactors( unsigned int factors[] );
00074   void SetShrinkFactors( unsigned int factor );
00075   void SetShrinkFactor( unsigned int i, unsigned int factor )
00076   {
00077     m_ShrinkFactors[i] = factor;
00078   }
00079   
00081   const unsigned int * GetShrinkFactors() const
00082   { return m_ShrinkFactors; }
00083 
00091   virtual void GenerateOutputInformation();
00092 
00099   virtual void GenerateInputRequestedRegion();
00100 
00101 protected:
00102   NonThreadedShrinkImageFilter();
00103   ~NonThreadedShrinkImageFilter() {};
00104   void PrintSelf(std::ostream& os, Indent indent) const;
00105   
00106   void GenerateData();
00107 
00108 private:
00109   NonThreadedShrinkImageFilter(const Self&); //purposely not implemented
00110   void operator=(const Self&); //purposely not implemented
00111 
00112   unsigned int m_ShrinkFactors[ImageDimension];
00113 };
00114   
00115 } // end namespace itk
00116   
00117 #ifndef ITK_MANUAL_INSTANTIATION
00118 #include "itkNonThreadedShrinkImageFilter.txx"
00119 #endif
00120   
00121 #endif

Generated at Wed May 24 23:47:01 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000