ITK  4.4.0
Insight Segmentation and Registration Toolkit
itkImageRegionSplitterMultidimensional.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef __itkImageRegionSplitterMultidimensional_h
19 #define __itkImageRegionSplitterMultidimensional_h
20 
21 #include "itkRegion.h"
22 #include "itkIndex.h"
24 
25 namespace itk
26 {
60 {
61 public:
67 
69  itkNewMacro(Self);
70 
73 
74 protected:
76 
77 
78  virtual unsigned int GetNumberOfSplitsInternal(unsigned int dim,
79  const IndexValueType regionIndex[],
80  const SizeValueType regionSize[],
81  unsigned int requestedNumber) const;
82 
83  virtual unsigned int GetSplitInternal(unsigned int dim,
84  unsigned int i,
85  unsigned int numberOfPieces,
86  IndexValueType regionIndex[],
87  SizeValueType regionSize[]) const;
88 
89  void PrintSelf(std::ostream & os, Indent indent) const;
90 
91 private:
92  ImageRegionSplitterMultidimensional(const Self &); //purposely not implemented
93  void operator=(const Self &); //purposely not
94  //implemented
95 
96  static unsigned int ComputeSplits(unsigned int dim,
97  unsigned int requestedNumber,
98  const IndexValueType regionIndex[],
99  const SizeValueType regionSize[],
100  unsigned int splits[]);
101 
102 };
103 } // end namespace itk
104 
105 #endif
106