Class CalibrationState

java.lang.Object
com.digitizer.core.CalibrationState

public class CalibrationState extends Object
Represents the calibration state of the graph digitizer.

Calibration consists of four anchor points in pixel/canvas coordinates (left X, right X, bottom Y, top Y) as well as the numeric axis ranges (dataXMin, dataXMax, dataYMin, dataYMax). Both linear and logarithmic axes are supported. The object tracks whether a complete calibration has been applied using isCalibrated().

  • Constructor Details

    • CalibrationState

      public CalibrationState()
      Constructs a new uncalibrated CalibrationState.
  • Method Details

    • getPixelXMin

      public javafx.geometry.Point2D getPixelXMin()
    • setPixelXMin

      public void setPixelXMin(javafx.geometry.Point2D pixelXMin)
      Sets the pixel coordinate of the left X calibration anchor.
      Parameters:
      pixelXMin - the pixel Point2D for the left X anchor (may be null)
    • getPixelXMax

      public javafx.geometry.Point2D getPixelXMax()
    • setPixelXMax

      public void setPixelXMax(javafx.geometry.Point2D pixelXMax)
      Sets the pixel coordinate of the right X calibration anchor.
      Parameters:
      pixelXMax - the pixel Point2D for the right X anchor (may be null)
    • getPixelYMin

      public javafx.geometry.Point2D getPixelYMin()
    • setPixelYMin

      public void setPixelYMin(javafx.geometry.Point2D pixelYMin)
      Sets the pixel coordinate of the bottom Y calibration anchor.
      Parameters:
      pixelYMin - the pixel Point2D for the bottom Y anchor (may be null)
    • getPixelYMax

      public javafx.geometry.Point2D getPixelYMax()
    • setPixelYMax

      public void setPixelYMax(javafx.geometry.Point2D pixelYMax)
      Sets the pixel coordinate of the top Y calibration anchor.
      Parameters:
      pixelYMax - the pixel Point2D for the top Y anchor (may be null)
    • getDataXMin

      public double getDataXMin()
    • setDataXMin

      public void setDataXMin(double dataXMin)
      Sets the numeric minimum value for the X axis (data coordinates).
      Parameters:
      dataXMin - minimum X data value
    • getDataXMax

      public double getDataXMax()
    • setDataXMax

      public void setDataXMax(double dataXMax)
      Sets the numeric maximum value for the X axis (data coordinates).
      Parameters:
      dataXMax - maximum X data value
    • getDataYMin

      public double getDataYMin()
    • setDataYMin

      public void setDataYMin(double dataYMin)
      Sets the numeric minimum value for the primary Y axis (data coordinates).
      Parameters:
      dataYMin - minimum Y data value
    • getDataYMax

      public double getDataYMax()
    • setDataYMax

      public void setDataYMax(double dataYMax)
      Sets the numeric maximum value for the primary Y axis (data coordinates).
      Parameters:
      dataYMax - maximum Y data value
    • getDataY2Min

      public Double getDataY2Min()
    • setDataY2Min

      public void setDataY2Min(Double dataY2Min)
    • getDataY2Max

      public Double getDataY2Max()
    • setDataY2Max

      public void setDataY2Max(Double dataY2Max)
    • isXLog

      public boolean isXLog()
    • setXLog

      public void setXLog(boolean xLog)
    • isYLog

      public boolean isYLog()
    • setYLog

      public void setYLog(boolean yLog)
    • isY2Log

      public Boolean isY2Log()
    • setY2Log

      public void setY2Log(Boolean y2Log)
    • isCalibrated

      public boolean isCalibrated()
      Checks if all four calibration anchors have been set.
      Returns:
      true if all anchors are non-null, false otherwise
    • reset

      public void reset()
      Resets calibration to uncalibrated state.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object