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: 2008-12-17 19:58:02 $
00007   Version:   $Revision: 1.44 $
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 
00054 template <class TInputImage, class TOutputImage>
00055 class ITK_EXPORT ShrinkImageFilter:
00056     public ImageToImageFilter<TInputImage,TOutputImage>
00057 {
00058 public:
00060   typedef ShrinkImageFilter                             Self;
00061   typedef ImageToImageFilter<TInputImage,TOutputImage>  Superclass;
00062   typedef SmartPointer<Self>                            Pointer;
00063   typedef SmartPointer<const Self>                      ConstPointer;
00064 
00066   itkNewMacro(Self);  
00067 
00069   itkTypeMacro(ShrinkImageFilter, ImageToImageFilter);
00070 
00072   typedef TOutputImage                                OutputImageType;
00073   typedef TInputImage                                 InputImageType;
00074   typedef typename OutputImageType::Pointer           OutputImagePointer;
00075   typedef typename InputImageType::Pointer            InputImagePointer;
00076   typedef typename InputImageType::ConstPointer       InputImageConstPointer;
00077 
00079   typedef typename TOutputImage::RegionType OutputImageRegionType;
00080 
00082   itkStaticConstMacro(ImageDimension, unsigned int,
00083                       TInputImage::ImageDimension );
00084   itkStaticConstMacro(OutputImageDimension, unsigned int,
00085                       TOutputImage::ImageDimension );
00087 
00090   void SetShrinkFactors( unsigned int factors[] );
00091   void SetShrinkFactors( unsigned int factor );
00092   void SetShrinkFactor( unsigned int i, unsigned int factor )
00093     {
00094     m_ShrinkFactors[i] = factor;
00095     }
00097 
00099   const unsigned int * GetShrinkFactors() const
00100     { return m_ShrinkFactors; }
00101 
00109   virtual void GenerateOutputInformation();
00110 
00116   virtual void GenerateInputRequestedRegion();
00117 
00118 #ifdef ITK_USE_CONCEPT_CHECKING
00119 
00120   itkConceptMacro(InputConvertibleToOutputCheck,
00121     (Concept::Convertible<typename TInputImage::PixelType, typename TOutputImage::PixelType>));
00122   itkConceptMacro(SameDimensionCheck,
00123     (Concept::SameDimension<ImageDimension, OutputImageDimension>));
00124 
00126 #endif
00127 
00128 protected:
00129   ShrinkImageFilter();
00130   ~ShrinkImageFilter() {};
00131   void PrintSelf(std::ostream& os, Indent indent) const;
00132 
00143   void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00144                             int threadId );
00145 
00146 private:
00147   ShrinkImageFilter(const Self&); //purposely not implemented
00148   void operator=(const Self&); //purposely not implemented
00149 
00150   unsigned int m_ShrinkFactors[ImageDimension];
00151 };
00152 
00153   
00154 } // end namespace itk
00155   
00156 #ifndef ITK_MANUAL_INSTANTIATION
00157 #include "itkShrinkImageFilter.txx"
00158 #endif
00159   
00160 #endif
00161 

Generated at Sat Feb 28 13:33:04 2009 for ITK by doxygen 1.5.6 written by Dimitri van Heesch, © 1997-2000