Class DummyOpticalCamera

All Implemented Interfaces:
Device, Configurable, Findable, Camera, ImageScaleProvider, gda.observable.IObservable

public class DummyOpticalCamera extends CameraBase
Simulated object fulfilling the gda.images.camera.Camera interface To have a proper simulation create a test image at /tmp/test.jpg.
  • 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: ConfigurableBase
      Default 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:
      configure in interface Configurable
      Overrides:
      configure in class ConfigurableBase
    • captureImage

      public void captureImage(String imageName) throws DeviceException
      Description copied from interface: Camera
      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:
      imageName -
      Throws:
      DeviceException
    • getImage

      public BufferedImage getImage()
      Description copied from interface: Camera
      Captures 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: Camera
      Sets 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: CameraBase
      Invoked (indirectly) by CameraBase.setZoom(double) for indexed zoom levels,
      Specified by:
      updateCameraToIndexedSettings in class CameraBase
      Parameters:
      verifiedIndex - settings index; already verified to lie within range
    • getMicronsPerXPixel

      public double getMicronsPerXPixel()
      Description copied from interface: ImageScaleProvider
      Returns the number of microns per X pixel.
    • getMicronsPerYPixel

      public double getMicronsPerYPixel()
      Description copied from interface: ImageScaleProvider
      Returns the number of microns per Y pixel.
    • getZoomSimilarityTolerance

      protected double getZoomSimilarityTolerance()
      Specified by:
      getZoomSimilarityTolerance in class CameraBase