BTK
0.3dev.0
Open-source library to visualize/process biomechanical data
|
Store data which cannot be embedded within timeseries data (calibration matrix, subject informations, ...). More...
#include <btkMetaData.h>
Public Types | |
typedef std::list < MetaData::Pointer > ::const_iterator | ConstIterator |
typedef btkSharedPtr< const MetaData > | ConstPointer |
typedef std::list < MetaData::Pointer > ::iterator | Iterator |
typedef btkNullPtr< MetaData > | NullPointer |
typedef btkSharedPtr< MetaData > | Pointer |
Public Types inherited from btk::DataObjectLabeled | |
typedef btkSharedPtr< const DataObjectLabeled > | ConstPointer |
typedef btkSharedPtr < DataObjectLabeled > | Pointer |
Public Types inherited from btk::DataObject | |
typedef btkSharedPtr< const DataObject > | ConstPointer |
typedef btkNullPtr< DataObject > | NullPointer |
typedef btkSharedPtr< DataObject > | Pointer |
Public Types inherited from btk::Object | |
typedef btkSharedPtr< const Object > | ConstPointer |
typedef btkSharedPtr< Object > | Pointer |
Public Member Functions | |
bool | AppendChild (MetaData::Pointer entry) |
MetaData::Iterator | Begin () |
MetaData::ConstIterator | Begin () const |
void | ClearChildren () |
Pointer | Clone () const |
MetaData::Iterator | End () |
MetaData::ConstIterator | End () const |
MetaDataInfo::Pointer | ExtractChildInfo (const std::string &l, MetaDataInfo::Format f, int numDims, bool noPossibleEmptyValue=true) |
Iterator | FindChild (const std::string &label) |
ConstIterator | FindChild (const std::string &label) const |
MetaData::Pointer | GetChild (int idx) |
MetaData::ConstPointer | GetChild (int idx) const |
MetaData::Pointer | GetChild (const std::string &label) |
MetaData::ConstPointer | GetChild (const std::string &label) const |
int | GetChildNumber () const |
MetaDataInfo::Pointer | GetInfo () |
MetaDataInfo::ConstPointer | GetInfo () const |
bool | GetUnlockState (void) const |
bool | HasChildren () const |
bool | HasInfo () const |
bool | HasMetaDataAsParent () const |
bool | InsertChild (Iterator loc, MetaData::Pointer entry) |
bool | InsertChild (int idx, MetaData::Pointer entry) |
Iterator | RemoveChild (Iterator loc) |
void | RemoveChild (int idx) |
void | RemoveChild (const std::string &label) |
void | SetChild (int idx, MetaData::Pointer entry) |
void | SetInfo (MetaDataInfo::Pointer val) |
void | SetLabel (const std::string &label) |
void | SetParent (DataObject *parent=0) |
void | SetParent (MetaData *parent=0) |
void | SetUnlockState (bool isUnlocked) |
MetaData::Pointer | TakeChild (Iterator loc) |
MetaData::Pointer | TakeChild (int idx) |
MetaData::Pointer | TakeChild (const std::string &label) |
Public Member Functions inherited from btk::DataObjectLabeled | |
const std::string & | GetDescription () const |
const std::string & | GetLabel () const |
virtual void | SetDescription (const std::string &description) |
Public Member Functions inherited from btk::DataObject | |
DataObject * | GetParent () const |
bool | HasParent () const |
void | Modified () |
void | SetParent (DataObject *parent) |
void | Update () |
Public Member Functions inherited from btk::Object | |
unsigned long int | GetTimestamp () const |
Static Public Member Functions | |
static Pointer | New (const std::string &label, const std::string &desc="", bool isUnlocked=true) |
static Pointer | New (const std::string &label, int8_t val, const std::string &desc="", bool isUnlocked=true) |
static Pointer | New (const std::string &label, int16_t val, const std::string &desc="", bool isUnlocked=true) |
static Pointer | New (const std::string &label, float val, const std::string &desc="", bool isUnlocked=true) |
static Pointer | New (const std::string &label, const std::string &val, const std::string &desc="", bool isUnlocked=true) |
static Pointer | New (const std::string &label, const std::vector< int8_t > &val, const std::string &desc="", bool isUnlocked=true) |
static Pointer | New (const std::string &label, const std::vector< int16_t > &val, const std::string &desc="", bool isUnlocked=true) |
static Pointer | New (const std::string &label, const std::vector< float > &val, const std::string &desc="", bool isUnlocked=true) |
static Pointer | New (const std::string &label, const std::vector< std::string > &val, const std::string &desc="", bool isUnlocked=true) |
static Pointer | New (const std::string &label, const std::vector< uint8_t > &dim, const std::vector< int8_t > &val, const std::string &desc="", bool isUnlocked=true) |
static Pointer | New (const std::string &label, const std::vector< uint8_t > &dim, const std::vector< int16_t > &val, const std::string &desc="", bool isUnlocked=true) |
static Pointer | New (const std::string &label, const std::vector< uint8_t > &dim, const std::vector< float > &val, const std::string &desc="", bool isUnlocked=true) |
static Pointer | New (const std::string &label, const std::vector< uint8_t > &dim, const std::vector< std::string > &val, const std::string &desc="", bool isUnlocked=true) |
static NullPointer | Null () |
Static Public Member Functions inherited from btk::DataObject | |
static NullPointer | Null () |
Protected Member Functions | |
MetaData (const std::string &label, const std::string &desc="", bool isUnlocked=true) | |
MetaData (const std::string &label, int8_t val, const std::string &desc="", bool isUnlocked=true) | |
MetaData (const std::string &label, int16_t val, const std::string &desc="", bool isUnlocked=true) | |
MetaData (const std::string &label, float val, const std::string &desc="", bool isUnlocked=true) | |
MetaData (const std::string &label, const std::string &val, const std::string &desc="", bool isUnlocked=true) | |
MetaData (const std::string &label, const std::vector< int8_t > &val, const std::string &desc="", bool isUnlocked=true) | |
MetaData (const std::string &label, const std::vector< int16_t > &val, const std::string &desc="", bool isUnlocked=true) | |
MetaData (const std::string &label, const std::vector< float > &val, const std::string &desc="", bool isUnlocked=true) | |
MetaData (const std::string &label, const std::vector< std::string > &val, const std::string &desc="", bool isUnlocked=true) | |
MetaData (const std::string &label, const std::vector< uint8_t > &dim, const std::vector< int8_t > &val, const std::string &desc="", bool isUnlocked=true) | |
MetaData (const std::string &label, const std::vector< uint8_t > &dim, const std::vector< int16_t > &val, const std::string &desc="", bool isUnlocked=true) | |
MetaData (const std::string &label, const std::vector< uint8_t > &dim, const std::vector< float > &val, const std::string &desc="", bool isUnlocked=true) | |
MetaData (const std::string &label, const std::vector< uint8_t > &dim, const std::vector< std::string > &val, const std::string &desc="", bool isUnlocked=true) | |
Protected Member Functions inherited from btk::DataObjectLabeled | |
DataObjectLabeled (const std::string &label="", const std::string &description="") | |
DataObjectLabeled (const DataObjectLabeled &toCopy) | |
Protected Member Functions inherited from btk::DataObject | |
DataObject () | |
DataObject (const DataObject &toCopy) | |
virtual | ~DataObject () |
Protected Member Functions inherited from btk::Object | |
Object () | |
Object (const Object &toCopy) | |
virtual | ~Object () |
Friends | |
bool | operator!= (const MetaData &rLHS, const MetaData &rRHS) |
bool | operator== (const MetaData &rLHS, const MetaData &rRHS) |
Additional Inherited Members | |
Protected Attributes inherited from btk::DataObjectLabeled | |
std::string | m_Description |
std::string | m_Label |
Protected Attributes inherited from btk::Object | |
unsigned long int | m_Timestamp |
Store data which cannot be embedded within timeseries data (calibration matrix, subject informations, ...).
Each object can store children metadata. Theoretically, the number of sub-level is infinite. However, the main common use of the metadata is to use 2 levels. This use was introduced in the C3D format.
The values in a metadata are stored in a MetaDataInfo object and are accessible using the method GetInfo().
The unlock member accessible using the methods GetUnlock() and SetUnlock() doesn't affect the setting of the values, but is used only to inform the user/developer.
Const Iterator related to the children of the entry.
Smart pointer associated with a const MetaData object.
Iterator related to the children of the entry.
Smart pointer associated with a MetaData object.
|
protected |
Constructor for an entry without a MetaDataInfo.
|
protected |
Constructor for an entry containing a MetaDataInfo with a single BYTE.
|
protected |
Constructor for an entry containing a MetaDataInfo with a single INTEGER.
|
protected |
Constructor for an entry containing a MetaDataInfo with a single FLOAT.
|
protected |
Constructor for an entry containing a MetaDataInfo with a single string.
|
protected |
Constructor for an entry containing a MetaDataInfo of BYTE valuescorresponding to a 1D vector.
|
protected |
Constructor for an entry containing a MetaDataInfo of INTEGER values corresponding to a 1D vector.
|
protected |
Constructor for an entry containing a MetaDataInfo of FLOAT values corresponding to a 1D vector.
|
protected |
Constructor for an entry containing a MetaDataInfo of string values corresponding to a 1D vector.
|
protected |
Constructor for an entry containing a MetaDataInfo of BYTE values.
|
protected |
Constructor for an entry containing a MetaDataInfo of INTEGER values.
|
protected |
Constructor for an entry containing a MetaDataInfo of FLOAT values.
|
protected |
Constructor for an entry containing a MetaDataInfo of string values.
bool btk::MetaData::AppendChild | ( | MetaData::Pointer | entry | ) |
Append the child entry. If entry has a label which already exists in the parent's list, then it is not inserted.
|
inline |
Returns an iterator to the beginning of the list of children.
|
inline |
Returns a const iterator to the beginning of the list of children.
void btk::MetaData::ClearChildren | ( | ) |
Removes every children.
MetaData::Pointer btk::MetaData::Clone | ( | ) | const |
Returns a deep copy of the object as a smart pointer. The clone doesn't copy the parent's value
|
inline |
Returns an iterator just past the last child.
|
inline |
Returns a const iterator just past the last child.
MetaDataInfo::Pointer btk::MetaData::ExtractChildInfo | ( | const std::string & | l, |
MetaDataInfo::Format | f, | ||
int | numDims, | ||
bool | noPossibleEmptyValue = true |
||
) |
Check if a child exists with the label l and correspond to the given format f plus the number of dimensions numDims with or without values (noPossibleEmptyValue). The informations of the metadata are extracted in info if all the checks are ok. Otherwise, info return an empty MetaDataInfo::Pointer.
MetaData::Iterator btk::MetaData::FindChild | ( | const std::string & | label | ) |
Finds the children which has the label label and return it as an Iterator
MetaData::ConstIterator btk::MetaData::FindChild | ( | const std::string & | label | ) | const |
Finds the children which has the label label and return it as a ConstIterator
MetaData::Pointer btk::MetaData::GetChild | ( | int | idx | ) |
Gets the entry for the given idx or throw an exception if the index is out of range.
MetaData::ConstPointer btk::MetaData::GetChild | ( | int | idx | ) | const |
Gets the entry for the given idx or throw an exception if the index is out of range.
MetaData::Pointer btk::MetaData::GetChild | ( | const std::string & | label | ) |
Gets the entry which this label, or throw an exception if no entry is associated.
MetaData::ConstPointer btk::MetaData::GetChild | ( | const std::string & | label | ) | const |
Gets the entry which this label, or throw an exception if no entry is associated.
|
inline |
Returns the number of children
|
inline |
Gets the MetaDataInfo associated to the entry.
|
inline |
Gets the MetaDataInfo associated to the entry.
|
inline |
Gets the unlock state of the entry.
|
inline |
Checks if the entry has children
|
inline |
Checks if a MetaDataInfo is associated with the entry.
|
inline |
Checks if this object has a MetaData object as parents.
bool btk::MetaData::InsertChild | ( | Iterator | loc, |
MetaData::Pointer | entry | ||
) |
Insert the child entry for the given location given by the iterator loc. If entry has a label which already exists in the parent's list, then it is not inserted.
bool btk::MetaData::InsertChild | ( | int | idx, |
MetaData::Pointer | entry | ||
) |
Insert the child entry for the given idx
|
inlinestatic |
Creates a smart pointer from the MetaData(const std::string&, const std::string&, bool) constructor.
|
inlinestatic |
Creates a smart pointer from the MetaData(const std::string&, int8_t, const std::string&, bool) constructor.
|
inlinestatic |
Creates a smart pointer from the MetaData(const std::string&, int16_t, const std::string&, bool) constructor.
|
inlinestatic |
Creates a smart pointer from the MetaData(const std::string&, float, const std::string&, bool) constructor.
|
inlinestatic |
Creates a smart pointer from the MetaData(const std::string&, const std::string&, const std::string&, bool) constructor.
|
inlinestatic |
Creates a smart pointer from the MetaData(const std::string&, const std::vector<int8_t>&, const std::string&, bool) constructor.
|
inlinestatic |
Creates a smart pointer from the MetaData(const std::string&, const std::vector<int16_t>&, const std::string&, bool) constructor.
|
inlinestatic |
Creates a smart pointer from the MetaData(const std::string&, const std::vector<float>&, const std::string&, bool) constructor.
|
inlinestatic |
Creates a smart pointer from the MetaData(const std::string&, const std::vector<std::string>&, const std::string&, bool) constructor.
|
inlinestatic |
Creates a smart pointer from the MetaData(const std::string&, const std::vector<uint8_t>&, const std::vector<int8_t>&, const std::string&, bool) constructor.
|
inlinestatic |
Creates a smart pointer from the MetaData(const std::string&, const std::vector<uint8_t>&, const std::vector<int16_t>&, const std::string&, bool) constructor.
|
inlinestatic |
Creates a smart pointer from the MetaData(const std::string&, const std::vector<uint8_t>&, const std::vector<float>&, const std::string&, bool) constructor.
|
inlinestatic |
Creates a smart pointer from the MetaData(const std::string&, const std::vector<uint8_t>&, const std::vector<std::string>&, const std::string&, bool) constructor.
|
inlinestatic |
Static function to return a null pointer.
MetaData::Iterator btk::MetaData::RemoveChild | ( | Iterator | loc | ) |
Removes the child entry at the iterator loc.
void btk::MetaData::RemoveChild | ( | int | idx | ) |
Removes the child entry at the index idx.
void btk::MetaData::RemoveChild | ( | const std::string & | label | ) |
Removes the child entry with the label label.
void btk::MetaData::SetChild | ( | int | idx, |
MetaData::Pointer | entry | ||
) |
Sets the child entry for the given idx.
|
inline |
Sets the MetaDataInfo associated to the entry.
|
virtual |
Sets the label of the entry. If label already exist in the parent's list, then an exception is thrown.
Reimplemented from btk::DataObjectLabeled.
|
inline |
Sets the parent of the entry.
|
inline |
Sets the parent of the entry.
|
inline |
Sets the unlock state of the entry.
MetaData::Pointer btk::MetaData::TakeChild | ( | Iterator | loc | ) |
Removes the child entry at the location given by the iterator loc and return it. If there is no child at the given location, then an empty Pointer is returned.
MetaData::Pointer btk::MetaData::TakeChild | ( | int | idx | ) |
Removes the child entry at idx and return it. If there is no child at the given index, then an empty Pointer is returned.
MetaData::Pointer btk::MetaData::TakeChild | ( | const std::string & | label | ) |
Removes the child entry which has this label and return it. If there is no child with the specified label, then an empty Pointer is returned.