OTB  6.7.0
Orfeo Toolbox
otbImageRegionNonUniformMultidimensionalSplitter.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1999-2011 Insight Software Consortium
3  * Copyright (C) 2005-2019 Centre National d'Etudes Spatiales (CNES)
4  *
5  * This file is part of Orfeo Toolbox
6  *
7  * https://www.orfeo-toolbox.org/
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  */
21 
22 #ifndef otbImageRegionNonUniformMultidimensionalSplitter_h
23 #define otbImageRegionNonUniformMultidimensionalSplitter_h
24 
25 #include "itkRegion.h"
26 #include "itkObjectFactory.h"
27 #include "itkIndex.h"
28 #include "itkSize.h"
29 #include "itkImageRegionSplitter.h"
30 
31 namespace otb
32 {
33 
65 template <unsigned int VImageDimension>
67 {
68 public:
74 
76  itkNewMacro(Self);
77 
79  itkTypeMacro(ImageRegionNonUniformMultidimensionalSplitter, ImageRegionSplitter);
80 
82  itkStaticConstMacro(ImageDimension, unsigned int, VImageDimension);
83 
86 
89 
92 
99  unsigned int GetNumberOfSplits(const RegionType& region,
100  unsigned int requestedNumber) override;
101 
105  RegionType GetSplit(unsigned int i, unsigned int numberOfPieces,
106  const RegionType& region) override;
107 
108 protected:
111  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
112 
113 private:
114  ImageRegionNonUniformMultidimensionalSplitter(const Self &) = delete;
115  void operator =(const Self&) = delete;
116 
117 };
118 
119 } // end namespace otb
120 
121 // Define instantiation macro for this template.
122 #define ITK_TEMPLATE_ImageRegionNonUniformMultidimensionalSplitter(_, EXPORT, x, y) namespace otb { \
123  _(1 (class EXPORT ImageRegionNonUniformMultidimensionalSplitter<ITK_TEMPLATE_1 x>)) \
124  namespace Templates { typedef ImageRegionNonUniformMultidimensionalSplitter<ITK_TEMPLATE_1 x> \
125  ImageRegionNonUniformMultidimensionalSplitter ## y; } \
126  }
127 
128 #if ITK_TEMPLATE_EXPLICIT
129 # include "Templates/otbImageRegionNonUniformMultidimensionalSplitter+-.h"
130 #endif
131 
132 #ifndef ITK_MANUAL_INSTANTIATION
134 #endif
135 
136 #endif