Classes | Static Public Member Functions | Static Protected Member Functions
MetaFile Class Reference

#include <MetaFile.h>

List of all members.

Classes

struct  MetaData

Static Public Member Functions

static void readFile (const std::string &filename, MetaData &data)
static void saveFile (const std::string &filename, const MetaData &data)

Static Protected Member Functions

template<class T >
static T parse (const std::string &s)
template<class T >
static std::vector< Tparse (const std::vector< std::string > &v)
static void parseDimensions (MetaFile::MetaData &meta, rapidxml::xml_node<> *node)
static void parseFace (MetaFile::MetaData &meta, rapidxml::xml_node<> *node)
template<class T >
static std::string stringfy (T v)
template<class T >
static std::string stringfy (T *v, int N)

Detailed Description

General structure of meta xml files: (Date: 15 Dec 2010)

<model> <name>cabinet1</name> <type>planar</type> <faces>1</faces> <dimensions> <scale>0.5</scale> <width>0.35</width> <height>0.69</height> <depth>0.3</depth> <face> <index>0</index> <width>0.35</width> <height>0.35</height> <oTf>1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1</cTf> </face> </dimensions> </model>

name: name of the object type: type of objects. Valid types are "planar" or "3D" faces: number of faces the model is composed of (usually 1-6 for planar objects -actually planar or cube-shaped-, or any number for 3D) dimensions: dimensions of the object. Fields under this node only appear depending on the type of the object + scale (3D): scale factor applied to the 3D points obtained when Bundler and PMVS are run on the face images. This value is useful to reconstruct the model + width, height, depth (planar): real dimensions in metres of a planar/cuboid object. For actually planar objects, depth is 0 (or may not appear). What dimension is associated with each concept depends on the application that created the model face (planar): contains information about the dimensions of each face. This information is used to reconstruct the model + index: index of the face [0..N) + width, height: real dimensions in metres of the planar face + oTf: 4x4 transformation in row-major order from the object frame to the face frame. oTf is the identity matrix when the object is actually planar (only one face)

Definition at line 87 of file MetaFile.h.


Member Function Documentation

template<class T >
T MetaFile::parse ( const std::string &  s) [static, protected]

Returns a value from a string

Parameters:
s
Returns:
T

Definition at line 215 of file MetaFile.h.

template<class T >
std::vector< T > MetaFile::parse ( const std::vector< std::string > &  v) [static, protected]

Returns several values from a vector of strings

Parameters:
s
Returns:
vector of T's

Definition at line 226 of file MetaFile.h.

void MetaFile::parseDimensions ( MetaFile::MetaData meta,
rapidxml::xml_node<> *  node 
) [static, protected]

Parses the <dimension> node

Parameters:
metastruct to put the data in
node<dimension> node

Definition at line 131 of file MetaFile.cpp.

void MetaFile::parseFace ( MetaFile::MetaData meta,
rapidxml::xml_node<> *  node 
) [static, protected]

Parses the <face> node

Parameters:
metastruct to put the data in
node<face> node

Definition at line 172 of file MetaFile.cpp.

void MetaFile::readFile ( const std::string &  filename,
MetaData data 
) [static]

Reads a meta.xml file and returns its content

Parameters:
filename
data

Definition at line 55 of file MetaFile.cpp.

void MetaFile::saveFile ( const std::string &  filename,
const MetaData data 
) [static]

Writes the metadata in filename in xml format

Parameters:
filename
data

Definition at line 231 of file MetaFile.cpp.

template<class T >
std::string MetaFile::stringfy ( T  v) [static, protected]

Converts v into a string

Parameters:
v
Returns:
string version of v

Definition at line 243 of file MetaFile.h.

template<class T >
std::string MetaFile::stringfy ( T v,
int  N 
) [static, protected]

Converts array v into a string separated by spaces

Parameters:
v
Nitems in v
Returns:
string version of v

Definition at line 253 of file MetaFile.h.


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


re_vision
Author(s): Dorian Galvez-Lopez
autogenerated on Sun Jan 5 2014 11:34:15