OTB  9.0.0
Orfeo Toolbox
otbImageToLabelMapWithAttributesFilter.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 otbImageToLabelMapWithAttributesFilter_h
22 #define otbImageToLabelMapWithAttributesFilter_h
23 
24 #include "itkShapeLabelMapFilter.h"
30 
31 
32 namespace otb
33 {
34 
47 template <class TInputImage, class TLabeledImage, class TLabel, class TLabelObject>
48 class ITK_EXPORT ImageToLabelMapWithAttributesFilter : public itk::ImageToImageFilter<TInputImage, LabelMapWithAdjacency<TLabelObject>>
49 {
50 
51 public:
54  typedef itk::SmartPointer<Self> Pointer;
55  typedef itk::SmartPointer<const Self> ConstPointer;
56  typedef itk::ImageToImageFilter<TInputImage, LabelMapWithAdjacency<TLabelObject>> Superclass;
57 
59  itkTypeMacro(ImageToLabelMapWithAttributesFilter, itk::ImageToImageFilter);
60 
62  itkNewMacro(Self);
63 
64  typedef TInputImage InputImageType;
65  typedef TLabeledImage LabeledImageType;
66  typedef TLabelObject LabelObjectType;
67 
68  typedef typename LabelObjectType::LabelType LabelType;
71 
75 
76  using Superclass::SetInput;
77  void SetInput(const InputImageType* image) override;
78  virtual void SetLabeledImage(const LabeledImageType* image);
79  const InputImageType* GetInput(void);
80  const LabeledImageType* GetLabeledImage();
81  virtual LabelMapType* GetOutput();
82 
83  void GenerateData() override;
84 
85 protected:
88 
91 
92  void GenerateInputRequestedRegion() override;
93 
94 
95 private:
96  ImageToLabelMapWithAttributesFilter(const Self&) = delete;
97  void operator=(const Self&) = delete;
98 
100 };
101 }
102 
103 #ifndef OTB_MANUAL_INSTANTIATION
105 #endif
106 #endif
otb::ImageToLabelMapWithAttributesFilter::LabeledImageType
TLabeledImage LabeledImageType
Definition: otbImageToLabelMapWithAttributesFilter.h:65
otb::ShapeAttributesLabelMapFilter
This class is a fork of the itk::ShapeLabelMapFilter working with AttributesMapLabelObject.
Definition: otbShapeAttributesLabelMapFilter.h:212
otb::ImageToLabelMapWithAttributesFilter::Self
ImageToLabelMapWithAttributesFilter Self
Definition: otbImageToLabelMapWithAttributesFilter.h:53
otb::ImageToLabelMapWithAttributesFilter::~ImageToLabelMapWithAttributesFilter
~ImageToLabelMapWithAttributesFilter() override
Definition: otbImageToLabelMapWithAttributesFilter.h:90
otb::ImageToLabelMapWithAttributesFilter::AdjacentLabelsContainerType
LabelMapType::AdjacentLabelsContainerType AdjacentLabelsContainerType
Definition: otbImageToLabelMapWithAttributesFilter.h:70
otb::ImageToLabelMapWithAttributesFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbImageToLabelMapWithAttributesFilter.h:54
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::LabelImageToLabelMapWithAdjacencyFilter
convert a labeled image to a label map with adjacency information.
Definition: otbLabelImageToLabelMapWithAdjacencyFilter.h:39
otbLabelMapWithClassLabelToClassLabelImageFilter.h
otb::ImageToLabelMapWithAttributesFilter::ShapeLabelMapFilterType
ShapeAttributesLabelMapFilter< LabelMapType > ShapeLabelMapFilterType
Definition: otbImageToLabelMapWithAttributesFilter.h:73
otb::ImageToLabelMapWithAttributesFilter::LabelMapType
LabelMapWithAdjacency< LabelObjectType > LabelMapType
Definition: otbImageToLabelMapWithAttributesFilter.h:69
otb::ImageToLabelMapWithAttributesFilter::LabelMapFilterType
LabelImageToLabelMapWithAdjacencyFilter< LabeledImageType, LabelMapType > LabelMapFilterType
Definition: otbImageToLabelMapWithAttributesFilter.h:72
otbShapeAttributesLabelMapFilter.h
otbLabelImageToLabelMapWithAdjacencyFilter.h
otb::ImageToLabelMapWithAttributesFilter::BandStatisticsLabelMapFilterType
BandsStatisticsAttributesLabelMapFilter< LabelMapType, InputImageType > BandStatisticsLabelMapFilterType
Definition: otbImageToLabelMapWithAttributesFilter.h:74
otb::ImageToLabelMapWithAttributesFilter::LabelObjectType
TLabelObject LabelObjectType
Definition: otbImageToLabelMapWithAttributesFilter.h:66
otb::ImageToLabelMapWithAttributesFilter::InputImageType
TInputImage InputImageType
Definition: otbImageToLabelMapWithAttributesFilter.h:62
otbImageToLabelMapWithAttributesFilter.hxx
otb::LabelMapWithAdjacency::AdjacentLabelsContainerType
std::set< LabelType > AdjacentLabelsContainerType
Definition: otbLabelMapWithAdjacency.h:70
otb::ImageToLabelMapWithAttributesFilter
Convert a labeled image to a label map with adjacency information and computes feature attributes for...
Definition: otbImageToLabelMapWithAttributesFilter.h:48
otbBandsStatisticsAttributesLabelMapFilter.h
otb::ImageToLabelMapWithAttributesFilter::m_Output
LabelMapType::Pointer m_Output
Definition: otbImageToLabelMapWithAttributesFilter.h:99
otb::LabelMapWithAdjacency::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbLabelMapWithAdjacency.h:47
otb::ImageToLabelMapWithAttributesFilter::Superclass
itk::ImageToImageFilter< TInputImage, LabelMapWithAdjacency< TLabelObject > > Superclass
Definition: otbImageToLabelMapWithAttributesFilter.h:56
otb::ImageToLabelMapWithAttributesFilter::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbImageToLabelMapWithAttributesFilter.h:55
otb::LabelMapWithAdjacency
This class is a LabelMap with additional adjacency information.
Definition: otbLabelMapWithAdjacency.h:41
otb::ImageToLabelMapWithAttributesFilter::LabelType
LabelObjectType::LabelType LabelType
Definition: otbImageToLabelMapWithAttributesFilter.h:68
otbAttributesMapLabelObjectWithClassLabel.h
otb::BandsStatisticsAttributesLabelMapFilter
This filter computes band statistics attributes for each object.
Definition: otbBandsStatisticsAttributesLabelMapFilter.h:139