OTB  9.0.0
Orfeo Toolbox
otbLabelMapWithClassLabelToClassLabelImageFilter.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2022 Centre National d'Etudes Spatiales (CNES)
3  *
4  * This file is part of Orfeo Toolbox
5  *
6  * https://www.orfeo-toolbox.org/
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */
20 
21 #ifndef otbLabelMapWithClassLabelToClassLabelImageFilter_h
22 #define otbLabelMapWithClassLabelToClassLabelImageFilter_h
23 
24 #include "itkLabelMapFilter.h"
25 
26 namespace otb
27 {
28 
35 template <class TInputImage, class TOutputImage>
36 class ITK_EXPORT LabelMapWithClassLabelToClassLabelImageFilter : public itk::LabelMapFilter<TInputImage, TOutputImage>
37 {
38 public:
41  typedef itk::LabelMapFilter<TInputImage, TOutputImage> Superclass;
42  typedef itk::SmartPointer<Self> Pointer;
43  typedef itk::SmartPointer<const Self> ConstPointer;
44 
46  typedef TInputImage InputImageType;
47  typedef TOutputImage OutputImageType;
48  typedef typename InputImageType::Pointer InputImagePointer;
49  typedef typename InputImageType::ConstPointer InputImageConstPointer;
50  typedef typename InputImageType::RegionType InputImageRegionType;
51  typedef typename InputImageType::PixelType InputImagePixelType;
52  typedef typename InputImageType::LabelObjectType LabelObjectType;
53 
54  typedef typename LabelObjectType::ConstLineIterator ConstLineIteratorType;
55 
56  typedef typename OutputImageType::Pointer OutputImagePointer;
57  typedef typename OutputImageType::ConstPointer OutputImageConstPointer;
58  typedef typename OutputImageType::RegionType OutputImageRegionType;
59  typedef typename OutputImageType::PixelType OutputImagePixelType;
60  typedef typename OutputImageType::IndexType IndexType;
61 
63  itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension);
64  itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension);
66 
68  itkNewMacro(Self);
69 
71  itkTypeMacro(LabelMapWithClassLabelToClassLabelImageFilter, ImageToImageFilter);
72 
73 protected:
76 
77  void BeforeThreadedGenerateData() override;
78 
79  void ThreadedProcessLabelObject(LabelObjectType* labelObject) override;
80 
81 private:
83  void operator=(const Self&) = delete;
84 
85 }; // end of class
86 
87 } // end namespace otb
88 
89 #ifndef OTB_MANUAL_INSTANTIATION
91 #endif
92 
93 #endif
otb::LabelMapWithClassLabelToClassLabelImageFilter::IndexType
OutputImageType::IndexType IndexType
Definition: otbLabelMapWithClassLabelToClassLabelImageFilter.h:60
otb::LabelMapWithClassLabelToClassLabelImageFilter::InputImagePixelType
InputImageType::PixelType InputImagePixelType
Definition: otbLabelMapWithClassLabelToClassLabelImageFilter.h:51
otb::LabelMapWithClassLabelToClassLabelImageFilter::OutputImagePixelType
OutputImageType::PixelType OutputImagePixelType
Definition: otbLabelMapWithClassLabelToClassLabelImageFilter.h:59
otbLabelMapWithClassLabelToClassLabelImageFilter.hxx
otb::LabelMapWithClassLabelToClassLabelImageFilter::InputImageConstPointer
InputImageType::ConstPointer InputImageConstPointer
Definition: otbLabelMapWithClassLabelToClassLabelImageFilter.h:49
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::LabelMapWithClassLabelToClassLabelImageFilter::LabelObjectType
InputImageType::LabelObjectType LabelObjectType
Definition: otbLabelMapWithClassLabelToClassLabelImageFilter.h:52
otb::LabelMapWithClassLabelToClassLabelImageFilter::Superclass
itk::LabelMapFilter< TInputImage, TOutputImage > Superclass
Definition: otbLabelMapWithClassLabelToClassLabelImageFilter.h:41
otb::LabelMapWithClassLabelToClassLabelImageFilter::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbLabelMapWithClassLabelToClassLabelImageFilter.h:43
otb::LabelMapWithClassLabelToClassLabelImageFilter::Self
LabelMapWithClassLabelToClassLabelImageFilter Self
Definition: otbLabelMapWithClassLabelToClassLabelImageFilter.h:40
otb::LabelMapWithClassLabelToClassLabelImageFilter::OutputImagePointer
OutputImageType::Pointer OutputImagePointer
Definition: otbLabelMapWithClassLabelToClassLabelImageFilter.h:56
otb::LabelMapWithClassLabelToClassLabelImageFilter::OutputImageRegionType
OutputImageType::RegionType OutputImageRegionType
Definition: otbLabelMapWithClassLabelToClassLabelImageFilter.h:58
otb::LabelMapWithClassLabelToClassLabelImageFilter::OutputImageType
TOutputImage OutputImageType
Definition: otbLabelMapWithClassLabelToClassLabelImageFilter.h:47
otb::LabelMapWithClassLabelToClassLabelImageFilter::InputImageType
TInputImage InputImageType
Definition: otbLabelMapWithClassLabelToClassLabelImageFilter.h:46
otb::LabelMapWithClassLabelToClassLabelImageFilter::~LabelMapWithClassLabelToClassLabelImageFilter
~LabelMapWithClassLabelToClassLabelImageFilter() override
Definition: otbLabelMapWithClassLabelToClassLabelImageFilter.h:75
otb::LabelMapWithClassLabelToClassLabelImageFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbLabelMapWithClassLabelToClassLabelImageFilter.h:42
otb::LabelMapWithClassLabelToClassLabelImageFilter
Converts a LabelMap<LabelObjectWithClassLabel> to an image of class labels.
Definition: otbLabelMapWithClassLabelToClassLabelImageFilter.h:36
otb::LabelMapWithClassLabelToClassLabelImageFilter::ConstLineIteratorType
LabelObjectType::ConstLineIterator ConstLineIteratorType
Definition: otbLabelMapWithClassLabelToClassLabelImageFilter.h:54
otb::LabelMapWithClassLabelToClassLabelImageFilter::InputImagePointer
InputImageType::Pointer InputImagePointer
Definition: otbLabelMapWithClassLabelToClassLabelImageFilter.h:48
otb::LabelMapWithClassLabelToClassLabelImageFilter::OutputImageConstPointer
OutputImageType::ConstPointer OutputImageConstPointer
Definition: otbLabelMapWithClassLabelToClassLabelImageFilter.h:57
otb::LabelMapWithClassLabelToClassLabelImageFilter::InputImageRegionType
InputImageType::RegionType InputImageRegionType
Definition: otbLabelMapWithClassLabelToClassLabelImageFilter.h:50