10#include <QMapIterator>
12#include <QSqlDatabase>
20#include <QUndoCommand>
31 explicit Data(
const QString &dataPath);
33 Data &operator=(
const Data &T) =
delete;
36 bool setPath(
const QString &dataPath);
37 QHash<QString, double>
getData(
int imageIndex,
int id)
const;
38 QList<QHash<QString, double>>
getData(
int imageIndex)
const;
39 QHash<QString, QList<double>>
getDataId(
int id)
const;
40 QList<int>
getId(
int imageIndex)
const;
41 QList<int>
getId(
int imageIndexFirst,
int imageIndexLast)
const;
43 void swapData(
int firstObject,
int secondObject,
int from);
44 void deleteData(
int objectId,
int from,
int to);
45 void insertData(
int objectId,
int from,
int to);
46 void save(
bool force =
true,
int eachActions = 30);
55 SwapData(
int firstObject,
int secondObject,
int from,
Data *data);
This class allows to load tracking data produced by the Tracking class.
Definition: data.h:24
void insertData(int objectId, int from, int to)
Insert the tracking data for one object from a selected index to the end.
Definition: data.cpp:271
bool setPath(const QString &dataPath)
Set the path to a tracking data file.
Definition: data.cpp:55
void clear()
Clear data.
Definition: data.cpp:36
void swapData(int firstObject, int secondObject, int from)
In the tracking data, swaps two objects from a selected index to the end.
Definition: data.cpp:232
QList< int > getId(int imageIndex) const
Get the ids of all the objects in the frame.
Definition: data.cpp:173
QHash< QString, QList< double > > getDataId(int id) const
Get the tracking data for the selected id.
Definition: data.cpp:149
QHash< QString, double > getData(int imageIndex, int id) const
Get the tracking data at the selected image number for one selected object.
Definition: data.cpp:102
QString dir
Definition: data.h:26
int getObjectInformation(int objectId) const
Get the object's information.
Definition: data.cpp:213
void deleteData(int objectId, int from, int to)
Delete the tracking data of one object from a selected index to the end.
Definition: data.cpp:249
void save(bool force=true, int eachActions=30)
Save the data in the tracking result file.
Definition: data.cpp:292
Data()
Construct the data object from a tracking result file.
Definition: data.cpp:91