io.github.mianalysis.mia.process.analysis.TrackMeanCentroidCalculator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mia-algorithms Show documentation
Show all versions of mia-algorithms Show documentation
ModularImageAnalysis (MIA) is an ImageJ plugin which provides a modular framework for assembling image and object analysis workflows. Detected objects can be transformed, filtered, measured and related. Analysis workflows are batch-enabled by default, allowing easy processing of high-content datasets.
// package io.github.mianalysis.mia.process.analysis;
// import io.github.mianalysis.mia.object.coordinates.Point;
// import io.github.mianalysis.mia.object.coordinates.tracks.Timepoint;
// import io.github.mianalysis.mia.object.coordinates.tracks.Track;
// import io.github.mianalysis.mia.object.coordinates.tracks.TrackCollection;
// import io.github.mianalysis.mia.process.math.CumStat;
// public class TrackMeanCentroidCalculator {
// public Point getMeanPoint(TrackCollection trackCollection, int frame) {
// CumStat[] cs = new CumStat[3];
// for (int i=0;i<3;i++) cs[i] = new CumStat();
// for (Track track:trackCollection.values()) {
// if (track.hasFrame(frame)) {
// cs[0].addMeasure(track.get(frame).getX());
// cs[1].addMeasure(track.get(frame).getY());
// cs[2].addMeasure(track.get(frame).getZ());
// }
// }
// return new Timepoint(cs[0].getMean(),cs[1].getMean(),cs[2].getMean(),frame);
// }
// }