OTB
9.0.0
Orfeo Toolbox
|
#include <otbPatternSampler.h>
Classes | |
struct | Parameter |
Public Types | |
typedef itk::SmartPointer< const Self > | ConstPointer |
typedef struct otb::PatternSampler::Parameter | ParameterType |
typedef itk::SmartPointer< Self > | Pointer |
typedef PatternSampler | Self |
typedef SamplerBase | Superclass |
Public Types inherited from otb::SamplerBase | |
typedef itk::SmartPointer< const Self > | ConstPointer |
typedef itk::SmartPointer< Self > | Pointer |
typedef SamplerBase | Self |
typedef itk::Object | Superclass |
Public Member Functions | |
virtual ::itk::LightObject::Pointer | CreateAnother (void) const |
virtual const char * | GetNameOfClass () const |
Public Member Functions inherited from otb::SamplerBase | |
virtual unsigned long | GetChosenElements () |
virtual unsigned long | GetNeededElements () |
virtual unsigned long | GetProcessedElements () |
virtual double | GetRate () |
virtual unsigned long | GetTotalElements () |
void | SetNumberOfElements (unsigned long needed, unsigned long total) |
void | SetRate (double rate, unsigned long total=0UL) |
Static Public Member Functions | |
static Pointer | New () |
ParameterType | m_Parameters |
unsigned long | m_Index1 |
unsigned long | m_Index2 |
static void | ImportPatterns (const std::string &data, ParameterType ¶m) |
static void | ExportPatterns (const ParameterType ¶m, std::string &data) |
void | SetParameters (const ParameterType ¶m) |
ParameterType | GetParameters () |
void | Reset (void) override |
bool | TakeSample (void) |
PatternSampler () | |
~PatternSampler () override | |
PatternSampler (const Self &) | |
void | operator= (const Self &) |
std::vector< bool > | RandArray (unsigned long N, unsigned long T) |
unsigned long | FindBestSize (unsigned long tot) |
static unsigned int | ParseSymbol (const char &s) |
Additional Inherited Members | |
Protected Member Functions inherited from otb::SamplerBase | |
SamplerBase () | |
~SamplerBase () override | |
Protected Attributes inherited from otb::SamplerBase | |
unsigned long | m_ChosenElements |
unsigned long | m_ProcessedElements |
Periodic sampler for iteration loops.
This class allows doing periodic sampling during an iteration loop.
Definition at line 39 of file otbPatternSampler.h.
typedef itk::SmartPointer<const Self> otb::PatternSampler::ConstPointer |
Definition at line 45 of file otbPatternSampler.h.
typedef struct otb::PatternSampler::Parameter otb::PatternSampler::ParameterType |
Internal parameters, only contains an offset to shift the periodic sampling
typedef itk::SmartPointer<Self> otb::PatternSampler::Pointer |
Definition at line 44 of file otbPatternSampler.h.
Definition at line 42 of file otbPatternSampler.h.
Definition at line 43 of file otbPatternSampler.h.
|
protected |
Constructor
|
inlineoverrideprotected |
Destructor
Definition at line 120 of file otbPatternSampler.h.
|
private |
Internal parameters for the sampler
virtual::itk::LightObject::Pointer otb::PatternSampler::CreateAnother | ( | void | ) | const |
|
static |
Export the sampling patterns in the input parameter to an output string. If the second pattern is not empty, it will be concatenated to the output string, separated by a slash
|
private |
Find a suitable size for internal patterns
|
virtual |
Runtime information support.
Reimplemented from otb::SamplerBase.
|
inline |
Getter for internal parameters
Definition at line 87 of file otbPatternSampler.h.
|
static |
Import sampling patterns from an input string Two patterns may be given, separated by a slash Beware, the second pattern may be empty
|
static |
Method for creation through the object factory.
|
private |
Internal parameters for the sampler
|
staticprivate |
Helper function to decode boolean sequence Characters converted into true : '1' 'X' 'y' 'Y' '|' '+' Characters converted into false : '0' '_' 'n' 'N' '.' '-' Other characters will return a 2
|
private |
Generate a random array of booleans
|
overridevirtual |
Method that resets the internal state of the sampler
Reimplemented from otb::SamplerBase.
|
inline |
Setter for internal parameters
Definition at line 76 of file otbPatternSampler.h.
bool otb::PatternSampler::TakeSample | ( | void | ) |
Method to call during iteration, returns true if the sample is selected, and false otherwise.
|
private |
Index tracking the position in first internal pattern
Definition at line 139 of file otbPatternSampler.h.
|
private |
Index tracking the position in the second internal pattern
Definition at line 142 of file otbPatternSampler.h.
|
private |
Internal parameters for the sampler
Definition at line 136 of file otbPatternSampler.h.