OTB  9.0.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-2022 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>
66 class ITK_EXPORT ImageRegionNonUniformMultidimensionalSplitter : public itk::ImageRegionSplitter<VImageDimension>
67 {
68 public:
71  typedef itk::ImageRegionSplitter<VImageDimension> Superclass;
72  typedef itk::SmartPointer<Self> Pointer;
73  typedef itk::SmartPointer<const Self> ConstPointer;
74 
76  itkNewMacro(Self);
77 
79  itkTypeMacro(ImageRegionNonUniformMultidimensionalSplitter, ImageRegionSplitter);
80 
82  itkStaticConstMacro(ImageDimension, unsigned int, VImageDimension);
83 
85  typedef itk::Index<VImageDimension> IndexType;
86 
88  typedef itk::Size<VImageDimension> SizeType;
89 
91  typedef itk::ImageRegion<VImageDimension> RegionType;
92 
99  unsigned int GetNumberOfSplits(const RegionType& region, unsigned int requestedNumber) override;
100 
104  RegionType GetSplit(unsigned int i, unsigned int numberOfPieces, const RegionType& region) override;
105 
106 protected:
108  {
109  }
111  {
112  }
113  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
114 
115 private:
116  ImageRegionNonUniformMultidimensionalSplitter(const Self&) = delete;
117  void operator=(const Self&) = delete;
118 };
119 
120 } // end namespace otb
121 
122 // Define instantiation macro for this template.
123 #define ITK_TEMPLATE_ImageRegionNonUniformMultidimensionalSplitter(_, EXPORT, x, y) \
124  namespace otb \
125  { \
126  _(1(class EXPORT ImageRegionNonUniformMultidimensionalSplitter<ITK_TEMPLATE_1 x>)) \
127  namespace Templates \
128  { \
129  typedef ImageRegionNonUniformMultidimensionalSplitter<ITK_TEMPLATE_1 x> ImageRegionNonUniformMultidimensionalSplitter##y; \
130  } \
131  }
132 
133 #if ITK_TEMPLATE_EXPLICIT
134 #include "Templates/otbImageRegionNonUniformMultidimensionalSplitter+-.h"
135 #endif
136 
137 #ifndef ITK_MANUAL_INSTANTIATION
139 #endif
140 
141 #endif
otb::ImageRegionNonUniformMultidimensionalSplitter::Self
ImageRegionNonUniformMultidimensionalSplitter Self
Definition: otbImageRegionNonUniformMultidimensionalSplitter.h:70
otb::ImageRegionNonUniformMultidimensionalSplitter::~ImageRegionNonUniformMultidimensionalSplitter
~ImageRegionNonUniformMultidimensionalSplitter() override
Definition: otbImageRegionNonUniformMultidimensionalSplitter.h:110
otb::ImageRegionNonUniformMultidimensionalSplitter::RegionType
itk::ImageRegion< VImageDimension > RegionType
Definition: otbImageRegionNonUniformMultidimensionalSplitter.h:91
otb::ImageRegionNonUniformMultidimensionalSplitter::Superclass
itk::ImageRegionSplitter< VImageDimension > Superclass
Definition: otbImageRegionNonUniformMultidimensionalSplitter.h:71
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otbImageRegionNonUniformMultidimensionalSplitter.hxx
otb::ImageRegionNonUniformMultidimensionalSplitter
Divide a region into several pieces.
Definition: otbImageRegionNonUniformMultidimensionalSplitter.h:66
otb::ImageRegionNonUniformMultidimensionalSplitter::SizeType
itk::Size< VImageDimension > SizeType
Definition: otbImageRegionNonUniformMultidimensionalSplitter.h:88
otb::ImageRegionNonUniformMultidimensionalSplitter::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbImageRegionNonUniformMultidimensionalSplitter.h:73
otb::ImageRegionNonUniformMultidimensionalSplitter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbImageRegionNonUniformMultidimensionalSplitter.h:72
otb::ImageRegionNonUniformMultidimensionalSplitter::ImageRegionNonUniformMultidimensionalSplitter
ImageRegionNonUniformMultidimensionalSplitter()
Definition: otbImageRegionNonUniformMultidimensionalSplitter.h:107
otb::ImageRegionNonUniformMultidimensionalSplitter::IndexType
itk::Index< VImageDimension > IndexType
Definition: otbImageRegionNonUniformMultidimensionalSplitter.h:85