Particle Identification and Tracking
|
Class to hold sets of Hash_shelf. More...
#include <hash_case.h>
Public Member Functions | |
Hash_shelf * | return_shelf (int n) const |
retrun a given shelf More... | |
hash_case () | |
Constructor, does no work. More... | |
void | init (Master_box &mb, const utilities::Tuplef &dims, float ppb, int frames) |
Initializer that actually does the work. More... | |
void | init (utilities::Wrapper_in &w_in, utilities::Filter &filt, float ppb) |
Initializer that takes in a wrapper rather than a master_box. More... | |
void | print () const |
print out a sensible representation of the data More... | |
void | pass_fun_to_part (void(particle::*fun)()) |
Passes functions all the way down the pyramid, this one for void, argument-less functions, non-const. More... | |
void | pass_fun_to_part (void(particle::*fun)() const) const |
Passes functions all the way down the pyramid, this one for void, argument-less functions, const. More... | |
void | pass_fun_to_shelf (void(Hash_shelf::*fun)()) |
Passes functions to the shelves in the case, this one for void, argument-less functions. More... | |
void | pass_fun_to_shelf (void(Hash_shelf::*fun)() const) const |
Passes functions to the shelves in the case, this one for void, argument-less functions. More... | |
unsigned int | get_num_frames () const |
returns the number of frames in the hash case More... | |
void | output_to_wrapper (utilities::Wrapper_out &) const |
outputs the hash case to the Wrapper that is passed in More... | |
void | compute_corr (tracking::Corr &) const |
passes a Corr object down the pyramid More... | |
unsigned int | compute_corr (tracking::Corr_case &) const |
Passes a Corr_case down the pyramid. More... | |
void | compute_accum (Accumulator &in) const |
Passes an Accumulator object down the pyramid. More... | |
void | compute_accum (utilities::Accum_case &) const |
Passes an Accumulator_case down the pyramid, one accumulator per hash_shelf. More... | |
void | fill_in_neighborhood () |
fills in the neighborhoods for all of the particles More... | |
int | get_avg_dtime () const |
Gets the average dtime between the shelves. More... | |
float | get_avg_temp () const |
Gets the average temperature of all the planes in the case. More... | |
~hash_case () | |
Destructor. More... | |
void | init (float box_side_len, const utilities::Wrapper_in &wrapper, Track_shelf &tracks, utilities::Filter &filt, int min_trk_length) |
Initialization function for related to tracking. More... | |
void | link (float max_range, Track_shelf &tracks) |
Links particles in to tracks. More... | |
void | compute_mean_disp () |
Compute mean forward displacement for each shelf. More... | |
Protected Member Functions | |
void | fill_pos_link_next (std::list< particle_track * > *tlist, std::vector< Hash_shelf * >::iterator in_it, float max_disp) |
Given a list of particles fills in the n_pos_link lists and appends the appropriate values to the p_pos_link lists when those particles are. More... | |
Protected Attributes | |
std::vector< Hash_shelf * > | h_case_ |
vector of pointers to shelves More... | |
bool | inited_ |
Bool if the Hash_case has been initialized. More... | |
bool | own_particles_ |
Bool if the child hash shelves owns the particles. More... | |
Class to hold sets of Hash_shelf.
This is used as a structure to organize the hash tables by time frame.
hash_case::hash_case | ( | ) |
Constructor, does no work.
hash_case::~hash_case | ( | ) |
Destructor.
References tracking::particle_base::clear_wrapper_in(), h_case_, and own_particles_.
void hash_case::compute_accum | ( | Accumulator & | in) | const |
void hash_case::compute_accum | ( | utilities::Accum_case & | in) | const |
Passes an Accumulator_case down the pyramid, one accumulator per hash_shelf.
References compute_accum(), h_case_, and utilities::Accum_case::size().
void hash_case::compute_corr | ( | tracking::Corr & | in) | const |
unsigned int hash_case::compute_corr | ( | tracking::Corr_case & | in) | const |
Passes a Corr_case down the pyramid.
Returns the number of frames per calculation
References compute_corr(), h_case_, and tracking::Corr_case::size().
void hash_case::compute_mean_disp | ( | ) |
void hash_case::fill_in_neighborhood | ( | ) |
fills in the neighborhoods for all of the particles
References h_case_.
|
protected |
Given a list of particles fills in the n_pos_link lists and appends the appropriate values to the p_pos_link lists when those particles are.
tlist | list of particles to find the possible next particles of |
in_it | iterator to the vector h_case that points to the Hash_shelf to look for possible next particles in |
max_disp | the maximum allowed displacement when looking for possible particles |
References tracking::hash_box::box_to_list(), tracking::hash_box::clear(), tracking::particle_base::distancesq(), lt_pair_tac(), tracking::particle_track::n_pos_link, and tracking::particle_track::p_pos_link.
Referenced by link().
int hash_case::get_avg_dtime | ( | ) | const |
Gets the average dtime between the shelves.
References utilities::Md_store::get_value(), and h_case_.
Referenced by main().
float hash_case::get_avg_temp | ( | ) | const |
Gets the average temperature of all the planes in the case.
References utilities::Md_store::get_value(), and h_case_.
Referenced by main().
|
inline |
returns the number of frames in the hash case
References h_case_.
Referenced by tracking::Track_shelf::init(), and main().
void hash_case::init | ( | Master_box & | mb, |
const utilities::Tuplef & | dims, | ||
float | ppb, | ||
int | frames | ||
) |
Initializer that actually does the work.
DO NOT USE THIS FOR NEW CODE, IT IS GOING AWAY
References utilities::D_FRAME, tracking::Master_box::get_Md_store(), tracking::Master_box::get_particle(), tracking::particle_track::get_value(), h_case_, inited_, own_particles_, tracking::particle_track::set_shelf(), and tracking::Master_box::size().
Referenced by main().
void hash_case::init | ( | utilities::Wrapper_in & | w_in, |
utilities::Filter & | filt, | ||
float | ppb | ||
) |
Initializer that takes in a wrapper rather than a master_box.
References utilities::Wrapper_in::get_dims(), utilities::Wrapper_in::get_Md_store(), utilities::Wrapper_in::get_num_entries(), utilities::Wrapper_in::get_num_frames(), h_case_, inited_, tracking::particle_base::intialize_wrapper_in(), tracking::Hash_shelf::md_store_, own_particles_, tracking::Hash_shelf::push(), tracking::particle_track::set_shelf(), and utilities::Filter::set_wrapper().
void hash_case::init | ( | float | box_side_len, |
const utilities::Wrapper_in & | wrapper, | ||
Track_shelf & | tracks, | ||
utilities::Filter & | filt, | ||
int | min_trk_length | ||
) |
Initialization function for related to tracking.
References tracking::Track_shelf::add_track(), compute_mean_disp(), utilities::D_NEXT_INDX, utilities::D_PREV_INDX, utilities::D_TRACKID, utilities::D_XPOS, utilities::D_YPOS, utilities::D_ZPOS, utilities::Wrapper_in::get_data_types(), utilities::Wrapper_in::get_dims(), utilities::Wrapper_in::get_Md_store(), utilities::Wrapper_in::get_num_entries(), utilities::Wrapper_in::get_num_frames(), utilities::Wrapper_in::get_value(), h_case_, inited_, tracking::particle_base::intialize_wrapper_in(), own_particles_, tracking::Hash_shelf::push(), tracking::Track_box::push_back(), and tracking::particle_track::set_shelf().
void hash_case::link | ( | float | max_range, |
Track_shelf & | tracks | ||
) |
Links particles in to tracks.
max_range | [in] the maximum displacement a particle is expected to have in a time step |
tracks | [out] a Track_shelf object passed in by reference. |
References tracking::Track_shelf::add_new_track(), fill_pos_link_next(), h_case_, and tracking::track_list::link_next().
Referenced by main().
void hash_case::output_to_wrapper | ( | utilities::Wrapper_out & | wrapper) | const |
outputs the hash case to the Wrapper that is passed in
References utilities::Wrapper_out::add_meta_data_root(), and h_case_.
Referenced by main().
void hash_case::pass_fun_to_part | ( | void(particle::*)() | fun) |
void hash_case::pass_fun_to_part | ( | void(particle::*)() const | fun) | const |
Passes functions all the way down the pyramid, this one for void, argument-less functions, const.
References h_case_.
void hash_case::pass_fun_to_shelf | ( | void(Hash_shelf::*)() | fun) |
void hash_case::pass_fun_to_shelf | ( | void(Hash_shelf::*)() const | fun) | const |
Passes functions to the shelves in the case, this one for void, argument-less functions.
References h_case_.
void hash_case::print | ( | ) | const |
|
inline |
|
protected |
vector of pointers to shelves
Referenced by compute_accum(), compute_corr(), compute_mean_disp(), fill_in_neighborhood(), get_avg_dtime(), get_avg_temp(), get_num_frames(), init(), link(), output_to_wrapper(), pass_fun_to_part(), pass_fun_to_shelf(), print(), return_shelf(), and ~hash_case().
|
protected |
Bool if the Hash_case has been initialized.
Referenced by init().
|
protected |
Bool if the child hash shelves owns the particles.
If so, we need to clean up the wrapper static variable in the particle classes
Referenced by init(), and ~hash_case().