OTB  6.7.0
Orfeo Toolbox
otbListSampleSource.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 otbListSampleSource_h
22 #define otbListSampleSource_h
23 
24 #include "itkProcessObject.h"
25 #include "itkDataObjectDecorator.h"
26 
27 namespace otb {
28 namespace Statistics {
29 
42 template < class TInputSampleList, class TOutputSampleList = TInputSampleList >
43 class ITK_EXPORT ListSampleSource :
44  public itk::ProcessObject
45 {
46 public:
52 
54  itkTypeMacro(ListSampleSource, itk::ProcessObject);
55 
57  itkNewMacro(Self);
58 
60  typedef TOutputSampleList OutputSampleListType;
61  typedef typename OutputSampleListType::Pointer OutputSampleListPointer;
62  typedef typename OutputSampleListType::ConstPointer OutputSampleListConstPointer;
63  typedef typename OutputSampleListType::MeasurementVectorType OutputMeasurementVectorType;
64  typedef typename OutputMeasurementVectorType::ValueType OutputValueType;
66 
70 
72  OutputSampleListType * GetOutput();
73 
74 protected:
76  DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override;
77  using Superclass::MakeOutput;
78 
80  ~ListSampleSource() override {}
81  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
82 
83 private:
84  ListSampleSource(const Self&) = delete;
85  void operator=(const Self&) = delete;
86 
87 }; // end of class ListSampleSource
88 
89 } // end of namespace Statistics
90 } // end of namespace otb
91 
92 #ifndef OTB_MANUAL_INSTANTIATION
93 #include "otbListSampleSource.hxx"
94 #endif
95 
96 #endif
itk::ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType
OutputSampleListType::MeasurementVectorType OutputMeasurementVectorType
This class is a base class for filters using ListSample as input and returning ListSample.
itk::SmartPointer< const Self > ConstPointer
DataObjectPointerArray::size_type DataObjectPointerArraySizeType
itk::SmartPointer< Self > Pointer
OutputSampleListType::Pointer OutputSampleListPointer
OutputMeasurementVectorType::ValueType OutputValueType
itk::DataObject::Pointer DataObjectPointer
OutputSampleListType::ConstPointer OutputSampleListConstPointer