Class BeamPositionCalibration

java.lang.Object
uk.ac.gda.client.live.stream.calibration.AbstractCalibratedAxesProvider
uk.ac.gda.client.live.stream.calibration.BeamPositionCalibration
All Implemented Interfaces:
CalibratedAxesProvider

public class BeamPositionCalibration extends AbstractCalibratedAxesProvider
Creates axes datasets for a data stream calibrated to x and y scannables given pixel size and pixel coordinates of the beam in the camera feed.
  • Constructor Details

    • BeamPositionCalibration

      public BeamPositionCalibration(Scannable xAxisScannable, double xAxisPixelScaling, int xAxisBeamPositionInPixels, Scannable yAxisScannable, double yAxisPixelScaling, int yAxisBeamPositionInPixels, boolean attemptToLoadLocalParameters)
      Creates a new instance of BeamPositionCalibration
      Parameters:
      xAxisScannable - The scannable for the horizontal axis of the camera
      xAxisPixelScaling - The width of each pixel of the camera, in the units used by the x-axis scannable
      xAxisBeamPositionInPixels - The X pixel position of the beam in the camera feed
      yAxisScannable - The scannable for the vertical axis of the camera
      yAxisPixelScaling - The height of each pixel of the camera in the units used by the y-axis scannable
      yAxisBeamPositionInPixels - The Y pixel position of the beam in the camera feed
  • Method Details

    • createAxesUpdaters

      protected void createAxesUpdaters()
      Description copied from class: AbstractCalibratedAxesProvider
      Should be overridden to create two instances of classes implementing CalibratedAxesDatasetUpdater, one for each axis, which will create the datasets when the scannables move, image is resized, or a new frame is received. In your concrete class, you should call this once all required properties in set, using one of the following: 1. Create a constructor which calls it. 2. Set the init-method property on your spring bean. 3. Implement InitializingBean and create an afterPropertiesSet() method which calls it.
      Specified by:
      createAxesUpdaters in class AbstractCalibratedAxesProvider
    • setBeamPosition

      public void setBeamPosition(int xAxisBeamPositionInPixels, int yAxisBeamPositionInPixels, boolean saveCalibrationValues)