public class TrackMapAnalyser extends Object
MapTracker
.
All methods in this class are safe either for empty tracks returned by MapTracker or trackMaxima. Tracking point coordinates may contain invalid values (negative).
Modifier and Type | Field and Description |
---|---|
static int |
WITH_SELFCROSSING
Allow detection common points in backward and forward tracks generated for the same starting
point.
|
static int |
WITHOUT_SELFCROSSING
Disallow detection common points in backward and forward tracks generated for the same
starting point.
|
Constructor and Description |
---|
TrackMapAnalyser()
Instantiates a new track map analyser.
|
Modifier and Type | Method and Description |
---|---|
Polygon |
getCommonPoints()
getCommonPoints.
|
List<Pair<Point,Point>> |
getIntersectionParents(List<Polygon> tracks,
int mode)
Find common points among polygons.
|
Polygon |
getIntersectionPoints(List<Polygon> tracks)
Find common points among polygons.
|
Polygon |
getIntersectionPoints(Polygon p1,
Polygon p2)
Check if p1 and p2 have common vertexes.
|
TrackCollection |
getTrackCollection()
getTrackCollection.
|
static Polygon |
point2i2Polygon(List<Point> list)
Convert list of Points to list of Polygons.
|
static List<Point> |
polygon2Point2i(List<Polygon> list)
Convert list of Polygons to list of Points.
|
List<Pair<Point,Point>> |
removeSelfRepeatings(List<Pair<Point,Point>> intersections,
List<Polygon> tracks)
Removes the self repeatings.
|
void |
trackMaxima(STmap mapCell,
double drop,
MaximaFinder maximaFinder)
Track maxima across motility map as long as they fulfil criterion of amplitude.
|
public static final int WITH_SELFCROSSING
MapTracker.includeFirst
,
Constant Field Valuespublic static final int WITHOUT_SELFCROSSING
MapTracker.includeFirst
,
Constant Field Valuespublic TrackMapAnalyser()
INCLUDE_INITIAL
public TrackCollection getTrackCollection()
public void trackMaxima(STmap mapCell, double drop, MaximaFinder maximaFinder)
Return (as internal field TrackCollection
) list of points tracked from every maximum
point as long as they meet criterion. Maximum point can be included in this list depending on
setting of MapTracker.includeFirst
flag. First
points
in tracks are initial points. Forward track is sorted within increasing frames from starting
point, backward according to decreasing frames.
mapCell
- holds all maps generated and saved by QuimPdrop
- the value (in x/100) while velocity remains above of the peak speed. E.g for
drop=1 all tracked points are considered (along positive motility), drop=0.5 stands
for points that are above 0.5*peakval, where peakval is the value of found maximum.
Drop < 0 disables this feature.maximaFinder
- properly initialized object that holds maxima of motility map. All maxima
are tracked.public Polygon getCommonPoints()
public Polygon getIntersectionPoints(List<Polygon> tracks)
Check whether there are common points among polygons stored in List.
Warning
Polygon of size 0 may contain x,y, arrays of size 4, only number of points is 0
tracks
- List of polygons.public Polygon getIntersectionPoints(Polygon p1, Polygon p2)
p1
- Polygonp2
- Polygonpublic List<Pair<Point,Point>> getIntersectionParents(List<Polygon> tracks, int mode)
This method provides also parents of every common point. Parents are given as indexes of polygons in input list that have common vertex.
tracks
- List of polygons.mode
- WITHOUT_SELFCROSSING | WITH_SELFCROSSINGpublic List<Pair<Point,Point>> removeSelfRepeatings(List<Pair<Point,Point>> intersections, List<Polygon> tracks)
intersections
- the intersectionstracks
- the trackspublic static List<Point> polygon2Point2i(List<Polygon> list)
The difference is that for polygons points are kept in 1d arrays, whereas for Point2i they are as separate points that allows object comparison.
list
- List of polygons to convertpublic static Polygon point2i2Polygon(List<Point> list)
The difference is that for polygons points are kept in 1d arrays, whereas for Point2i they are as separate points that allows object comparison.
list
- List of points to convertCopyright © 2002–2019 Department of Computer Science, Warwick University. All rights reserved.