Jafar
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
jafar::datareader::DataReader Class Reference

This class is used to start accessing the data from a directory following the pelican specification. More...


Detailed Description

This class is used to start accessing the data from a directory following the pelican specification.

Definition at line 22 of file DataReader.hpp.

#include <DataReader.hpp>

List of all members.

Public Member Functions

 DataReader (std::string seriesname=s_seriesname, int serienumber=s_serienumber, std::string basepath=s_basepath)
 Create a data reader.
StereoReadergetStereoReader (int index, bool fatal=true)
 This function is a convenient function for the previous one.
StereoReadergetStereoReader (std::string benchName)
 This function is a convenient function for the previous one.
MonoReadergetMonoReader (int index, bool fatal=true)
 This function is return a reader for.
MonoReadergetMonoReader (std::string benchName)
 This function is a convenient function for the previous one.
MonoReadergetPanoReader (int index, bool fatal=true)
 This function return a reader on a panoramic camera.
MonoReadergetPanoReader (std::string benchName)
 This function is a convenient function for the previous one.
std::string dataPath ()

Static Public Member Functions

static void setDefaultBasePath (std::string s)
 Use this function to set the default base path of data (use this in your shell configuration file, ie ".irbrc")
static std::string defaultBasePath ()
static void setDefaultSeriesName (std::string s)
 Use this function to set the default series name (use this in your shell configuration file, ie ".irbrc")
static std::string defaultSeriesName ()
static void setDefaultSerieNumber (int n)
 Use this function to set the default serie number (use this in your shell configuration file, ie ".irbrc")
static int defaultSerieNumber ()

Private Member Functions

void getBasicSensorInfo (int index, std::string &sensorbase, std::string &sensorname, std::string &benchtype)
 Get some basic information about the sensor.
MonoReadergetMonoReader (int index, int type, bool fatal=true)

Private Attributes

std::string m_datapath
int m_nbSensors
std::map< std::string, int > m_benchNames2index
jafar::kernel::KeyValueFile m_keyValueFile

Static Private Attributes

static std::string s_basepath
static std::string s_seriesname
static int s_serienumber

Constructor & Destructor Documentation

jafar::datareader::DataReader::DataReader ( std::string  seriesname = s_seriesname,
int  serienumber = s_serienumber,
std::string  basepath = s_basepath 
)

Create a data reader.

Parameters:
seriesnamethe name of the series
serienumberthe number of the serie inside the seriesname
basepaththe basepath of data

Member Function Documentation

static std::string jafar::datareader::DataReader::defaultBasePath ( ) [inline, static]
Returns:
the default base path

Definition at line 89 of file DataReader.hpp.

static int jafar::datareader::DataReader::defaultSerieNumber ( ) [inline, static]
Returns:
the default serie number

Definition at line 107 of file DataReader.hpp.

static std::string jafar::datareader::DataReader::defaultSeriesName ( ) [inline, static]
Returns:
the default the series name

Definition at line 98 of file DataReader.hpp.

void jafar::datareader::DataReader::getBasicSensorInfo ( int  index,
std::string &  sensorbase,
std::string &  sensorname,
std::string &  benchtype 
) [private]

Get some basic information about the sensor.

Parameters:
nthe number of the sensor
sensorbasethe prefix of the sensor in the configuration file
sensornamethe name of the sensor
benchtypethe type of sensor
MonoReader* jafar::datareader::DataReader::getMonoReader ( int  index,
bool  fatal = true 
) [inline]

This function is return a reader for.

Parameters:
indexthe index of the bench
Returns:
a reader for the mono bench

Definition at line 53 of file DataReader.hpp.

References getMonoReader().

Referenced by getMonoReader(), and getPanoReader().

MonoReader* jafar::datareader::DataReader::getMonoReader ( std::string  benchName) [inline]

This function is a convenient function for the previous one.

Parameters:
benchNamethe name of the bench
Returns:
a reader for the mono bench

Definition at line 59 of file DataReader.hpp.

References getMonoReader().

MonoReader* jafar::datareader::DataReader::getPanoReader ( int  index,
bool  fatal = true 
) [inline]

This function return a reader on a panoramic camera.

Parameters:
indexthe index of the bench
Returns:
a reader for the panoramic bench

Definition at line 68 of file DataReader.hpp.

References getMonoReader().

Referenced by getPanoReader().

MonoReader* jafar::datareader::DataReader::getPanoReader ( std::string  benchName) [inline]

This function is a convenient function for the previous one.

Parameters:
benchNamethe name of the bench
Returns:
a reader for the panoramic bench

Definition at line 74 of file DataReader.hpp.

References getPanoReader().

StereoReader* jafar::datareader::DataReader::getStereoReader ( int  index,
bool  fatal = true 
)

This function is a convenient function for the previous one.

Parameters:
indexthe index of the bench
Returns:
a reader for the stereo bench

Referenced by getStereoReader().

StereoReader* jafar::datareader::DataReader::getStereoReader ( std::string  benchName) [inline]

This function is a convenient function for the previous one.

Parameters:
benchNamethe name of the bench
Returns:
a reader for the stereo bench

Definition at line 44 of file DataReader.hpp.

References getStereoReader().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Wed Oct 15 2014 00:37:33 for Jafar by doxygen 1.7.6.1
LAAS-CNRS