io.github.mianalysis.mia.process.analysis.TotalPathLengthCalculator 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 java.util.TreeMap;
public class TotalPathLengthCalculator implements SummaryCalculator {
@Override
public double calculate(double[] x, double[] y, double[] z, int[] f) {
TreeMap steps = new InstantaneousStepSizeCalculator().calculate(x, y, z, f);
double totalPathLength = 0;
for (double value:steps.values()) totalPathLength += value;
return totalPathLength;
}
}