![]() |
OTB
9.1.1
Orfeo Toolbox
|
#include <otbSamplingRateCalculator.h>
Inheritance diagram for otb::SamplingRateCalculator:
Collaboration diagram for otb::SamplingRateCalculator:Classes | |
| struct | Triplet |
Public Types | |
| typedef std::map< std::string, unsigned long > | ClassCountMapType |
| typedef ClassCountMapType::const_iterator | constItMapType |
| typedef itk::SmartPointer< const Self > | ConstPointer |
| typedef std::map< std::string, TripletType > | MapRateType |
| typedef itk::SmartPointer< Self > | Pointer |
| typedef SamplingRateCalculator | Self |
| typedef itk::Object | Superclass |
| typedef struct OTBSampling_EXPORT otb::SamplingRateCalculator::Triplet | TripletType |
Public Member Functions | |
| void | ClearRates (void) |
| virtual ::itk::LightObject::Pointer | CreateAnother (void) const |
| virtual const char * | GetNameOfClass () const |
| virtual const MapRateType & | GetRatesByClass () const |
| void | Read (std::string filename) |
| void | SetAllSamples (void) |
| void | SetClassCount (const ClassCountMapType &map) |
| void | SetMinimumNbOfSamplesByClass (void) |
| void | SetNbOfSamplesAllClasses (unsigned long) |
| void | SetNbOfSamplesByClass (const ClassCountMapType &required) |
| void | SetPercentageOfSamples (double percent) |
| void | SetTotalNumberOfSamples (unsigned long value) |
| void | Write (std::string filename) |
Static Public Member Functions | |
| static Pointer | New () |
| static ClassCountMapType | ReadRequiredSamples (const std::string &filename) |
Protected Member Functions | |
| void | PrintSelf (std::ostream &os, itk::Indent indent) const override |
| SamplingRateCalculator () | |
| ~SamplingRateCalculator () override | |
Private Member Functions | |
| void | operator= (const Self &)=delete |
| SamplingRateCalculator (const Self &)=delete | |
| void | UpdateRate (const std::string &name) |
Private Attributes | |
| MapRateType | m_RatesByClass |
This class is a sampling rate calculator.
It computes sampling rates for each class, given input statistics on available samples, and a sampling strategy.
Definition at line 40 of file otbSamplingRateCalculator.h.
| typedef std::map<std::string, unsigned long> otb::SamplingRateCalculator::ClassCountMapType |
typdefs
Definition at line 50 of file otbSamplingRateCalculator.h.
| typedef ClassCountMapType::const_iterator otb::SamplingRateCalculator::constItMapType |
Definition at line 51 of file otbSamplingRateCalculator.h.
| typedef itk::SmartPointer<const Self> otb::SamplingRateCalculator::ConstPointer |
Definition at line 47 of file otbSamplingRateCalculator.h.
| typedef std::map<std::string, TripletType> otb::SamplingRateCalculator::MapRateType |
Definition at line 60 of file otbSamplingRateCalculator.h.
| typedef itk::SmartPointer<Self> otb::SamplingRateCalculator::Pointer |
Definition at line 46 of file otbSamplingRateCalculator.h.
Standard typedefs
Definition at line 44 of file otbSamplingRateCalculator.h.
| typedef itk::Object otb::SamplingRateCalculator::Superclass |
Definition at line 45 of file otbSamplingRateCalculator.h.
| typedef struct OTBSampling_EXPORT otb::SamplingRateCalculator::Triplet otb::SamplingRateCalculator::TripletType |
|
protected |
Constructor
|
inlineoverrideprotected |
Destructor
Definition at line 113 of file otbSamplingRateCalculator.h.
|
privatedelete |
| void otb::SamplingRateCalculator::ClearRates | ( | void | ) |
Clear internal data
| virtual::itk::LightObject::Pointer otb::SamplingRateCalculator::CreateAnother | ( | void | ) | const |
|
virtual |
Creation through object factory macro
|
virtual |
Get macro to the computed sampling rates.
|
static |
Type macro
Referenced by otb::Wrapper::TrainImagesBase::SplitTrainingAndValidationSamples().
|
privatedelete |
|
overrideprotected |
PrintSelf method
| void otb::SamplingRateCalculator::Read | ( | std::string | filename | ) |
Method to import sampling rates from a CSV file. Columns are : class name, required samples, total samples, rate.
|
static |
| void otb::SamplingRateCalculator::SetAllSamples | ( | void | ) |
Method to select all available samples
| void otb::SamplingRateCalculator::SetClassCount | ( | const ClassCountMapType & | map | ) |
Set method to input the total number of samples in each class. This method should be called before the other Set... methods that apply a sampling strategy
| void otb::SamplingRateCalculator::SetMinimumNbOfSamplesByClass | ( | void | ) |
Method to choose a sampling strategy based on the smallest class. The number of samples in each class is set to this minimum size
| void otb::SamplingRateCalculator::SetNbOfSamplesAllClasses | ( | unsigned long | ) |
Method to set the same number of required samples in each class
| void otb::SamplingRateCalculator::SetNbOfSamplesByClass | ( | const ClassCountMapType & | required | ) |
Method to manually set the number of samples required in each class
| void otb::SamplingRateCalculator::SetPercentageOfSamples | ( | double | percent | ) |
Method to set a percentage of samples for each class
| void otb::SamplingRateCalculator::SetTotalNumberOfSamples | ( | unsigned long | value | ) |
Method to set the total number of samples to generate
|
private |
Update the computed rate for a given class.
| void otb::SamplingRateCalculator::Write | ( | std::string | filename | ) |
Method to export sampling rates in a CSV file. Columns are : class name, required samples, total samples, rate.
|
private |
Internal sampling rates.
Definition at line 128 of file otbSamplingRateCalculator.h.
1.8.17