Particle Identification and Tracking
track_shelf.h
Go to the documentation of this file.
1 //Copyright 2008-2010 Thomas A Caswell
2 //tcaswell@uchicago.edu
3 //http://jfi.uchicago.edu/~tcaswell
4 //
5 //This program is free software; you can redistribute it and/or modify
6 //it under the terms of the GNU General Public License as published by
7 //the Free Software Foundation; either version 3 of the License, or (at
8 //your option) any later version.
9 //
10 //This program is distributed in the hope that it will be useful, but
11 //WITHOUT ANY WARRANTY; without even the implied warranty of
12 //MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 //General Public License for more details.
14 //
15 //You should have received a copy of the GNU General Public License
16 //along with this program; if not, see <http://www.gnu.org/licenses>.
17 //
18 //Additional permission under GNU GPL version 3 section 7
19 //
20 //If you modify this Program, or any covered work, by linking or
21 //combining it with MATLAB (or a modified version of that library),
22 //containing parts covered by the terms of MATLAB User License, the
23 //licensors of this Program grant you additional permission to convey
24 //the resulting work.
25 #ifndef TRACK_SHELF
26 #define TRACK_SHELF
27 
28 #include <list>
29 #include <vector>
30 #include "tuple.h"
31 //forward declare histogram
32 namespace utilities{
33 class Histogram;
34 class Cell;
35 class Counted_vector;
36 class Generic_wrapper;
37 class Wrapper_out;
38 class Md_store;
39 
40 
41 }
42 
43 namespace tracking{
44 //forward declare classes
45 class Track_box;
46 class particle_track;
47 class Master_box;
48 class Trk_accumulator;
49 class hash_case;
50 
56 
57 public:
63  void add_new_track(particle_track* first_part);
64 
69  void add_track(Track_box * track);
70 
78  void remove_short_tracks(int min_length);
79 
83  void print();
84 
88  void set_shelf();
89 
94 
95 
101  void msd(std::vector<double> & msd_vec,std::vector<int> & entry_count)const;
102 
103 
109  void msd_corrected(utilities::Counted_vector & msd)const;
110 
118  utilities::Counted_vector & msd_sq)const;
119 
120 
121  /*
122  Computes the average fourier transform of the tracks
123  */
124  //void track_fft();
125 
137  void disp_sq_hist(int time_step,
139  )const;
140 
144  void set_raw_disp_to_cell(utilities::Cell & output) const;
145 
149  void set_corrected_disp_to_cell(utilities::Cell & output) const;
150 
154  unsigned int get_track_count() const{
155  return track_count_;
156 
157  }
158 
162  void pass_fun_to_track(void(Track_box::*fun)()const)const;
163 
170  void output_to_wrapper(utilities::Wrapper_out & wrapper) const;
171 
172 
173 
183  const utilities::Md_store * md_store) const;
184 
185 
191  const utilities::Tuple<float,3> & scale_t,
192  const utilities::Tuple<float,3> & dim) const;
193 
194 
199  void split_to_parts(Track_shelf & out_put_shelf);
200 
201 
206  void renumber();
207 
211  void init(Master_box & mb);
212 
213 
214 
218  void init(hash_case & hc);
219 
223  void compute_corrected_TA(Trk_accumulator & ta)const;
224 
230  void compute_corrected_TA_ncuts(Trk_accumulator & ta,int min_neighbors,int max_neighbors)const;
231 
238  Track_box * get_track(unsigned int track_id) const ;
239 
240 
243 
245  ~Track_shelf();
246 protected:
253  std::list<Track_box*> tracks_;
254 
258  void remove_track_internal_( std::list<Track_box*>::iterator it);
259 
263  unsigned int track_count_;
264 
265 
266 };
267 }
268 
269 
270 #endif