OTB  9.0.0
Orfeo Toolbox
otbLabelMapSource.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 
22 #ifndef otbLabelMapSource_h
23 #define otbLabelMapSource_h
24 
25 
26 #include "itkProcessObject.h"
27 #include "itkMacro.h"
28 
29 namespace otb
30 {
40 template <class TOutputLabelMap>
41 class ITK_EXPORT LabelMapSource : public itk::ProcessObject
42 {
43 public:
46  typedef itk::ProcessObject Superclass;
47  typedef itk::SmartPointer<Self> Pointer;
48  typedef itk::SmartPointer<const Self> ConstPointer;
49 
51  itkNewMacro(Self);
52 
54  itkTypeMacro(LabelMapSource, itk::ProcessObject);
55 
56  typedef itk::ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType;
57  typedef TOutputLabelMap OutputLabelMapType;
58  typedef typename TOutputLabelMap::Pointer OutputLabelMapPointer;
59 
61  virtual OutputLabelMapType* GetOutput(void);
62  virtual OutputLabelMapType* GetOutput(DataObjectPointerArraySizeType idx);
64 
65 protected:
67  ~LabelMapSource() override;
68 
69  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
70 
72  virtual void AllocateOutputs();
73 
74 private:
75  LabelMapSource(const Self&) = delete;
76  void operator=(const Self&) = delete;
77 };
78 
79 } // end namespace otb
80 
81 #ifndef OTB_MANUAL_INSTANTIATION
82 #include "otbLabelMapSource.hxx"
83 #endif
84 
85 #endif // otbLabelMapSource_h
otb::LabelMapSource::Self
LabelMapSource Self
Definition: otbLabelMapSource.h:45
otbLabelMapSource.hxx
otb::LabelMapSource::OutputLabelMapType
TOutputLabelMap OutputLabelMapType
Definition: otbLabelMapSource.h:57
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::LabelMapSource::Superclass
itk::ProcessObject Superclass
Definition: otbLabelMapSource.h:46
otb::LabelMapSource::DataObjectPointerArraySizeType
itk::ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType
Definition: otbLabelMapSource.h:54
otb::LabelMapSource::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbLabelMapSource.h:47
otb::LabelMapSource::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbLabelMapSource.h:48
otb::LabelMapSource::OutputLabelMapPointer
TOutputLabelMap::Pointer OutputLabelMapPointer
Definition: otbLabelMapSource.h:58
otb::LabelMapSource
Base class for filter that output LabelMap.
Definition: otbLabelMapSource.h:41