Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
omip::Feature Class Reference

Minimal class that represents a Point of Interest by an ID and stores its successive locations $Author: Martin. More...

#include <Feature.h>

Public Types

typedef long Id
 
typedef boost::tuple< double, double, double > Location
 
typedef std::pair< Location, LocationLocationPair
 
typedef boost::shared_ptr< FeaturePtr
 
typedef std::vector< LocationTrajectory
 

Public Member Functions

void addLocation (Location fl_in)
 
Ptr clone () const
 
 Feature ()
 
 Feature (int feature_birthday, Location first_fl_in)
 
 Feature (int feature_birthday, Location first_fl_in, Id f_id)
 
 Feature (const Feature &f)
 
size_t getFeatureAge () const
 
int getFeatureBirthday () const
 
Location getFirstLocation () const
 
Id getId () const
 
Location getLastLocation () const
 
double getLastX () const
 
double getLastY () const
 
double getLastZ () const
 
Location getNextToLastLocation () const
 
Location getNToLastLocation (int frames_to_last) const
 
const TrajectorygetTrajectory () const
 
LocationPair getTwoLastLocations () const
 
void setFeatureBirthday (int feature_birthday)
 
virtual ~Feature ()
 

Protected Member Functions

virtual FeaturedoClone () const
 

Protected Attributes

int _birthday
 
Location _first_location
 
Id _id
 
Trajectory _trajectory
 

Static Protected Attributes

static Id _feature_id_generator = 1
 

Detailed Description

Minimal class that represents a Point of Interest by an ID and stores its successive locations $Author: Martin.

Revision
0.1

Definition at line 48 of file Feature.h.

Member Typedef Documentation

typedef long omip::Feature::Id

Definition at line 56 of file Feature.h.

typedef boost::tuple<double, double, double> omip::Feature::Location

Definition at line 59 of file Feature.h.

Definition at line 65 of file Feature.h.

Definition at line 53 of file Feature.h.

typedef std::vector<Location> omip::Feature::Trajectory

Definition at line 62 of file Feature.h.

Constructor & Destructor Documentation

Feature::Feature ( )

Feature constructor

Definition at line 9 of file Feature.cpp.

Feature::Feature ( int  feature_birthday,
Location  first_fl_in 
)

Feature constructor

Parameters
feature_birthday- Time stamp when the Feature was initially detected
first_fl_in- First Feature Location

Definition at line 15 of file Feature.cpp.

Feature::Feature ( int  feature_birthday,
Location  first_fl_in,
Id  f_id 
)

Feature constructor This constructor should be used when the Feature Ids are externally provided

Parameters
feature_birthday- Time stamp when the Feature was initially detected
first_fl_in- First Feature Location
f_id- Id of the Feature

Definition at line 23 of file Feature.cpp.

Feature::Feature ( const Feature f)

Copy constructor

Parameters
f- Feature to be copied

Definition at line 29 of file Feature.cpp.

Feature::~Feature ( )
virtual

Default destructor

Definition at line 37 of file Feature.cpp.

Member Function Documentation

void Feature::addLocation ( Location  fl_in)

Add a new Location of this Feature

Parameters
fl_in- New location of this Feature

Definition at line 47 of file Feature.cpp.

Feature::Ptr Feature::clone ( ) const

Create a new Feature object as a copy of this and pass a pointer

Returns
- Shared pointer to the copy of this Feature

Definition at line 42 of file Feature.cpp.

virtual Feature* omip::Feature::doClone ( ) const
inlineprotectedvirtual

Definition at line 208 of file Feature.h.

size_t Feature::getFeatureAge ( ) const

Get the age of this Feature

Returns
- Age of this Feature

Definition at line 126 of file Feature.cpp.

int Feature::getFeatureBirthday ( ) const

Get this Feature's Birthday (frame number)

Returns
- Birthday of this Feature as the frame when it was initially detected

Definition at line 131 of file Feature.cpp.

Feature::Location Feature::getFirstLocation ( ) const

Get the first Location of this Feature

Returns
- First Location of this Feature

Definition at line 61 of file Feature.cpp.

Feature::Id Feature::getId ( ) const

Get the Id of this Feature

Returns
- Id of this Feature

Definition at line 56 of file Feature.cpp.

Feature::Location Feature::getLastLocation ( ) const

Get the last Location of this Feature

Returns
- Last Location of this Feature

Definition at line 66 of file Feature.cpp.

double Feature::getLastX ( ) const

Get the x coordinate of the last Location of this Feature

Returns
- x coordinate of the last Location of this Feature

Definition at line 136 of file Feature.cpp.

double Feature::getLastY ( ) const

Get the y coordinate of the last Location of this Feature

Returns
- y coordinate of the last Location of this Feature

Definition at line 141 of file Feature.cpp.

double Feature::getLastZ ( ) const

Get the z coordinate of the last Location of this Feature

Returns
- z coordinate of the last Location of this Feature

Definition at line 146 of file Feature.cpp.

Feature::Location Feature::getNextToLastLocation ( ) const

Get the next to last Location of this Feature

Returns
- Next to last Location of this Feature

Definition at line 81 of file Feature.cpp.

Feature::Location Feature::getNToLastLocation ( int  frames_to_last) const

Get the Location of this Feature N frames before the last Location

Parameters
frames_to_last- Number of frames before the last frame where we want the Location from
Returns
- Location of this Feature in the last minus N frame

Definition at line 101 of file Feature.cpp.

const Feature::Trajectory & Feature::getTrajectory ( ) const

Get the Trajectory of this Feature

Returns
- Trajectory of this Feature

Definition at line 116 of file Feature.cpp.

Feature::LocationPair Feature::getTwoLastLocations ( ) const

Get the two last Locations (last and next to last) of this Feature

Returns
- Two last Location of this Feature

Definition at line 96 of file Feature.cpp.

void Feature::setFeatureBirthday ( int  feature_birthday)

Set this Feature's Birthday (frame number)

Parameters
feature_birthday- Birthday of this Feature as the frame when it was initially detected

Definition at line 151 of file Feature.cpp.

Member Data Documentation

int omip::Feature::_birthday
protected

Definition at line 205 of file Feature.h.

Feature::Id Feature::_feature_id_generator = 1
staticprotected

Definition at line 193 of file Feature.h.

Location omip::Feature::_first_location
protected

Definition at line 202 of file Feature.h.

Id omip::Feature::_id
protected

Definition at line 196 of file Feature.h.

Trajectory omip::Feature::_trajectory
protected

Definition at line 199 of file Feature.h.


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


omip_common
Author(s): Roberto Martín-Martín
autogenerated on Mon Jun 10 2019 14:06:05