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

itkShrinkImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkShrinkImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2003/09/10 14:28:56 $
00007   Version:   $Revision: 1.39 $
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 __itkShrinkImageFilter_h
00021 #define __itkShrinkImageFilter_h
00022 
00023 #include "itkImageToImageFilter.h"
00024 
00025 namespace itk
00026 {
00027 
00051 template <class TInputImage, class TOutputImage>
00052 class ITK_EXPORT ShrinkImageFilter:
00053     public ImageToImageFilter<TInputImage,TOutputImage>
00054 {
00055 public:
00057   typedef ShrinkImageFilter         Self;
00058   typedef ImageToImageFilter<TInputImage,TOutputImage>  Superclass;
00059   typedef SmartPointer<Self>  Pointer;
00060   typedef SmartPointer<const Self>  ConstPointer;
00061 
00063   itkNewMacro(Self);  
00064 
00066   itkTypeMacro(ShrinkImageFilter, ImageToImageFilter);
00067 
00069   typedef TOutputImage                                OutputImageType;
00070   typedef TInputImage                                 InputImageType;
00071   typedef typename OutputImageType::Pointer           OutputImagePointer;
00072   typedef typename InputImageType::Pointer            InputImagePointer;
00073   typedef typename InputImageType::ConstPointer       InputImageConstPointer;
00074 
00076   typedef typename TOutputImage::RegionType OutputImageRegionType;
00077 
00079   itkStaticConstMacro(ImageDimension, unsigned int,
00080                       TInputImage::ImageDimension );
00081 
00084   void SetShrinkFactors( unsigned int factors[] );
00085   void SetShrinkFactors( unsigned int factor );
00086   void SetShrinkFactor( unsigned int i, unsigned int factor )
00087   {
00088     m_ShrinkFactors[i] = factor;
00089   }
00090   
00092   const unsigned int * GetShrinkFactors() const
00093   { return m_ShrinkFactors; }
00094                  
00102   virtual void GenerateOutputInformation();
00103 
00109   virtual void GenerateInputRequestedRegion();
00110 
00111 protected:
00112   ShrinkImageFilter();
00113   ~ShrinkImageFilter() {};
00114   void PrintSelf(std::ostream& os, Indent indent) const;
00115 
00126   void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00127                             int threadId );
00128 
00129 private:
00130   ShrinkImageFilter(const Self&); //purposely not implemented
00131   void operator=(const Self&); //purposely not implemented
00132 
00133   unsigned int m_ShrinkFactors[ImageDimension];
00134 };
00135 
00136   
00137 } // end namespace itk
00138   
00139 #ifndef ITK_MANUAL_INSTANTIATION
00140 #include "itkShrinkImageFilter.txx"
00141 #endif
00142   
00143 #endif

Generated at Thu May 25 00:03:39 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000