OTB  9.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-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 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:
148  RelabelComponentImageFilter(const Self&) = delete;
149  void operator=(const Self&) = delete;
150 };
151 
152 } // end namespace otb
153 
154 #ifndef ITK_MANUAL_INSTANTIATION
156 #endif
157 
158 #endif
otb::RelabelComponentImageFilter::InputImagePointer
Superclass::InputImagePointer InputImagePointer
Definition: otbRelabelComponentImageFilter.h:92
otb::RelabelComponentImageFilter::EnlargeOutputRequestedRegion
void EnlargeOutputRequestedRegion(itk::DataObject *)
Definition: otbRelabelComponentImageFilter.h:145
otbRelabelComponentImageFilter.hxx
otb::RelabelComponentImageFilter::SizeType
TInputImage::SizeType SizeType
Definition: otbRelabelComponentImageFilter.h:112
otb::RelabelComponentImageFilter::Self
RelabelComponentImageFilter Self
Definition: otbRelabelComponentImageFilter.h:86
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::RelabelComponentImageFilter::RegionType
TOutputImage::RegionType RegionType
Definition: otbRelabelComponentImageFilter.h:113
otb::RelabelComponentImageFilter::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbRelabelComponentImageFilter.h:119
otb::RelabelComponentImageFilter::IndexType
TInputImage::IndexType IndexType
Definition: otbRelabelComponentImageFilter.h:111
otb::RelabelComponentImageFilter::OutputPixelType
TOutputImage::PixelType OutputPixelType
Definition: otbRelabelComponentImageFilter.h:98
otb::RelabelComponentImageFilter::OutputImageType
TOutputImage OutputImageType
Definition: otbRelabelComponentImageFilter.h:110
otb::RelabelComponentImageFilter::OutputInternalPixelType
TOutputImage::InternalPixelType OutputInternalPixelType
Definition: otbRelabelComponentImageFilter.h:99
otb::RelabelComponentImageFilter::ObjectSizeType
unsigned long int ObjectSizeType
Definition: otbRelabelComponentImageFilter.h:135
otb::RelabelComponentImageFilter::InputImageType
TInputImage InputImageType
Definition: otbRelabelComponentImageFilter.h:109
otb::RelabelComponentImageFilter::InputInternalPixelType
TInputImage::InternalPixelType InputInternalPixelType
Definition: otbRelabelComponentImageFilter.h:101
otb::RelabelComponentImageFilter::Superclass
itk::RelabelComponentImageFilter< TInputImage, TOutputImage > Superclass
Definition: otbRelabelComponentImageFilter.h:87
otb::RelabelComponentImageFilter::~RelabelComponentImageFilter
virtual ~RelabelComponentImageFilter()
Definition: otbRelabelComponentImageFilter.h:139
otb::RelabelComponentImageFilter::LabelType
unsigned long int LabelType
Definition: otbRelabelComponentImageFilter.h:129
otb::RelabelComponentImageFilter::InputPixelType
TInputImage::PixelType InputPixelType
Definition: otbRelabelComponentImageFilter.h:100
otb::RelabelComponentImageFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbRelabelComponentImageFilter.h:118
otb::RelabelComponentImageFilter
Relabel the components in an image such that consecutive labels are used.
Definition: otbRelabelComponentImageFilter.h:80