OTB  6.7.0
Orfeo Toolbox
otbImageToLabelMapWithAttributesFilter.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2019 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 >
49  : public itk::ImageToImageFilter< TInputImage, LabelMapWithAdjacency<TLabelObject> >
50 {
51 
52 public:
58 
61 
63  itkNewMacro(Self);
64 
65  typedef TInputImage InputImageType;
66  typedef TLabeledImage LabeledImageType;
67  typedef TLabelObject LabelObjectType;
68 
69  typedef typename LabelObjectType::LabelType LabelType;
72 
76 
77  using Superclass::SetInput;
78  void SetInput( const InputImageType *image) override;
79  virtual void SetLabeledImage( const LabeledImageType * image);
80  const InputImageType * GetInput(void);
81  const LabeledImageType * GetLabeledImage();
82  virtual LabelMapType* GetOutput();
83 
84  void GenerateData() override;
85 
86 protected:
89 
92 
93  void GenerateInputRequestedRegion() override;
94 
95 
96 private:
97  ImageToLabelMapWithAttributesFilter(const Self&) = delete;
98  void operator=(const Self&) = delete;
99 
101 
102 };
103 }
104 
105 #ifndef OTB_MANUAL_INSTANTIATION
107 #endif
108 #endif
109 
Convert a labeled image to a label map with adjacency information and computes feature attributes for...
convert a labeled image to a label map with adjacency information.
BandsStatisticsAttributesLabelMapFilter< LabelMapType, InputImageType > BandStatisticsLabelMapFilterType
LabelImageToLabelMapWithAdjacencyFilter< LabeledImageType, LabelMapType > LabelMapFilterType
ShapeAttributesLabelMapFilter< LabelMapType > ShapeLabelMapFilterType
This class is a LabelMap with additional adjacency information.
This filter computes band statistics attributes for each object.
LabelMapWithAdjacency< LabelObjectType > LabelMapType
LabelMapType::AdjacentLabelsContainerType AdjacentLabelsContainerType
itk::ImageToImageFilter< TInputImage, LabelMapWithAdjacency< TLabelObject > > Superclass
This class is a fork of the itk::ShapeLabelMapFilter working with AttributesMapLabelObject.
std::set< LabelType > AdjacentLabelsContainerType