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: 2006/03/22 16:26:43 $
00007   Version:   $Revision: 1.18 $
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   itkStaticConstMacro(OutputImageDimension, unsigned int,
00071                       TOutputImage::ImageDimension );
00073 
00076   void SetShrinkFactors( unsigned int factors[] );
00077   void SetShrinkFactors( unsigned int factor );
00078   void SetShrinkFactor( unsigned int i, unsigned int factor )
00079   {
00080     m_ShrinkFactors[i] = factor;
00081   }
00083 
00085   const unsigned int * GetShrinkFactors() const
00086   { return m_ShrinkFactors; }
00087 
00095   virtual void GenerateOutputInformation();
00096 
00103   virtual void GenerateInputRequestedRegion();
00104 
00105 #ifdef ITK_USE_CONCEPT_CHECKING
00106 
00107   itkConceptMacro(InputConvertibleToOutputCheck,
00108     (Concept::Convertible<typename TInputImage::PixelType,
00109                           typename TOutputImage::PixelType>));
00110   itkConceptMacro(SameDimensionCheck,
00111     (Concept::SameDimension<ImageDimension, OutputImageDimension>));
00112 
00114 #endif
00115 
00116 protected:
00117   NonThreadedShrinkImageFilter();
00118   ~NonThreadedShrinkImageFilter() {};
00119   void PrintSelf(std::ostream& os, Indent indent) const;
00120   
00121   void GenerateData();
00122 
00123 private:
00124   NonThreadedShrinkImageFilter(const Self&); //purposely not implemented
00125   void operator=(const Self&); //purposely not implemented
00126 
00127   unsigned int m_ShrinkFactors[ImageDimension];
00128 };
00129   
00130 } // end namespace itk
00131   
00132 #ifndef ITK_MANUAL_INSTANTIATION
00133 #include "itkNonThreadedShrinkImageFilter.txx"
00134 #endif
00135   
00136 #endif
00137 

Generated at Tue Jul 29 21:31:53 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000