OTB  6.7.0
Orfeo Toolbox
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
otb::PatternSampler Class Reference

#include <otbPatternSampler.h>

+ Inheritance diagram for otb::PatternSampler:
+ Collaboration diagram for otb::PatternSampler:


struct  Parameter

Public Types

typedef itk::SmartPointer
< const Self
typedef struct
typedef itk::SmartPointer< SelfPointer
typedef PatternSampler Self
typedef SamplerBase Superclass
- Public Types inherited from otb::SamplerBase
typedef itk::SmartPointer
< const Self
typedef itk::SmartPointer< SelfPointer
typedef SamplerBase Self
typedef itk::Object Superclass
- Public Types inherited from itk::Object
typedef SmartPointer< const SelfConstPointer
typedef SmartPointer< SelfPointer
typedef Object Self
typedef LightObject Superclass
- Public Types inherited from itk::LightObject
typedef SmartPointer< const SelfConstPointer
typedef SmartPointer< SelfPointer
typedef LightObject Self

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother (void) const
virtual const char * GetNameOfClass () const
ParameterType GetParameters ()
void Reset (void) override
bool TakeSample (void)
void SetParameters (const ParameterType &param)
- 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)
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
unsigned long AddObserver (const EventObject &event, Command *) const
virtual void DebugOff () const
virtual void DebugOn () const
CommandGetCommand (unsigned long tag)
bool GetDebug () const
const MetaDataDictionaryGetMetaDataDictionary () const
MetaDataDictionaryGetMetaDataDictionary ()
virtual ModifiedTimeType GetMTime () const
virtual const std::string & GetObjectName () const
virtual const TimeStampGetTimeStamp () const
bool HasObserver (const EventObject &event) const
void InvokeEvent (const EventObject &)
void InvokeEvent (const EventObject &) const
virtual void Modified () const
virtual void Register () const override
void RemoveAllObservers ()
void RemoveObserver (unsigned long tag)
void SetDebug (bool debugFlag) const
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
virtual void SetObjectName (std::string _arg)
virtual void SetReferenceCount (int) override
virtual void UnRegister () const noexceptoverride
- Public Member Functions inherited from itk::LightObject
virtual void Delete ()
virtual int GetReferenceCount () const
 itkCloneMacro (Self)
void Print (std::ostream &os, Indent indent=0) const

Static Public Member Functions

static void ExportPatterns (const ParameterType &param, std::string &data)
static void ImportPatterns (const std::string &data, ParameterType &param)
static Pointer New ()
- Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
static void GlobalWarningDisplayOff ()
static void GlobalWarningDisplayOn ()
static Pointer New ()
static void SetGlobalWarningDisplay (bool flag)
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
static Pointer New ()

Protected Member Functions

 PatternSampler ()
 ~PatternSampler () override
- Protected Member Functions inherited from otb::SamplerBase
 SamplerBase ()
 ~SamplerBase () override
- Protected Member Functions inherited from itk::Object
 Object ()
bool PrintObservers (std::ostream &os, Indent indent) const
virtual void PrintSelf (std::ostream &os, Indent indent) const override
virtual void SetTimeStamp (const TimeStamp &time)
virtual ~Object ()
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 LightObject ()
virtual void PrintHeader (std::ostream &os, Indent indent) const
virtual void PrintTrailer (std::ostream &os, Indent indent) const
virtual ~LightObject ()

Private Member Functions

unsigned long FindBestSize (unsigned long tot)
void operator= (const Self &)
 PatternSampler (const Self &)
std::vector< bool > RandArray (unsigned long N, unsigned long T)

Static Private Member Functions

static unsigned int ParseSymbol (const char &s)

Private Attributes

unsigned long m_Index1
unsigned long m_Index2
ParameterType m_Parameters

Additional Inherited Members

- Protected Attributes inherited from otb::SamplerBase
unsigned long m_ChosenElements
unsigned long m_ProcessedElements
- Protected Attributes inherited from itk::LightObject
AtomicInt< int > m_ReferenceCount

Detailed Description

Periodic sampler for iteration loops.

This class allows doing periodic sampling during an iteration loop.

Definition at line 39 of file otbPatternSampler.h.

Member Typedef Documentation

Definition at line 45 of file otbPatternSampler.h.

Internal parameters, only contains an offset to shift the periodic sampling

Definition at line 44 of file otbPatternSampler.h.

Definition at line 42 of file otbPatternSampler.h.

Definition at line 43 of file otbPatternSampler.h.

Constructor & Destructor Documentation

otb::PatternSampler::PatternSampler ( )


otb::PatternSampler::~PatternSampler ( )


Definition at line 124 of file otbPatternSampler.h.

otb::PatternSampler::PatternSampler ( const Self )

Member Function Documentation

virtual::itk::LightObject::Pointer otb::PatternSampler::CreateAnother ( void  ) const

Reimplemented from itk::Object.

static void otb::PatternSampler::ExportPatterns ( const ParameterType param,
std::string &  data 

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

unsigned long otb::PatternSampler::FindBestSize ( unsigned long  tot)

Find a suitable size for internal patterns

virtual const char* otb::PatternSampler::GetNameOfClass ( ) const

Runtime information support.

Reimplemented from otb::SamplerBase.

ParameterType otb::PatternSampler::GetParameters ( void  )

Getter for internal parameters

Definition at line 87 of file otbPatternSampler.h.

static void otb::PatternSampler::ImportPatterns ( const std::string &  data,
ParameterType param 

Import sampling patterns from an input string Two patterns may be given, separated by a slash Beware, the second pattern may be empty

static Pointer otb::PatternSampler::New ( )

Method for creation through the object factory.

void otb::PatternSampler::operator= ( const Self )
static unsigned int otb::PatternSampler::ParseSymbol ( const char &  s)

Helper function to decode boolean sequence Caracters converted into true : '1' 'X' 'y' 'Y' '|' '+' Caracters converted into false : '0' '_' 'n' 'N' '.' '-' Other caracters will return a 2

std::vector<bool> otb::PatternSampler::RandArray ( unsigned long  N,
unsigned long  T 

Generate a random array of booleans

void otb::PatternSampler::Reset ( void  )

Method that resets the internal state of the sampler

Reimplemented from otb::SamplerBase.

void otb::PatternSampler::SetParameters ( const ParameterType param)

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.

Member Data Documentation

unsigned long otb::PatternSampler::m_Index1

Index tracking the position in first internal pattern

Definition at line 141 of file otbPatternSampler.h.

unsigned long otb::PatternSampler::m_Index2

Index tracking the position in the second internal pattern

Definition at line 144 of file otbPatternSampler.h.

ParameterType otb::PatternSampler::m_Parameters

Internal parameters for the sampler

Definition at line 138 of file otbPatternSampler.h.

The documentation for this class was generated from the following file: