00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
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 ®ion,
00106 unsigned int requestedNumber);
00107
00111 virtual RegionType GetSplit(unsigned int i, unsigned int numberOfPieces,
00112 const RegionType ®ion);
00113
00114 protected:
00115 ImageRegionSplitter() {}
00116 ~ImageRegionSplitter() {}
00117 void PrintSelf(std::ostream& os, Indent indent) const;
00118
00119 private:
00120 ImageRegionSplitter(const ImageRegionSplitter&);
00121 void operator=(const ImageRegionSplitter&);
00122
00123 };
00124
00125
00126 }
00127
00128
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