io.github.mianalysis.mia.object.Measurement Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mia-core Show documentation
Show all versions of mia-core 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.object;
import io.github.mianalysis.mia.object.units.SpatialUnit;
import io.github.mianalysis.mia.object.units.TemporalUnit;
/**
* Measurement that holds a single value for an object
*/
public class Measurement {
private final String name;
private double value = Double.NaN;
// CONSTRUCTOR
public Measurement(String name) {
name = SpatialUnit.replace(name);
name = TemporalUnit.replace(name);
this.name = name;
}
public Measurement(String name, double value) {
name = SpatialUnit.replace(name);
name = TemporalUnit.replace(name);
this.name = name;
this.value = value;
}
public Measurement duplicate() {
return new Measurement(getName(), getValue());
}
// GETTERS AND SETTERS
public String getName() {
return name;
}
public double getValue() {
return value;
}
public void setValue(double value) {
this.value = value;
}
}