Particle Identification and Tracking
|
Box class for dealing with tracks. More...
#include <track_box.h>
Public Member Functions | |
const particle_track * | at (int n) const |
retruns the nth particle of the track. More... | |
particle_track * | get_first () const |
Returns a pointer to the first particle in the track. More... | |
particle_track * | get_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_track * | at (int n) |
non-const version of at() More... | |
Track_box * | split_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_track * | t_first_ |
Pointer to first particle in track. More... | |
particle_track * | t_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... | |
Box class for dealing with tracks.
Essentially roling my own linked list class.
Track_box::Track_box | ( | particle_track * | first) |
Constructor.
References id_, length_, tracking::particle_track::reset_track(), running_count_, t_first_, and t_last_.
Track_box::Track_box | ( | ) |
Referenced by split_track().
|
virtual |
Destructor.
References tracking::particle_track::get_next(), and t_first_.
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().
|
protected |
non-const version of at()
References length_, tracking::particle_track::step_backwards(), tracking::particle_track::step_forwards(), t_first_, and t_last_.
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 |
gets the posistion corrected for drift
References tracking::particle_track::get_corrected_pos(), tracking::particle_track::get_next(), length_, and t_first_.
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_.
|
inline |
Returns a pointer to the first particle in the track.
References t_first_.
Referenced by tracking::Track_shelf::output_to_wrapper().
|
inline |
Return the track id.
References id_.
Referenced by tracking::particle_track::get_track_id(), tracking::particle_track::get_value(), and tracking::Track_shelf::output_to_wrapper().
|
inline |
Returns a pointer to the last particle in the track.
References t_last_.
|
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 |
Outputs the particles in a track-centric format.
References utilities::Wrapper_out::add_meta_data(), utilities::Wrapper_out::close_group(), tracking::particle_base::get_frame(), tracking::particle_track::get_next(), id_, length_, utilities::Wrapper_out::open_group(), utilities::Wrapper_out::set_all_values(), and t_first_.
|
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) |
adds the particle next the end of the track
References length_, tracking::particle_track::reset_track(), tracking::particle_track::set_next(), tracking::particle_track::set_prev(), t_first_, and t_last_.
Referenced by tracking::hash_case::init(), tracking::Track_shelf::init(), and main().
|
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().
|
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().
|
protected |
Trims the track from the ind_start and keeps the next length particles.
ind_start | first particle to keep |
length | number 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().
|
protected |
unique ID of the track
Referenced by get_id(), output_to_wrapper(), print(), set_track_id(), and Track_box().
|
protected |
length of path
Referenced by at(), extract_corrected_disp(), extract_corrected_pos(), extract_raw_disp(), extract_raw_pos(), get_length(), output_to_wrapper(), print(), push_back(), split_to_parts(), split_track(), Track_box(), and trim_track().
|
staticprotected |
the number of tracks identified used for unique id's
Referenced by Track_box().
|
protected |
Pointer to first particle in track.
Referenced by at(), average_cord(), extract_corrected_disp(), extract_corrected_pos(), extract_raw_disp(), extract_raw_pos(), get_first(), output_to_wrapper(), print(), push_back(), split_to_parts(), split_track(), Track_box(), trim_track(), and ~Track_box().
|
protected |
Referenced by at(), get_last(), push_back(), split_track(), Track_box(), and trim_track().