Class RectangularROIHandler

java.lang.Object
org.eclipse.dawnsci.analysis.dataset.roi.handler.ROIHandler<RectangularROI>
org.eclipse.dawnsci.analysis.dataset.roi.handler.RectangularROIHandler
Direct Known Subclasses:
GridROIHandler

public class RectangularROIHandler extends ROIHandler<RectangularROI>
Wrapper class for a RectangularROI that adds handles
  • Constructor Details

    • RectangularROIHandler

      public RectangularROIHandler(RectangularROI roi)
      Handler for RectangularROI
      Parameters:
      roi -
  • Method Details

    • getCentreHandle

      public int getCentreHandle()
      Specified by:
      getCentreHandle in class ROIHandler<RectangularROI>
      Returns:
      centre handle ID
    • getHandlePoint

      public double[] getHandlePoint(int handle, int size)
      Specified by:
      getHandlePoint in class ROIHandler<RectangularROI>
      Parameters:
      handle -
      size -
      Returns:
      handle point for corner of handle box
    • getAnchorPoint

      public double[] getAnchorPoint(int handle, int size)
      Specified by:
      getAnchorPoint in class ROIHandler<RectangularROI>
      Parameters:
      handle -
      size -
      Returns:
      anchor point for scale invariant display and acts as centre of rotation
    • resize

      public RectangularROI resize(double[] spt, double[] pt)
      Parameters:
      spt - starting point
      pt -
      Returns:
      resized ROI
    • reorient

      public RectangularROI reorient(double[] pt)
      Parameters:
      pt -
      Returns:
      reoriented ROI
    • interpretMouseDragging

      public RectangularROI interpretMouseDragging(double[] spt, double[] ept)
      Description copied from class: ROIHandler
      Interpret mouse dragging
      Specified by:
      interpretMouseDragging in class ROIHandler<RectangularROI>
      Parameters:
      spt -
      ept -
      Returns:
      roi, can be null if handle movement is invalid