Package gda.images.camera
Interface Camera
- All Superinterfaces:
Configurable,Device,Findable,ImageScaleProvider,gda.observable.IObservable
- All Known Implementing Classes:
CameraBase,DummyOpticalCamera,MxOpticalCamera,MxOpticalCameraBase,MxOpticalCameraNoZoom,MxOpticalCameraZoomPositioner
Interface for sample viewing camera objects. These control the focus and zoom settings of a camera's optics and
capture individual images.
They also contain scaling factors to convert between pixels and microns for calculations relating to sample control. The gda.images package assumes that the camera is on-axis looking at the sample which is held on an XYZ stage.
These objects are not for creating/displaying a stream of images
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidcaptureImage(String filename) Writes the current image to disk.doublegetFocus()double[]getImage()Captures and returns an image.get the name of the file that image is written todoublegetZoom()intdouble[]voidselectZoomAt(int targetIndex) Sets the zoom level via an index, based on array values (seegetZoomLevels()):voidsetFocus(double focus) Sets the focus level.voidsetZoom(double zoom) Sets the zoom level.Methods inherited from interface gda.factory.Configurable
configure, isConfigureAtStartup, isConfigured, reconfigureMethods inherited from interface gda.device.Device
close, getAttribute, getProtectionLevel, setAttribute, setProtectionLevelMethods inherited from interface gda.images.camera.ImageScaleProvider
getMicronsPerXPixel, getMicronsPerYPixelMethods inherited from interface gda.observable.IObservable
addIObserver, deleteIObserver, deleteIObservers
-
Field Details
-
IMAGE_UPDATED
Message sent when image updated from camera- See Also:
-
ZOOM_SET
Message sent when zoom changed in camera- See Also:
-
FOCUS_SET
Message sent when focus changed in camera- See Also:
-
-
Method Details
-
getImageFileName
get the name of the file that image is written to- Returns:
- string - filename
- Throws:
DeviceException
-
getCameraName
- Returns:
- string - name of the camera
- Throws:
DeviceException
-
getFocus
- Returns:
- double - current focus level
- Throws:
DeviceException
-
getZoom
- Returns:
- double - current zoom level
- Throws:
DeviceException
-
setZoom
Sets the zoom level. Number must be a member of the list returned bygetZoomLevels().- Parameters:
zoom-- Throws:
DeviceException
-
selectZoomAt
Sets the zoom level via an index, based on array values (seegetZoomLevels()):- Parameters:
targetIndex- array index of new zoom level, ignored if out of range- Throws:
DeviceException
-
getZoomIndex
int getZoomIndex()- Returns:
- the zoom index of the present zoom setting, else -1 if no zoom level is set, or no levels are present
-
setFocus
Sets the focus level. Number must be a member of the list returned by getFcouslevels.- Parameters:
focus-- Throws:
DeviceException
-
captureImage
Writes 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:
filename-- Throws:
DeviceException
-
getImage
Captures and returns an image.- Throws:
DeviceException
-
getZoomLevels
- Returns:
- double[] - the possible zoom levels
- Throws:
DeviceException
-
getFocusLevels
- Returns:
- double[] - the possible focus levels
- Throws:
DeviceException
-