Class PointROI
java.lang.Object
org.eclipse.dawnsci.analysis.dataset.roi.ROIBase
org.eclipse.dawnsci.analysis.dataset.roi.PointROI
- All Implemented Interfaces:
Serializable,IROI,org.eclipse.january.INameable
Class for 2D point region of interest
- See Also:
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsPoint(double x, double y) copy()double[]findHorizontalIntersections(double y) Calculate x values at which ROI will intersect horizontal line of given ybooleanisNearOutline(double x, double y, double distance) toString()Methods inherited from class org.eclipse.dawnsci.analysis.dataset.roi.ROIBase
addPoint, addPoint, addPoint, closelyEq, closelyEq, closelyEqOrGt, closelyEqOrLt, containsPoint, downsample, equals, getBounds, getIntPoint, getName, getPoint, getPointRef, getPointX, getPointY, getValue, hashCode, intersectHorizontal, isFixed, isNearOutline, isPlot, notClose, setDirty, setFixed, setName, setPlot, setPoint, setPoint, setPoint, setPoint, setValue
-
Constructor Details
-
PointROI
public PointROI() -
PointROI
Copy constructor- Parameters:
orig-
-
PointROI
public PointROI(double[] point) -
PointROI
public PointROI(double x, double y) -
PointROI
public PointROI(int[] point)
-
-
Method Details
-
copy
-
containsPoint
public boolean containsPoint(double x, double y) - Specified by:
containsPointin interfaceIROI- Overrides:
containsPointin classROIBase- Parameters:
x-y-- Returns:
- true if given point is in ROI
-
isNearOutline
public boolean isNearOutline(double x, double y, double distance) - Specified by:
isNearOutlinein interfaceIROI- Overrides:
isNearOutlinein classROIBase- Parameters:
x-y-distance-- Returns:
- true if given point within distance of outline of ROI
-
toString
-
findHorizontalIntersections
public double[] findHorizontalIntersections(double y) Description copied from interface:IROICalculate x values at which ROI will intersect horizontal line of given y- Specified by:
findHorizontalIntersectionsin interfaceIROI- Overrides:
findHorizontalIntersectionsin classROIBase- Parameters:
y-- Returns:
- x values in ascending order, is null in the non-intersecting case
-