Class ParametricROIHandler<T extends IParametricROI>
java.lang.Object
org.eclipse.dawnsci.analysis.dataset.roi.handler.ROIHandler<T>
org.eclipse.dawnsci.analysis.dataset.roi.handler.ParametricROIHandler<T>
Wrapper class for a IParametricROI that adds handles. If the ROI is closed then it has five handles
otherwise it is open (i.e. unbounded) and has four handles (as one is considered to be at infinity).
An open parametric ROI usually has its infinity at the parameter of its orientation angle.
Handle 0 is focus (or centre), 1 is periapsis, 2 is c/w of 1 at the latus rectum or minor axis
intersection points, 3 is a/c of 1 at the other intersection point, and 4 is apoapsis if closed.
-
Field Summary
Fields inherited from class org.eclipse.dawnsci.analysis.dataset.roi.handler.ROIHandler
handle, list, roi, status -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble[]getAnchorPoint(int handle, int size) intdouble[]getHandlePoint(int handle, int size) interpretMouseDragging(double[] spt, double[] ept) Interpret mouse draggingreorient(double[] pt) resize(double[] spt, double[] pt) Methods inherited from class org.eclipse.dawnsci.analysis.dataset.roi.handler.ROIHandler
add, configureDragging, contains, get, getAll, getROI, getStatus, indexOf, interpretMouseDragging, remove, set, setROI, size, unconfigureDragging
-
Constructor Details
-
ParametricROIHandler
Handler for RectangularROI- Parameters:
roi-
-
-
Method Details
-
getCentreHandle
public int getCentreHandle()- Specified by:
getCentreHandlein classROIHandler<T extends IParametricROI>- Returns:
- centre handle ID
-
getHandlePoint
public double[] getHandlePoint(int handle, int size) - Specified by:
getHandlePointin classROIHandler<T extends IParametricROI>- Parameters:
handle-size-- Returns:
- handle point for corner of handle box
-
getAnchorPoint
public double[] getAnchorPoint(int handle, int size) - Specified by:
getAnchorPointin classROIHandler<T extends IParametricROI>- Parameters:
handle-size-- Returns:
- anchor point for scale invariant display and acts as centre of rotation
-
resize
- Parameters:
spt- starting pointpt-- Returns:
- resized ROI
-
reorient
- Parameters:
pt-- Returns:
- reoriented ROI
-
interpretMouseDragging
Description copied from class:ROIHandlerInterpret mouse dragging- Specified by:
interpretMouseDraggingin classROIHandler<T extends IParametricROI>- Parameters:
spt-ept-- Returns:
- roi, can be null if handle movement is invalid
-