use of org.vcell.imagej.common.gui.ColorPlot in project vcell by virtualcell.
the class PlotROIStats method run.
@Override
public void run() {
Plot plot = new ColorPlot("ROI Mean Intensity", "Time", "Mean Intensity");
StringBuilder legendLabels = new StringBuilder();
for (RandomAccessibleInterval<T> data : datasetROIsMap.keySet()) {
if (data instanceof Dataset) {
legendLabels.append(((Dataset) data).getName());
legendLabels.append(": ");
}
List<Overlay> overlays = datasetROIsMap.get(data);
for (int i = 0; i < overlays.size(); i++) {
Overlay overlay = overlays.get(i);
RandomAccessibleInterval<T> cropped = crop(data, overlay);
Pair<double[], double[]> xyPair = (Pair<double[], double[]>) ops.run("imageStatsForPlotting", ImageStatsForPlotting.MEAN, cropped);
plot.addPoints(xyPair.getA(), xyPair.getB(), Plot.LINE);
legendLabels.append("ROI ");
legendLabels.append(i + 1);
legendLabels.append("\n");
}
}
plot.addLegend(legendLabels.toString());
plot.show();
}
use of org.vcell.imagej.common.gui.ColorPlot in project vcell by virtualcell.
the class PlotImageStats method run.
@Override
public void run() {
Plot plot = new ColorPlot("Frame mean intensity", "Time", "Mean intensity");
StringBuilder legendLabels = new StringBuilder();
for (int i = 0; i < datasets.size(); i++) {
RandomAccessibleInterval<T> data = datasets.get(i);
if (data instanceof Dataset) {
legendLabels.append(((Dataset) data).getName());
legendLabels.append(": ");
}
Pair<double[], double[]> xyPair = (Pair<double[], double[]>) ops.run("imageStatsForPlotting", ImageStatsForPlotting.MEAN, data, mask);
plot.addPoints(xyPair.getA(), xyPair.getB(), Plot.LINE);
legendLabels.append("ROI ");
legendLabels.append(i + 1);
legendLabels.append("\n");
}
plot.addLegend(legendLabels.toString());
plot.show();
}
use of org.vcell.imagej.common.gui.ColorPlot in project vcell by virtualcell.
the class PlotCellRegionStats method run.
@Override
public void run() {
Plot plot = new ColorPlot("Cell region mean intensity", "Time", "Mean intensity");
StringBuilder legendLabels = new StringBuilder();
for (int i = 0; i < datasets.size(); i++) {
RandomAccessibleInterval<T> data = datasets.get(i);
if (data instanceof Dataset) {
legendLabels.append(((Dataset) data).getName());
legendLabels.append(": ");
}
RandomAccessibleInterval<T> cropped = ops.transform().crop(data, mask);
displayService.createDisplay(cropped);
}
}