Particle Identification and Tracking
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
tracking::Track_box Class Reference

Box class for dealing with tracks. More...

#include <track_box.h>

+ Collaboration diagram for tracking::Track_box:

Public Member Functions

const particle_trackat (int n) const
 retruns the nth particle of the track. More...
 
particle_trackget_first () const
 Returns a pointer to the first particle in the track. More...
 
particle_trackget_last () const
 Returns a pointer to the last particle in the track. More...
 
void extract_raw_pos (std::vector< float > &output, std::vector< unsigned int > &dims) const
 Extracts the raw posistion along the track. More...
 
void extract_corrected_pos (std::vector< float > &output, std::vector< unsigned int > &dims) const
 gets the posistion corrected for drift More...
 
void extract_raw_disp (std::vector< float > &output, std::vector< unsigned int > &dims) const
 Extracts the raw frame to frame displanement along the track. More...
 
void extract_corrected_disp (std::vector< float > &output, std::vector< unsigned int > &dims) const
 gets the displacement corrected for drift More...
 
 Track_box (particle_track *first)
 Constructor. More...
 
 Track_box ()
 
virtual void print ()
 Prints outs some representation of the track. More...
 
void push_back (particle_track *next)
 adds the particle next the end of the track More...
 
unsigned int get_id () const
 Return the track id. More...
 
virtual ~Track_box ()
 Destructor. More...
 
int get_length () const
 Returns the length of the track. More...
 
void output_to_wrapper (utilities::Wrapper_out &wrapper) const
 Outputs the particles in a track-centric format. More...
 
void split_to_parts (Track_shelf &shelf)
 splits the track into segments that correspond to a single particle sliced in z. More...
 
void average_cord (utilities::Tuple< float, 3 > &pos, float &I) const
 returns the intensity weighted average position used for link3D. More...
 
void set_track_id (unsigned int in)
 Sets the track_id. More...
 

Protected Member Functions

particle_trackat (int n)
 non-const version of at() More...
 
Track_boxsplit_track (int indx)
 Splits the track at the given index and returns a pointer to the back half of the track. More...
 
void trim_track (int ind_start, int length)
 Trims the track from the ind_start and keeps the next length particles. More...
 

Protected Attributes

particle_trackt_first_
 Pointer to first particle in track. More...
 
particle_trackt_last_
 
int length_
 length of path More...
 
unsigned int id_
 unique ID of the track More...
 

Static Protected Attributes

static int running_count_ = 0
 the number of tracks identified used for unique id's More...
 

Detailed Description

Box class for dealing with tracks.

Essentially roling my own linked list class.

Constructor & Destructor Documentation

Track_box::Track_box ( particle_track first)
Track_box::Track_box ( )

Referenced by split_track().

Track_box::~Track_box ( )
virtual

Destructor.

References tracking::particle_track::get_next(), and t_first_.

Member Function Documentation

const particle_track * Track_box::at ( int  n) const

retruns the nth particle of the track.

returns null if n > length

References length_, tracking::particle_track::step_backwards(), tracking::particle_track::step_forwards(), t_first_, and t_last_.

Referenced by split_track(), and trim_track().

particle_track * Track_box::at ( int  n)
protected
void Track_box::average_cord ( utilities::Tuple< float, 3 > &  pos,
float &  I 
) const

returns the intensity weighted average position used for link3D.

This really should be sub-classed

References utilities::D_I, utilities::D_ZPOS, tracking::particle_track::get_value(), tracking::particle_track::next_, and t_first_.

Referenced by utilities::Wrapper_o_hdf::set_all_values().

void Track_box::extract_corrected_disp ( std::vector< float > &  output,
std::vector< unsigned int > &  dims 
) const

gets the displacement corrected for drift

References tracking::particle_track::get_corrected_disp(), tracking::particle_track::get_next(), length_, and t_first_.

void Track_box::extract_corrected_pos ( std::vector< float > &  output,
std::vector< unsigned int > &  dims 
) const
void Track_box::extract_raw_disp ( std::vector< float > &  output,
std::vector< unsigned int > &  dims 
) const

Extracts the raw frame to frame displanement along the track.

References tracking::particle_base::get_disp(), tracking::particle_track::get_next(), length_, and t_first_.

void Track_box::extract_raw_pos ( std::vector< float > &  output,
std::vector< unsigned int > &  dims 
) const

Extracts the raw posistion along the track.

References tracking::particle_track::get_next(), tracking::particle_base::get_position(), length_, and t_first_.

particle_track* tracking::Track_box::get_first ( ) const
inline

Returns a pointer to the first particle in the track.

References t_first_.

Referenced by tracking::Track_shelf::output_to_wrapper().

unsigned int tracking::Track_box::get_id ( ) const
inline
particle_track* tracking::Track_box::get_last ( ) const
inline

Returns a pointer to the last particle in the track.

References t_last_.

int tracking::Track_box::get_length ( ) const
inline

Returns the length of the track.

References length_.

Referenced by tracking::Track_shelf::output_to_wrapper().

void Track_box::output_to_wrapper ( utilities::Wrapper_out wrapper) const
void Track_box::print ( )
virtual

Prints outs some representation of the track.

References id_, length_, tracking::particle_track::print_t(), and t_first_.

Referenced by main().

void Track_box::push_back ( particle_track next)
void tracking::Track_box::set_track_id ( unsigned int  in)
inline

Sets the track_id.

References id_.

void Track_box::split_to_parts ( Track_shelf shelf)

splits the track into segments that correspond to a single particle sliced in z.

The resulting new tracks are stored in the self

References tracking::Track_shelf::add_track(), utilities::D_I, tracking::particle_track::get_next(), tracking::particle_track::get_value(), length_, split_track(), t_first_, and trim_track().

Referenced by main().

Track_box * Track_box::split_track ( int  indx)
protected

Splits the track at the given index and returns a pointer to the back half of the track.

References at(), tracking::particle_track::clear_next(), tracking::particle_track::clear_prev(), tracking::particle_track::get_prev(), length_, t_first_, t_last_, and Track_box().

Referenced by split_to_parts().

void Track_box::trim_track ( int  ind_start,
int  length 
)
protected

Trims the track from the ind_start and keeps the next length particles.

Parameters
ind_startfirst particle to keep
lengthnumber of particles to keep

References at(), tracking::particle_track::clear_data_backward(), tracking::particle_track::clear_data_forward(), length_, tracking::particle_track::step_forwards(), t_first_, and t_last_.

Referenced by split_to_parts().

Member Data Documentation

unsigned int tracking::Track_box::id_
protected

unique ID of the track

Referenced by get_id(), output_to_wrapper(), print(), set_track_id(), and Track_box().

int tracking::Track_box::length_
protected
int Track_box::running_count_ = 0
staticprotected

the number of tracks identified used for unique id's

Referenced by Track_box().

particle_track* tracking::Track_box::t_first_
protected
particle_track* tracking::Track_box::t_last_
protected

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