OTB  6.7.0
Orfeo Toolbox
otbRandomPointSetSource.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 
22 #ifndef otbRandomPointSetSource_h
23 #define otbRandomPointSetSource_h
24 
25 #include "otbPointSetSource.h"
27 
28 namespace otb
29 {
30 
46 template <class TOutputPointSet>
47 class ITK_EXPORT RandomPointSetSource
48  : public PointSetSource<TOutputPointSet>
49 {
50 
51 public:
57 
59  itkNewMacro(Self);
60 
63 
66  typedef TOutputPointSet OutputPointSetType;
67  typedef typename OutputPointSetType::Pointer OutputPointSetPointer;
68  typedef typename OutputPointSetType::PointsContainer PointsContainerType;
69  typedef typename PointsContainerType::Pointer PointsContainerPointer;
74 
75  itkSetMacro(NumberOfPoints, unsigned int);
76  itkGetMacro(NumberOfPoints, unsigned int);
77 
78  itkSetMacro(MinPoint, PointType);
79  itkGetMacro(MinPoint, PointType);
80  itkSetMacro(MaxPoint, PointType);
81  itkGetMacro(MaxPoint, PointType);
82 
83  void SetSeed(SeedType seed)
84  {
85  m_Generator->SetSeed(seed);
86  }
87 
88 protected:
90  ~RandomPointSetSource() override {}
91 
92  void GenerateData(void) override;
93 
94 private:
95  RandomPointSetSource(const Self &) = delete;
96  void operator =(const Self&) = delete;
97 
98  unsigned int m_NumberOfPoints;
99 
101 
104 
105 };
106 
107 }
108 
109 #ifndef OTB_MANUAL_INSTANTIATION
111 #endif
112 
113 #endif
itk::SmartPointer< Self > Pointer
Base class for all process objects that output point set data.
This class generate a random point set.
OutputPointSetType::Pointer OutputPointSetPointer
itk::DataObject::Pointer DataObjectPointer
OutputPointSetType::PointsContainer PointsContainerType
itk::SmartPointer< const Self > ConstPointer
itk::Statistics::MersenneTwisterRandomVariateGenerator GeneratorType
GeneratorType::IntegerType SeedType
GeneratorType::Pointer GeneratorPointerType
OutputPointSetType::PointType PointType
PointSetSource< TOutputPointSet > Superclass
PointsContainerType::Pointer PointsContainerPointer
VectorImageType::PointType PointType
Definition: mvdTypes.h:189