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>

public class ParametricROIHandler<T extends IParametricROI> extends ROIHandler<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.
  • Constructor Details

    • ParametricROIHandler

      public ParametricROIHandler(T roi, boolean isClosed)
      Handler for RectangularROI
      Parameters:
      roi -
  • Method Details

    • getCentreHandle

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

      public double[] getHandlePoint(int handle, int size)
      Specified by:
      getHandlePoint in class ROIHandler<T extends IParametricROI>
      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<T extends IParametricROI>
      Parameters:
      handle -
      size -
      Returns:
      anchor point for scale invariant display and acts as centre of rotation
    • resize

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

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

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