00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkImageRegionSplitter.h,v $ 00005 Language: C++ 00006 Date: $Date: 2002/09/11 19:57:13 $ 00007 Version: $Revision: 1.8 $ 00008 00009 Copyright (c) 2002 Insight 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 ®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&); //purposely not implemented 00121 void operator=(const ImageRegionSplitter&); //purposely not implemented 00122 00123 }; 00124 00125 00126 } // end namespace itk 00127 00128 #ifndef ITK_MANUAL_INSTANTIATION 00129 #include "itkImageRegionSplitter.txx" 00130 #endif 00131 00132 #endif 00133