Login  Register

Re: what is the algorithm of Mtrack2?

Posted by Nico Stuurman-4 on Aug 19, 2010; 4:39am
URL: http://imagej.273.s1.nabble.com/what-is-the-algorithm-of-Mtrack2-tp3686946p3686951.html

> I read your program: open the
> first frame, and the first particle, then loop all the frame to get  
> this
> track, and then the second particle,until all the particle. after  
> the second
> frame····until all the frame . Is it right?

No, it first loops through all the frames and executes the ImageJ  
particle Analyzer, asking it for Centroid analysis only.  IT then  
stores the centroids for all particles in the ArrayList  
"theParticles".  It subsequently iterates through this list and tries  
to assemble the particles found in tracks (which are stores as an  
ArrayList  of an ArrayList of particles).

>  I am confused by boolean:flag,

flag - indicates that this particle could also be part of another  
track, i.e., it is flagged as dubious

> inTrack,

inTrack: member variable of class "particle", indicates that this  
particle is assigned to a track

> searchOn,foundOne,

Those flags are used for bookkeeping:

foundOne: we already found a particle within the search radius.  If  
there is another one closer by, discard the one found previously.

searchOn: flag to indicate whether or not the search for other  
particles will continue.


> i donot know the meaning. if one particle
> dispear, how the program work?

Looks like the track will stop in that case.  However, when the  
particle re-appears in a following frame, it will start a new track.

> And the following note:
> / this particle is already in another track but could have been part  
> of this
> one
>                                                        // We have a  
> number
> of choices here:
>                                                        // 1. Sort  
> out to
> which track this particle really belongs (but how?)
>                                                        // 2. Stop this
> track
>                                                        // 3. Stop this
> track, and also delete the remainder of the other one
>                                                        // 4. Stop this
> track and flag this particle:

4.

Best,

Nico