OTB  10.0.0
Orfeo Toolbox
otbRelabelComponentImageFilter.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1999-2011 Insight Software Consortium
3  * Copyright (C) 2005-2024 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 otbRelabelComponentImageFilter_h
23 #define otbRelabelComponentImageFilter_h
24 
25 #include "itkRelabelComponentImageFilter.h"
26 #include <vector>
27 
28 namespace otb
29 {
30 
79 template <class TInputImage, class TOutputImage>
80 class ITK_EXPORT RelabelComponentImageFilter : public itk::RelabelComponentImageFilter<TInputImage, TOutputImage>
81 {
82 public:
87  typedef itk::RelabelComponentImageFilter<TInputImage, TOutputImage> Superclass;
88 
92  typedef typename Superclass::InputImagePointer InputImagePointer;
93 
98  typedef typename TOutputImage::PixelType OutputPixelType;
99  typedef typename TOutputImage::InternalPixelType OutputInternalPixelType;
100  typedef typename TInputImage::PixelType InputPixelType;
101  typedef typename TInputImage::InternalPixelType InputInternalPixelType;
102  itkStaticConstMacro(ImageDimension, unsigned int, TOutputImage::ImageDimension);
103  itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension);
105 
109  typedef TInputImage InputImageType;
110  typedef TOutputImage OutputImageType;
111  typedef typename TInputImage::IndexType IndexType;
112  typedef typename TInputImage::SizeType SizeType;
113  typedef typename TOutputImage::RegionType RegionType;
114 
118  typedef itk::SmartPointer<Self> Pointer;
119  typedef itk::SmartPointer<const Self> ConstPointer;
120 
124  itkTypeMacro(RelabelComponentImageFilter, ImageToImageFilter);
125 
129  itkNewMacro(Self);
130 
132  typedef unsigned long int LabelType;
133 
135  typedef unsigned long int ObjectSizeType;
136 
137 protected:
140  {
141  }
142 
143  void GenerateInputRequestedRegion();
144 
145  void EnlargeOutputRequestedRegion(itk::DataObject*){};
146 
147 private:
149  void operator=(const Self&) = delete;
150 };
151 
152 } // end namespace otb
153 
154 #ifndef ITK_MANUAL_INSTANTIATION
156 #endif
157 
158 #endif
Relabel the components in an image such that consecutive labels are used.
TInputImage::InternalPixelType InputInternalPixelType
itk::SmartPointer< const Self > ConstPointer
itk::RelabelComponentImageFilter< TInputImage, TOutputImage > Superclass
RelabelComponentImageFilter(const Self &)=delete
void operator=(const Self &)=delete
Superclass::InputImagePointer InputImagePointer
TOutputImage::InternalPixelType OutputInternalPixelType
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.