public class PeakShape extends AbstractJsonConvertibleRecord
Constructor and Description |
---|
PeakShape(double[] x,
double[] y) |
PeakShape(com.fasterxml.jackson.core.JsonParser jParser) |
Modifier and Type | Method and Description |
---|---|
double |
area() |
double |
circularity() |
protected void |
createIOMaps()
Must be implemented in subclasses to define how fields, objects, arrays
should be saved based on the Jackson streaming API.
|
static Peak |
createPeak(double[] xr,
double[] yr) |
double |
perimeter() |
double |
radius() |
<T> net.imglib2.IterableInterval<T> |
sample(double spotXCenter,
double spotYCenter,
net.imglib2.RandomAccessibleInterval<T> img,
double xScale,
double yScale) |
<T> net.imglib2.IterableInterval<T> |
sample(Peak peak,
net.imagej.ImgPlus<T> img) |
void |
scale(double alpha) |
double[] |
toPolygonX(double calibration,
double xCorner,
double xCenter,
double magnification)
Returns a new
int array containing the X pixel coordinates to
which to paint this polygon. |
double[] |
toPolygonY(double calibration,
double yCorner,
double yCenter,
double magnification)
Returns a new
int array containing the Y pixel coordinates to
which to paint this polygon. |
dumpJSON, fromJSON, getJsonGenerator, getJsonParser, setJsonField, setShowWarnings, toJSON
public PeakShape(double[] x, double[] y)
public PeakShape(com.fasterxml.jackson.core.JsonParser jParser) throws java.io.IOException
java.io.IOException
public double[] toPolygonX(double calibration, double xCorner, double xCenter, double magnification)
int
array containing the X pixel coordinates to
which to paint this polygon.calibration
- the pixel size in X, to convert physical coordinates to
pixel coordinates.xCorner
- the top-left X corner of the view in the image to paint.xCenter
- the x coordinate of the Peak center.magnification
- the magnification of the view.double
array.public double[] toPolygonY(double calibration, double yCorner, double yCenter, double magnification)
int
array containing the Y pixel coordinates to
which to paint this polygon.calibration
- the pixel size in Y, to convert physical coordinates to
pixel coordinates.yCorner
- the top-left Y corner of the view in the image to paint.yCenter
- the y coordinate of the Peak center.magnification
- the magnification of the view.int
array.public <T> net.imglib2.IterableInterval<T> sample(Peak peak, net.imagej.ImgPlus<T> img)
public <T> net.imglib2.IterableInterval<T> sample(double spotXCenter, double spotYCenter, net.imglib2.RandomAccessibleInterval<T> img, double xScale, double yScale)
public double radius()
public double area()
public double circularity()
public double perimeter()
public void scale(double alpha)
public static Peak createPeak(double[] xr, double[] yr)
protected void createIOMaps()
AbstractJsonConvertibleRecord
createIOMaps
in class AbstractJsonConvertibleRecord