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

itkImageRegionSplitter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkImageRegionSplitter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-08-17 13:39:44 $
00007   Version:   $Revision: 1.12 $
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 __itkImageRegionSplitter_h
00018 #define __itkImageRegionSplitter_h
00019 
00020 #include "itkObject.h"
00021 #include "itkRegion.h"
00022 #include "itkImageRegion.h"
00023 #include "itkObjectFactory.h"
00024 #include "itkIndex.h"
00025 #include "itkSize.h"
00026 
00027 namespace itk
00028 {
00029 
00065 template <unsigned int VImageDimension>
00066 class ITK_EXPORT ImageRegionSplitter: public Object
00067 {
00068 public:
00070   typedef ImageRegionSplitter               Self;
00071   typedef Object                            Superclass;
00072   typedef SmartPointer<Self>                Pointer;
00073   typedef SmartPointer<const Self>          ConstPointer;
00074 
00076   itkNewMacro(Self);
00077 
00079   itkTypeMacro(ImageRegionSplitter,Object);
00080 
00082   itkStaticConstMacro(ImageDimension, unsigned int, VImageDimension);
00083 
00085   static unsigned int GetImageDimension() 
00086     { return VImageDimension; }
00087 
00089   typedef Index<VImageDimension>                IndexType;
00090   typedef typename IndexType::IndexValueType    IndexValueType;
00091 
00093   typedef Size<VImageDimension>                 SizeType;
00094   typedef typename SizeType::SizeValueType      SizeValueType;
00095 
00097   typedef ImageRegion<VImageDimension> RegionType;
00098 
00105   virtual unsigned int GetNumberOfSplits(const RegionType &region,
00106                                          unsigned int requestedNumber);
00107 
00111   virtual RegionType GetSplit(unsigned int i, unsigned int numberOfPieces,
00112                               const RegionType &region);
00113 
00114 protected:
00115   ImageRegionSplitter() {}
00116   ~ImageRegionSplitter() {}
00117   void PrintSelf(std::ostream& os, Indent indent) const;
00118 
00119 private:
00120   ImageRegionSplitter(const ImageRegionSplitter&); //purposely not implemented
00121   void operator=(const ImageRegionSplitter&); //purposely not implemented
00122 
00123 };
00124 
00125 
00126 } // end namespace itk
00127 
00128 // Define instantiation macro for this template.
00129 #define ITK_TEMPLATE_ImageRegionSplitter(_, EXPORT, x, y) namespace itk { \
00130   _(1(class EXPORT ImageRegionSplitter< ITK_TEMPLATE_1 x >)) \
00131   namespace Templates { typedef ImageRegionSplitter< ITK_TEMPLATE_1 x > ImageRegionSplitter##y; } \
00132   }
00133 
00134 #if ITK_TEMPLATE_EXPLICIT
00135 # include "Templates/itkImageRegionSplitter+-.h"
00136 #endif
00137 
00138 #if ITK_TEMPLATE_TXX
00139 # include "itkImageRegionSplitter.txx"
00140 #endif
00141 
00142 #endif
00143 

Generated at Tue Sep 15 03:27:54 2009 for ITK by doxygen 1.5.8 written by Dimitri van Heesch, © 1997-2000