#include <FeaturesDataBase.h>
Public Types | |
typedef boost::unordered_map< Feature::Id, Feature::LocationPair > | MapOfFeatureLocationPairs |
typedef boost::unordered_map< Feature::Id, Feature::Location > | MapOfFeatureLocations |
typedef boost::unordered_map< Feature::Id, Feature::Ptr > | MapOfFeatures |
typedef boost::shared_ptr< FeaturesDataBase > | Ptr |
Protected Attributes | |
std::vector< Feature::Id > | _alive_feat_ids |
MapOfFeatures | _map_of_features |
int | _time |
Definition at line 41 of file FeaturesDataBase.h.
typedef boost::unordered_map<Feature::Id, Feature::LocationPair > omip::FeaturesDataBase::MapOfFeatureLocationPairs |
Definition at line 55 of file FeaturesDataBase.h.
typedef boost::unordered_map<Feature::Id, Feature::Location> omip::FeaturesDataBase::MapOfFeatureLocations |
Definition at line 52 of file FeaturesDataBase.h.
typedef boost::unordered_map<Feature::Id, Feature::Ptr> omip::FeaturesDataBase::MapOfFeatures |
Definition at line 49 of file FeaturesDataBase.h.
Definition at line 46 of file FeaturesDataBase.h.
FeaturesDataBase::FeaturesDataBase | ( | ) |
Constructor
Definition at line 9 of file FeaturesDataBase.cpp.
|
virtual |
Destructor
Definition at line 15 of file FeaturesDataBase.cpp.
bool FeaturesDataBase::addFeatureLocation | ( | Feature::Id | f_id, |
Feature::Location | f_loc | ||
) |
Add a new location of a Feature that could be already in the data base or not The Id of the Feature is added to the alive Features list
Definition at line 20 of file FeaturesDataBase.cpp.
Feature::Id FeaturesDataBase::addFeatureLocation | ( | Feature::Location | f_loc | ) |
void FeaturesDataBase::clearListOfAliveFeatureIds | ( | ) |
Clear the list of Ids of alive Features Every time a new Location of a contained Feature or the first Location of a new Feature is added, the Id of that Feature gets into the list of alive Features This Function MUST be called before the next iteration!!!! (before it was done internally in the step function)
Definition at line 68 of file FeaturesDataBase.cpp.
FeaturesDataBase::MapOfFeatures FeaturesDataBase::getAllFeatures | ( | ) | const |
Get a map of Feature::Ids -> Feature::Ptr
Definition at line 324 of file FeaturesDataBase.cpp.
FeaturesDataBase::MapOfFeatureLocations FeaturesDataBase::getAllFeaturesLastLocation | ( | ) | const |
Get a map of Feature::Ids -> Feature last location
Definition at line 274 of file FeaturesDataBase.cpp.
FeaturesDataBase::MapOfFeatureLocations FeaturesDataBase::getAllFeaturesNextToLastLocation | ( | ) | const |
Get a map of Feature::Ids -> Feature next to last location
Definition at line 285 of file FeaturesDataBase.cpp.
FeaturesDataBase::MapOfFeatureLocationPairs FeaturesDataBase::getAllFeaturesTwoLastLocations | ( | ) | const |
Get a map of Feature::Ids -> Feature last and next to last location
Definition at line 296 of file FeaturesDataBase.cpp.
Feature::Ptr FeaturesDataBase::getFeature | ( | Feature::Id | f_id | ) | const |
Get a shared pointer to a Feature
f_id | - Id of the Feature to get the shared pointer from |
Definition at line 93 of file FeaturesDataBase.cpp.
size_t FeaturesDataBase::getFeatureAge | ( | Feature::Id | f_id | ) | const |
Get the age of a Feature
f_id | - Id of the Feature to get the age from |
Definition at line 202 of file FeaturesDataBase.cpp.
Feature::Ptr FeaturesDataBase::getFeatureClone | ( | Feature::Id | f_id | ) | const |
Get the clone of a Feature
f_id | - Id of the Feature to get the clone from |
Definition at line 78 of file FeaturesDataBase.cpp.
Feature::Location FeaturesDataBase::getFeatureFirstLocation | ( | Feature::Id | f_id | ) | const |
Get first Location of a Feature
f_id | - Id of the Feature to get the first Location from |
Definition at line 106 of file FeaturesDataBase.cpp.
Feature::Location FeaturesDataBase::getFeatureLastLocation | ( | Feature::Id | f_id | ) | const |
Get last location of a Feature
f_id | - Id of the Feature to get the last Location from |
Definition at line 122 of file FeaturesDataBase.cpp.
double FeaturesDataBase::getFeatureLastX | ( | Feature::Id | f_id | ) | const |
Get the x coordinate of the last Location of a Feature
f_id | - Id of the Feature to get the x coordinate from |
Definition at line 229 of file FeaturesDataBase.cpp.
double FeaturesDataBase::getFeatureLastY | ( | Feature::Id | f_id | ) | const |
Get the y coordinate of the last Location of a Feature
f_id | - Id of the Feature to get the y coordinate from |
Definition at line 244 of file FeaturesDataBase.cpp.
double FeaturesDataBase::getFeatureLastZ | ( | Feature::Id | f_id | ) | const |
Get the z coordinate of the last Location of a Feature
f_id | - Id of the Feature to get the z coordinate from |
Definition at line 259 of file FeaturesDataBase.cpp.
Feature::Location FeaturesDataBase::getFeatureNextToLastLocation | ( | Feature::Id | f_id | ) | const |
Get next to last location of a Feature
f_id | - Id of the Feature to get the next to last Location from |
Definition at line 138 of file FeaturesDataBase.cpp.
Feature::Location FeaturesDataBase::getFeatureNToLastLocation | ( | Feature::Id | f_id, |
int | frames_to_last | ||
) | const |
Get the Location of a Feature N frames before the last Location
f_id | - Id of the Feature to get the two last Locations from |
frames_to_last | - Number of frames before the last frame where we want the Location from |
Definition at line 170 of file FeaturesDataBase.cpp.
Feature::Trajectory FeaturesDataBase::getFeatureTrajectory | ( | Feature::Id | f_id | ) | const |
Get the Trajectory of a Feature
f_id | - Id of the Feature to get the Trajectory from |
Definition at line 186 of file FeaturesDataBase.cpp.
Feature::LocationPair FeaturesDataBase::getFeatureTwoLastLocations | ( | Feature::Id | f_id | ) | const |
Get the two last Locations (last and next to last) of a Feature
f_id | - Id of the Feature to get the two last Locations from |
Definition at line 154 of file FeaturesDataBase.cpp.
std::vector< Feature::Id > FeaturesDataBase::getListOfAliveFeatureIds | ( | ) | const |
Get a vector containing the Ids of the Features that are still alive
Definition at line 73 of file FeaturesDataBase.cpp.
int FeaturesDataBase::getTime | ( | ) | const |
Get the frame counter of this Database (the number of times that this->step() was called()
Definition at line 329 of file FeaturesDataBase.cpp.
bool FeaturesDataBase::isFeatureStored | ( | Feature::Id | f_id | ) | const |
Check if a Feature is stored in the Data base
f_id | - Id of the Feature we want to know if is stored or not |
Definition at line 217 of file FeaturesDataBase.cpp.
void FeaturesDataBase::step | ( | ) |
Step the Data base: 1: Update the frame counter (used to set the Feature birthdays) 2: Delete from the Data base all Features that have not been updated (get a new Location) in the last step
Definition at line 50 of file FeaturesDataBase.cpp.
|
protected |
Definition at line 235 of file FeaturesDataBase.h.
|
protected |
Definition at line 233 of file FeaturesDataBase.h.
|
protected |
Definition at line 237 of file FeaturesDataBase.h.