OTB  7.2.0
Orfeo Toolbox
otbLabelMapSource.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2020 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
itk::SmartPointer< Self > Pointer
TOutputLabelMap OutputLabelMapType
Base class for filter that output LabelMap.
itk::SmartPointer< const Self > ConstPointer
itk::ProcessObject Superclass
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
TOutputLabelMap::Pointer OutputLabelMapPointer
itk::ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType