Class CsvCameraOffsetCalibration
java.lang.Object
uk.ac.gda.client.live.stream.calibration.CsvCameraOffsetCalibration
- All Implemented Interfaces:
CalibratedAxesProvider
Creates a new
CameraOffsetCalibration with values provided by a CSV file.
Reads a CSV file containing the calibration parameters, updates the CSV file
with updated parameters from the GUI and creates a new CameraOffsetCalibration
with the new values.-
Constructor Summary
ConstructorsConstructorDescriptionCsvCameraOffsetCalibration(Scannable xAxis, Scannable yAxis, double xOffsetDefault, double yOffsetDefault, double xPixelScalingDefault, double yPixelScalingDefault, String csvFilePath) -
Method Summary
Modifier and TypeMethodDescriptionvoidconnect()Called when the stream connection has been established.voidCalled when the stream connection has been closed.org.eclipse.january.dataset.IDatasetReturns a calibrated horizontal axis.doubledoubleorg.eclipse.january.dataset.IDatasetReturns a calibrated vertical axis.doubledoublevoidresizeStream(int[] newShape) Called when the stream data changes shape ([y, x])voidupdateCalibrator(String calibrationName, double xOffset, double yOffset, double xPixelScaling, double yPixelScaling) New CalibrationAxesProvider object is created from values updated from the supplied values.
-
Constructor Details
-
CsvCameraOffsetCalibration
-
-
Method Details
-
updateCalibrator
public void updateCalibrator(String calibrationName, double xOffset, double yOffset, double xPixelScaling, double yPixelScaling) New CalibrationAxesProvider object is created from values updated from the supplied values. CSV file containing Camera Offset parameters is updated with the new values in a new row.- Parameters:
calibrationName- time when values were updatedxOffset- offset of camera in x axisyOffset- offset of camera in y axisxPixelScaling- number of pixels per scannable unit in x axisyPixelScaling- number of pixels per scannable unit in y axis
-
getxOffset
public double getxOffset() -
getyOffset
public double getyOffset() -
getxPixelScaling
public double getxPixelScaling() -
getyPixelScaling
public double getyPixelScaling() -
connect
public void connect()Description copied from interface:CalibratedAxesProviderCalled when the stream connection has been established. There is no need to do work until this point- Specified by:
connectin interfaceCalibratedAxesProvider
-
disconnect
public void disconnect()Description copied from interface:CalibratedAxesProviderCalled when the stream connection has been closed. No more work is needed, listeners can be disposed, etc.- Specified by:
disconnectin interfaceCalibratedAxesProvider
-
getXAxisDataset
public org.eclipse.january.dataset.IDataset getXAxisDataset()Description copied from interface:CalibratedAxesProviderReturns a calibrated horizontal axis. Called with each new frame.- Specified by:
getXAxisDatasetin interfaceCalibratedAxesProvider
-
getYAxisDataset
public org.eclipse.january.dataset.IDataset getYAxisDataset()Description copied from interface:CalibratedAxesProviderReturns a calibrated vertical axis. Called with each new frame.- Specified by:
getYAxisDatasetin interfaceCalibratedAxesProvider
-
resizeStream
public void resizeStream(int[] newShape) Description copied from interface:CalibratedAxesProviderCalled when the stream data changes shape ([y, x])- Specified by:
resizeStreamin interfaceCalibratedAxesProvider
-