Package com.digitizer.core
Class CalibrationState
java.lang.Object
com.digitizer.core.CalibrationState
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleandoubledoubledoubledoublejavafx.geometry.Point2Djavafx.geometry.Point2Djavafx.geometry.Point2Djavafx.geometry.Point2DinthashCode()booleanChecks if all four calibration anchors have been set.booleanisXLog()isY2Log()booleanisYLog()voidreset()Resets calibration to uncalibrated state.voidsetDataXMax(double dataXMax) Sets the numeric maximum value for the X axis (data coordinates).voidsetDataXMin(double dataXMin) Sets the numeric minimum value for the X axis (data coordinates).voidsetDataY2Max(Double dataY2Max) voidsetDataY2Min(Double dataY2Min) voidsetDataYMax(double dataYMax) Sets the numeric maximum value for the primary Y axis (data coordinates).voidsetDataYMin(double dataYMin) Sets the numeric minimum value for the primary Y axis (data coordinates).voidsetPixelXMax(javafx.geometry.Point2D pixelXMax) Sets the pixel coordinate of the right X calibration anchor.voidsetPixelXMin(javafx.geometry.Point2D pixelXMin) Sets the pixel coordinate of the left X calibration anchor.voidsetPixelYMax(javafx.geometry.Point2D pixelYMax) Sets the pixel coordinate of the top Y calibration anchor.voidsetPixelYMin(javafx.geometry.Point2D pixelYMin) Sets the pixel coordinate of the bottom Y calibration anchor.voidsetXLog(boolean xLog) voidvoidsetYLog(boolean yLog) toString()
-
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
-
setDataY2Min
-
getDataY2Max
-
setDataY2Max
-
isXLog
public boolean isXLog() -
setXLog
public void setXLog(boolean xLog) -
isYLog
public boolean isYLog() -
setYLog
public void setYLog(boolean yLog) -
isY2Log
-
setY2Log
-
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
-
equals
-
hashCode
public int hashCode()
-