FastTrack 6.1.0
Tracks multiples objects dealing with occlusion and identities.
Public Member Functions | Public Attributes | Private Attributes | List of all members
Data Class Reference

This class allows to load tracking data produced by the Tracking class. More...

Public Member Functions

 Data ()
 Construct the data object from a tracking result file.
 
 Data (const QString &dataPath)
 Construct the data object from a tracking result file. More...
 
 Data (const Data &T)=delete
 
Dataoperator= (const Data &T)=delete
 
bool setPath (const QString &dataPath)
 Set the path to a tracking data file. More...
 
QHash< QString, double > getData (int imageIndex, int id) const
 Get the tracking data at the selected image number for one selected object. More...
 
QList< QHash< QString, double > > getData (int imageIndex) const
 Get the tracking data at the selected image number/. More...
 
QHash< QString, QList< double > > getDataId (int id) const
 Get the tracking data for the selected id. More...
 
QList< int > getId (int imageIndex) const
 Get the ids of all the objects in the frame. More...
 
QList< int > getId (int imageIndexFirst, int imageIndexLast) const
 Get the ids of all the objects in several frames. More...
 
int getObjectInformation (int objectId) const
 Get the object's information. More...
 
void swapData (int firstObject, int secondObject, int from)
 In the tracking data, swaps two objects from a selected index to the end. More...
 
void deleteData (int objectId, int from, int to)
 Delete the tracking data of one object from a selected index to the end. More...
 
void insertData (int objectId, int from, int to)
 Insert the tracking data for one object from a selected index to the end. More...
 
void save (bool force=true, int eachActions=30)
 Save the data in the tracking result file. More...
 
void clear ()
 Clear data.
 

Public Attributes

int maxId
 
int maxFrameIndex
 
bool isEmpty
 

Private Attributes

QString dir
 
int actions
 

Detailed Description

This class allows to load tracking data produced by the Tracking class.

Author
Benjamin Gallois
Version
Revision
5.0

Contact: benja.nosp@m.min..nosp@m.gallo.nosp@m.is@f.nosp@m.asttr.nosp@m.ack..nosp@m.sh

Constructor & Destructor Documentation

◆ Data()

Data::Data ( const QString &  dataPath)
explicit

Construct the data object from a tracking result file.

Parameters
[in]dataPathPath to the tracking data file.

Member Function Documentation

◆ deleteData()

void Data::deleteData ( int  objectId,
int  from,
int  to 
)

Delete the tracking data of one object from a selected index to the end.

  • [in] objectId The object id.
  • [in] from Start index from which the data will be deleted.
  • [in] to End index from which the data will be deleted.

◆ getData() [1/2]

QList< QHash< QString, double > > Data::getData ( int  imageIndex) const

Get the tracking data at the selected image number/.

Parameters
[in]imageIndexThe index of the image where to extracts the data.
Returns
The tracking data at the selected image. The data are stored in a QList<QHash<dataName, value>>.

◆ getData() [2/2]

QHash< QString, double > Data::getData ( int  imageIndex,
int  id 
) const

Get the tracking data at the selected image number for one selected object.

Parameters
[in]imageIndexThe index of the image where to extracts the data.
[in]idThe id of the object.
Returns
The tracking data for the selected object at the selected image. The data are stored in a QHash<dataName, value>.

◆ getDataId()

QHash< QString, QList< double > > Data::getDataId ( int  id) const

Get the tracking data for the selected id.

Parameters
[in]idThe id of the object.
Returns
The tracking data for for the selected object in a map with the key and a vector with the value for all the images.

◆ getId() [1/2]

QList< int > Data::getId ( int  imageIndex) const

Get the ids of all the objects in the frame.

  • [in] imageIndex Index of the frame.
    Returns
    List of indexes.

◆ getId() [2/2]

QList< int > Data::getId ( int  imageIndexFirst,
int  imageIndexLast 
) const

Get the ids of all the objects in several frames.

  • [in] imageIndexFirst Index of the first frame.
  • [in] imageIndexLast Index of the last frame.
    Returns
    List of indexes.

◆ getObjectInformation()

int Data::getObjectInformation ( int  objectId) const

Get the object's information.

  • [in] objectId Id of the object.
    Returns
    First appearance image index.

◆ insertData()

void Data::insertData ( int  objectId,
int  from,
int  to 
)

Insert the tracking data for one object from a selected index to the end.

  • [in] objectId The object id.
  • [in] from Start index from which the data will be swapped.
  • [in] to End index from which the data will be swapped.

◆ save()

void Data::save ( bool  force = true,
int  eachActions = 30 
)

Save the data in the tracking result file.

Parameters
[in]forceForce the saving.
[in]eachActionsSave every eachActions actions.

◆ setPath()

bool Data::setPath ( const QString &  dataPath)

Set the path to a tracking data file.

Parameters
[in]dataPathPath to the tracking data file.

◆ swapData()

void Data::swapData ( int  firstObject,
int  secondObject,
int  from 
)

In the tracking data, swaps two objects from a selected index to the end.

  • [in] firstObject The first object id.
  • [in] secondObject The second object id.
  • [in] from Start index from which the data will be swapped.

Member Data Documentation

◆ dir

QString Data::dir
private

Path to the tracking result file.


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