OTB  10.0.0
Orfeo Toolbox
otbLabelMapToLabelImageFilter.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 otbLabelMapToLabelImageFilter_h
23 #define otbLabelMapToLabelImageFilter_h
24 
25 #include "itkLabelMapToLabelImageFilter.h"
26 
27 namespace otb
28 {
29 
47 template <class TInputImage, class TOutputImage>
48 class ITK_EXPORT LabelMapToLabelImageFilter : public itk::LabelMapToLabelImageFilter<TInputImage, TOutputImage>
49 {
50 public:
53  typedef itk::LabelMapToLabelImageFilter<TInputImage, TOutputImage> Superclass;
54  typedef itk::SmartPointer<Self> Pointer;
55  typedef itk::SmartPointer<const Self> ConstPointer;
56 
58  typedef TInputImage InputImageType;
59  typedef TOutputImage OutputImageType;
60  typedef typename InputImageType::Pointer InputImagePointer;
61  typedef typename InputImageType::ConstPointer InputImageConstPointer;
62  typedef typename InputImageType::RegionType InputImageRegionType;
63  typedef typename InputImageType::PixelType InputImagePixelType;
64  typedef typename InputImageType::LabelObjectType LabelObjectType;
65 
66  typedef typename OutputImageType::Pointer OutputImagePointer;
67  typedef typename OutputImageType::ConstPointer OutputImageConstPointer;
68  typedef typename OutputImageType::RegionType OutputImageRegionType;
69  typedef typename OutputImageType::PixelType OutputImagePixelType;
70  typedef typename OutputImageType::IndexType IndexType;
71 
73  itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension);
74  itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension);
76 
78  itkNewMacro(Self);
79 
81  itkTypeMacro(LabelMapToLabelImageFilter, ImageToImageFilter);
82 
83 protected:
86 
87  void GenerateInputRequestedRegion();
88 
89  void EnlargeOutputRequestedRegion(itk::DataObject*){};
90 
91 private:
92  LabelMapToLabelImageFilter(const Self&) = delete;
93  void operator=(const Self&) = delete;
94 
95 }; // end of class
96 
97 } // end namespace otb
98 
99 #ifndef ITK_MANUAL_INSTANTIATION
101 #endif
102 
103 #endif
Converts a LabelMap to a labeled image.
void operator=(const Self &)=delete
InputImageType::ConstPointer InputImageConstPointer
InputImageType::LabelObjectType LabelObjectType
OutputImageType::RegionType OutputImageRegionType
OutputImageType::ConstPointer OutputImageConstPointer
itk::LabelMapToLabelImageFilter< TInputImage, TOutputImage > Superclass
LabelMapToLabelImageFilter(const Self &)=delete
void EnlargeOutputRequestedRegion(itk::DataObject *)
itk::SmartPointer< const Self > ConstPointer
OutputImageType::PixelType OutputImagePixelType
InputImageType::RegionType InputImageRegionType
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.