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
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.
-
Field Summary
Fields inherited from class uk.ac.gda.client.live.stream.calibration.AbstractCalibratedAxesProvider
xAxisPixelScaling, xAxisScannable, xAxisUpdater, yAxisPixelScaling, yAxisScannable, yAxisUpdater -
Constructor Summary
ConstructorsConstructorDescriptionBeamPositionCalibration(Scannable xAxisScannable, double xAxisPixelScaling, int xAxisBeamPositionInPixels, Scannable yAxisScannable, double yAxisPixelScaling, int yAxisBeamPositionInPixels, boolean attemptToLoadLocalParameters) Creates a new instance of BeamPositionCalibration -
Method Summary
Modifier and TypeMethodDescriptionprotected voidShould 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.voidsetBeamPosition(int xAxisBeamPositionInPixels, int yAxisBeamPositionInPixels, boolean saveCalibrationValues) Methods inherited from class uk.ac.gda.client.live.stream.calibration.AbstractCalibratedAxesProvider
connect, disconnect, getXAxisDataset, getYAxisDataset, resizeStream, updateDatasets
-
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 cameraxAxisPixelScaling- The width of each pixel of the camera, in the units used by the x-axis scannablexAxisBeamPositionInPixels- The X pixel position of the beam in the camera feedyAxisScannable- The scannable for the vertical axis of the camerayAxisPixelScaling- The height of each pixel of the camera in the units used by the y-axis scannableyAxisBeamPositionInPixels- The Y pixel position of the beam in the camera feed
-
-
Method Details
-
createAxesUpdaters
protected void createAxesUpdaters()Description copied from class:AbstractCalibratedAxesProviderShould 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:
createAxesUpdatersin classAbstractCalibratedAxesProvider
-
setBeamPosition
public void setBeamPosition(int xAxisBeamPositionInPixels, int yAxisBeamPositionInPixels, boolean saveCalibrationValues)
-