Package gda.images.camera
Class DummyOpticalCamera
java.lang.Object
gda.factory.ConfigurableBase
gda.factory.FindableConfigurableBase
gda.device.DeviceBase
gda.images.camera.CameraBase
gda.images.camera.DummyOpticalCamera
- All Implemented Interfaces:
Device,Configurable,Findable,Camera,ImageScaleProvider,gda.observable.IObservable
Simulated object fulfilling the gda.images.camera.Camera interface To have a proper simulation create a test image at
/tmp/test.jpg.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected doubleprotected doubleFields inherited from class gda.images.camera.CameraBase
cameraName, cameraZoomIndexStatus, imageFile, UNSET_ARRAY_INDEXFields inherited from class gda.device.DeviceBase
DEFAULT_PROTECTION_LEVEL_PROPERTYFields inherited from interface gda.images.camera.Camera
FOCUS_SET, IMAGE_UPDATED, ZOOM_SET -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcaptureImage(String imageName) Writes the current image to disk.voidDefault implementation for classes that do not have to do any specific configuration.
Classes that do their own configuration should *not* call this superclass function, as it may cause the object to appear configured before it really is.doublegetFocus()double[]getImage()Captures and returns an image.doubleReturns the number of microns per X pixel.doubleReturns the number of microns per Y pixel.doublegetZoom()double[]protected doublevoidsetFocus(double focus) Sets the focus level.voidsetMicronsPerXPixel(double micronsPerXPixel) voidsetMicronsPerYPixel(double micronsPerYPixel) protected voidupdateCameraToIndexedSettings(int verifiedIndex) Invoked (indirectly) byCameraBase.setZoom(double)for indexed zoom levels,Methods inherited from class gda.images.camera.CameraBase
areSimilar, getCameraName, getImageFileName, getZoomIndex, selectZoomAt, setImageFile, setZoom, setZoomIndexMethods inherited from class gda.device.DeviceBase
addIObserver, close, deleteIObserver, deleteIObservers, getAttribute, getName, getProtectionLevel, isBeingObserved, isConfigureAtStartup, notifyIObservers, setAttribute, setConfigureAtStartup, setName, setProtectionLevelMethods inherited from class gda.factory.ConfigurableBase
isConfigured, reconfigure, setConfiguredMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface gda.factory.Configurable
isConfigureAtStartup, isConfigured, reconfigureMethods inherited from interface gda.device.Device
close, getAttribute, getProtectionLevel, setAttribute, setProtectionLevelMethods inherited from interface gda.observable.IObservable
addIObserver, deleteIObserver, deleteIObservers
-
Field Details
-
micronsPerXPixel
protected double micronsPerXPixel -
micronsPerYPixel
protected double micronsPerYPixel
-
-
Constructor Details
-
DummyOpticalCamera
public DummyOpticalCamera()Constructor.
-
-
Method Details
-
setMicronsPerXPixel
public void setMicronsPerXPixel(double micronsPerXPixel) -
setMicronsPerYPixel
public void setMicronsPerYPixel(double micronsPerYPixel) -
configure
public void configure()Description copied from class:ConfigurableBaseDefault implementation for classes that do not have to do any specific configuration.
Classes that do their own configuration should *not* call this superclass function, as it may cause the object to appear configured before it really is.- Specified by:
configurein interfaceConfigurable- Overrides:
configurein classConfigurableBase
-
captureImage
Description copied from interface:CameraWrites the current image to disk.Filename should be the full path of the file to create. If it is null then the file listed in the configuration file will be overwritten.
- Parameters:
imageName-- Throws:
DeviceException
-
getImage
Description copied from interface:CameraCaptures and returns an image. -
getFocus
public double getFocus()- Returns:
- double - current focus level
-
getFocusLevels
public double[] getFocusLevels()- Returns:
- double[] - the possible focus levels
-
getZoom
public double getZoom()- Returns:
- double - current zoom level
-
getZoomLevels
public double[] getZoomLevels()- Returns:
- double[] - the possible zoom levels
-
setFocus
public void setFocus(double focus) Description copied from interface:CameraSets the focus level. Number must be a member of the list returned by getFcouslevels.- Parameters:
focus-
-
updateCameraToIndexedSettings
protected void updateCameraToIndexedSettings(int verifiedIndex) Description copied from class:CameraBaseInvoked (indirectly) byCameraBase.setZoom(double)for indexed zoom levels,- Specified by:
updateCameraToIndexedSettingsin classCameraBase- Parameters:
verifiedIndex- settings index; already verified to lie within range
-
getMicronsPerXPixel
public double getMicronsPerXPixel()Description copied from interface:ImageScaleProviderReturns the number of microns per X pixel. -
getMicronsPerYPixel
public double getMicronsPerYPixel()Description copied from interface:ImageScaleProviderReturns the number of microns per Y pixel. -
getZoomSimilarityTolerance
protected double getZoomSimilarityTolerance()- Specified by:
getZoomSimilarityTolerancein classCameraBase
-