Interface IROI
- All Superinterfaces:
org.eclipse.january.INameable,Serializable
- All Known Subinterfaces:
IFitROI,IOrientableROI,IParametricROI,IPolylineROI,IRectangularROI
- All Known Implementing Classes:
CircularFitROI,CircularROI,EllipticalFitROI,EllipticalROI,FreeDrawROI,GridROI,HyperbolicROI,Line3DROI,LinearROI,MxGridROI,OrientableROIBase,ParabolicROI,PerimeterBoxROI,PointROI,PolygonalROI,PolylineROI,RectangularROI,ResolutionEllipseROI,RingROI,ROIBase,SectorROI,SurfacePlotROI,XAxisBoxROI,XAxisLineBoxROI,YAxisBoxROI,YAxisLineBoxROI
Region of interest interface. A region may be one or two dimensional and may enclose an area.
If it is open (or does not enclose an area) then a point is consider to be inside it when it
lies on its outline to within the accuracy given by that point's coordinates.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddPoint(double[] pt) Add an offset to start (or centre) pointvoidaddPoint(double x, double y) Add an offset to start (or centre) pointvoidaddPoint(int[] pt) Add an offset to start (or centre) pointbooleancontainsPoint(double x, double y) copy()voiddownsample(double subFactor) To account for a down-sampling of the dataset, change ROIdouble[]findHorizontalIntersections(double y) Calculate x values at which ROI will intersect horizontal line of given yint[]double[]getPoint()double[]doubledoubledoublegetValue(int i) booleanisFixed()booleanisNearOutline(double x, double y, double distance) booleanisPlot()voidsetFixed(boolean fixed) voidsetPlot(boolean require) voidsetPoint(double[] point) voidsetPoint(double x, double y) voidsetPoint(int[] point) voidsetPoint(int x, int y) voidsetValue(int i, double value) Set the start (or centre) point's i-th valueMethods inherited from interface org.eclipse.january.INameable
getName, setName
-
Method Details
-
setValue
void setValue(int i, double value) Set the start (or centre) point's i-th value- Parameters:
i- index of dimensionvalue-
-
setPoint
void setPoint(double[] point) - Parameters:
point- The start (or centre) point to set
-
setPoint
void setPoint(int[] point) - Parameters:
point- The start (or centre) point to set
-
setPoint
void setPoint(int x, int y) - Parameters:
x-y-
-
setPoint
void setPoint(double x, double y) - Parameters:
x-y-
-
getPointRef
double[] getPointRef()- Returns:
- Returns reference to the start (or centre) point
-
getPoint
double[] getPoint()- Returns:
- Returns copy of the start (or centre) point
-
getValue
double getValue(int i) - Parameters:
i- index of dimension- Returns:
- Returns the start (or centre) point's i-th value
-
getPointX
double getPointX()- Returns:
- Returns the start (or centre) point's x value
-
getPointY
double getPointY()- Returns:
- Returns the start (or centre) point's y value
-
getIntPoint
int[] getIntPoint()- Returns:
- Returns the start (or centre) point
-
addPoint
void addPoint(int[] pt) Add an offset to start (or centre) point- Parameters:
pt-
-
addPoint
void addPoint(double[] pt) Add an offset to start (or centre) point- Parameters:
pt-
-
addPoint
void addPoint(double x, double y) Add an offset to start (or centre) point- Parameters:
x-y-
-
downsample
void downsample(double subFactor) To account for a down-sampling of the dataset, change ROI- Parameters:
subFactor-
-
setPlot
void setPlot(boolean require) - Parameters:
require- set true if plot required
-
isPlot
boolean isPlot()- Returns:
- true if plot is enabled
-
setFixed
void setFixed(boolean fixed) - Parameters:
fixed- set true if ROI is not user-changeable
-
isFixed
boolean isFixed()- Returns:
- true if ROI is not user-changeable
-
getBounds
IRectangularROI getBounds()- Returns:
- bounding box as rectangular ROI
-
containsPoint
boolean containsPoint(double x, double y) - Parameters:
x-y-- Returns:
- true if given point is in ROI
-
isNearOutline
boolean isNearOutline(double x, double y, double distance) - Parameters:
x-y-distance-- Returns:
- true if given point within distance of outline of ROI
-
findHorizontalIntersections
double[] findHorizontalIntersections(double y) Calculate x values at which ROI will intersect horizontal line of given y- Parameters:
y-- Returns:
- x values in ascending order, is null in the non-intersecting case
-
copy
IROI copy()- Returns:
- a copy of ROI
-