io.github.mianalysis.mia.process.analysis.SpotIntensity Maven / Gradle / Ivy
package io.github.mianalysis.mia.process.analysis;
//No need to use cumulative statistics, as this doesn't really make sense for a single spot.
import java.util.ArrayList;
import org.apache.commons.math3.stat.descriptive.moment.Mean;
import org.apache.commons.math3.stat.descriptive.moment.StandardDeviation;
import org.apache.commons.math3.stat.descriptive.rank.Max;
import org.apache.commons.math3.stat.descriptive.rank.Min;
import org.apache.commons.math3.stat.descriptive.summary.Sum;
import ij.process.ImageProcessor;
import io.github.mianalysis.mia.process.voxel.MidpointCircle;
public class SpotIntensity {
private double[] int_arr;
public SpotIntensity(ImageProcessor ipr, double x_in, double y_in, double r_in) {
int im_w = ipr.getWidth();
int im_h = ipr.getHeight();
int x = (int) Math.round(x_in);
int y = (int) Math.round(y_in);
int r = (int) Math.round(r_in);
MidpointCircle mpc = new MidpointCircle(r);
int[] xx = mpc.getXCircleFill();
int[] yy = mpc.getYCircleFill();
ArrayList temp_al = new ArrayList();
for (int j=0;j=0 & x+xx[j]=0 & y+yy[j]