#include <CvrStgFile.h>
Public Member Functions | |
CvrStgFile (void) | |
virtual | ~CvrStgFile (void) |
virtual void | read (BinaryIO *io) |
virtual void | write (void) |
void | transform (const std::string &fn) |
virtual std::list< Property > | getProperties (void) const =0 |
virtual std::vector < SampleValueAdjacencyList * > | calcSVAdjacencyLists (const std::vector< SampleValue * > &svs) const |
virtual std::vector < MatchingAlgorithm * > | getMatchingAlgorithms (Graph *g, Matching *m) const |
const std::string & | getName (void) const |
bool | is_std (void) const |
unsigned long | getCapacity (void) const |
std::string | getHRCapacity (void) const |
unsigned short | getSamplesPerVertex (void) const |
UWORD32 | getRadius (void) const |
EmbValue | getEmbValueModulus (void) const |
virtual EmbValue | getEmbeddedValue (const SamplePos pos) const |
Static Public Member Functions | |
static CvrStgFile * | readFile (const std::string &fn) |
Protected Member Functions | |
void | setSamplesPerVertex (unsigned short spv) |
void | setRadius (UWORD32 r) |
void | setEmbValueModulus (EmbValue m) |
void | setBinIO (BinaryIO *io) |
BinaryIO * | getBinIO (void) const |
Private Types | |
enum | FILEFORMAT { UNKNOWN, BMP, WAV, AU, JPEG } |
Static Private Member Functions | |
static FILEFORMAT | guessff (BinaryIO *io) |
Private Attributes | |
BinaryIO * | BinIO |
unsigned short | SamplesPerVertex |
UWORD32 | Radius |
EmbValue | EmbValueModulus |
Classes | |
class | Property |
enum CvrStgFile::FILEFORMAT [private] |
CvrStgFile::CvrStgFile | ( | void | ) |
CvrStgFile::~CvrStgFile | ( | void | ) | [virtual] |
CvrStgFile * CvrStgFile::readFile | ( | const std::string & | fn | ) | [static] |
this function reads the file with name fn and returns a *File object of the correct type casted to CvrStgFile.
void CvrStgFile::transform | ( | const std::string & | fn | ) |
virtual std::list<Property> CvrStgFile::getProperties | ( | void | ) | const [pure virtual] |
std::vector< SampleValueAdjacencyList * > CvrStgFile::calcSVAdjacencyLists | ( | const std::vector< SampleValue * > & | svs | ) | const [virtual] |
calculate a vector a SampleValueAdjacencyLists
svs | a vector of unique(!) sample values where svs[i]->getLabel() == i holds for all i |
May be overridden in derived class to provide a faster version.
std::vector< MatchingAlgorithm * > CvrStgFile::getMatchingAlgorithms | ( | Graph * | g, | |
Matching * | m | |||
) | const [virtual] |
get recommended list of matching algorithms
m | an empty matching - will be used in construction of MatchingAlgorithm objects |
const std::string& CvrStgFile::getName | ( | void | ) | const [inline] |
get the name of this cvrstgfile
bool CvrStgFile::is_std | ( | void | ) | const [inline] |
unsigned long CvrStgFile::getCapacity | ( | void | ) | const |
get the capacity of this cvrstgfile
std::string CvrStgFile::getHRCapacity | ( | void | ) | const |
get the capacity as a human-readable string
unsigned short CvrStgFile::getSamplesPerVertex | ( | void | ) | const [inline] |
get the number of samples per vertex (this is a file-format specific constant)
UWORD32 CvrStgFile::getRadius | ( | void | ) | const [inline] |
get the neighbourhood radius (this is a file-format specific constant)
EmbValue CvrStgFile::getEmbValueModulus | ( | void | ) | const [inline] |
values that are embedded in samples will be in 0...Modulus-1 (this is a file-format specific constant)
get the value that is embedded in the Sample pos
pos | the position of the sample |
May be overwritten by derived class to provide a faster version.
void CvrStgFile::setSamplesPerVertex | ( | unsigned short | spv | ) | [inline, protected] |
void CvrStgFile::setRadius | ( | UWORD32 | r | ) | [protected] |
set Radius to r unless Args.Radius is set (set Radius to Args.Radius.getValue() then)
void CvrStgFile::setEmbValueModulus | ( | EmbValue | m | ) | [inline, protected] |
void CvrStgFile::setBinIO | ( | BinaryIO * | io | ) | [inline, protected] |
BinaryIO* CvrStgFile::getBinIO | ( | void | ) | const [inline, protected] |
CvrStgFile::FILEFORMAT CvrStgFile::guessff | ( | BinaryIO * | io | ) | [static, private] |
guesses the file format by looking at the first few bytes
BinaryIO* CvrStgFile::BinIO [private] |
unsigned short CvrStgFile::SamplesPerVertex [private] |
UWORD32 CvrStgFile::Radius [private] |
EmbValue CvrStgFile::EmbValueModulus [private] |