BTK  0.3dev.0
Open-source library to visualize/process biomechanical data
List of all members | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
btk::Measure< Derived > Class Template Reference

Measure with d dimensions along the time. More...

#include <btkMeasure.h>

Inheritance diagram for btk::Measure< Derived >:
Inheritance graph
[legend]

Public Types

typedef MeasureTraits< Derived >
::Data 
Data
 Associated data with the measure.
 
typedef MeasureTraits< Derived >
::Values 
Values
 Values of the measure.
 
- 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< DataObjectNullPointer
 
typedef btkSharedPtr< DataObjectPointer
 
- Public Types inherited from btk::Object
typedef btkSharedPtr< const
Object
ConstPointer
 
typedef btkSharedPtr< ObjectPointer
 

Public Member Functions

Measure< Derived >::Data::Pointer GetData () const
 
int GetFrameNumber () const
 
Measure< Derived >::ValuesGetValues ()
 
const Measure< Derived >::ValuesGetValues () const
 
void SetData (typename Measure< Derived >::Data::Pointer data, bool parenting=true)
 
void SetFrameNumber (int frameNumber)
 
void SetValues (const Values &v)
 
- Public Member Functions inherited from btk::DataObjectLabeled
const std::string & GetDescription () const
 
const std::string & GetLabel () const
 
virtual void SetDescription (const std::string &description)
 
virtual void SetLabel (const std::string &label)
 
- Public Member Functions inherited from btk::DataObject
DataObjectGetParent () const
 
bool HasParent () const
 
void Modified ()
 
void SetParent (DataObject *parent)
 
void Update ()
 
- Public Member Functions inherited from btk::Object
unsigned long int GetTimestamp () const
 

Protected Member Functions

 Measure (const std::string &label, const std::string &desc="")
 
 Measure (const std::string &label, int frameNumber, const std::string &desc="")
 
 Measure (const Measure &toCopy)
 
- 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 ()
 

Protected Attributes

Measure< Derived >::Data::Pointer mp_Data
 Smart pointer associated with the data of this measurement.
 
- 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
 

Additional Inherited Members

- Static Public Member Functions inherited from btk::DataObject
static NullPointer Null ()
 

Detailed Description

template<class Derived>
class btk::Measure< Derived >

Measure with d dimensions along the time.

Template Parameters
DerivedClass representing a kind of measurement (Point, Analog, etc.)

The measures are stored in a matrix. The measures' dimensions correspond to the columns of the matrix. The frames correspond to the line.

Warning
The number of dimensions d must be greater than 0.

Constructor & Destructor Documentation

template<class Derived >
btk::Measure< Derived >::Measure ( const std::string &  label,
const std::string &  desc = "" 
)
protected

Constructor.

Warning
The use of this constructor must be followed by the use of the method Measure::SetFrameNumber as it creates a null matrix for the values.
template<class Derived >
btk::Measure< Derived >::Measure ( const std::string &  label,
int  frameNumber,
const std::string &  desc = "" 
)
protected

Constructor.

template<class Derived >
btk::Measure< Derived >::Measure ( const Measure< Derived > &  toCopy)
protected

Copy constructor. Timestamp, source and parent are reset.

Member Function Documentation

template<class Derived>
Measure<Derived>::Data::Pointer btk::Measure< Derived >::GetData ( ) const
inline

Returns the data associated to this measure.

template<class Derived >
int btk::Measure< Derived >::GetFrameNumber ( ) const

Returns the number of frames.

template<class Derived >
Measure< Derived >::Values & btk::Measure< Derived >::GetValues ( )

Convenient method to return the values associated with measure's data.

Warning
This method tries to access directly to data's values even if no data has been set. Use this method carefully or use GetData() to access to measure's data.
template<class Derived >
const Measure< Derived >::Values & btk::Measure< Derived >::GetValues ( ) const

Convenient method to return the values associated with measure's data.

Warning
This method tries to access directly to data's values even if no data has been set. Use this method carefully or use GetData() to access to measure's data.
template<class Derived>
void btk::Measure< Derived >::SetData ( typename Measure< Derived >::Data::Pointer  data,
bool  parenting = true 
)

Set the data for this object. By default, this object will take the parent of the data. Setting parenting to false will unparent the old data, assign the new one, but doesn't set the point as its parent.

template<class Derived >
void btk::Measure< Derived >::SetFrameNumber ( int  frameNumber)

Sets the number of frames. The input frameNumber must be greater than 0.

template<class Derived>
void btk::Measure< Derived >::SetValues ( const Values v)

Convenient method to set the values of the measure's data. If no data exists for this object, then it is created and the values are assigned to it.