Interface ShutterManager


public interface ShutterManager
This class provides access to the shutter controls, allowing you to open or close the shutter, as well as turn autoshutter on or off. You can access this class via Studio.shutter() or Studio.getShutterManager(). It largely shadows methods in MMCore (like setShutterOpen() or getAutoShutter()), but it is recommended that callers use these methods instead to ensure that all shutter-related GUI objects remain up-to-date, as it also posts events that notify GUI elements when the shutter state changes (see ShutterEvent and AutoShutterEvent).
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Return true if autoshutter is enabled.
    Return the current shutter device.
    boolean
    Return whether or not the shutter is currently open.
    Return a list of device names of devices that can be used as shutter devices.
    void
    setAutoShutter(boolean isAuto)
    Turn autoshutter on or off.
    boolean
    setShutter(boolean isOpen)
    Open or close the shutter.
  • Method Details

    • setShutter

      boolean setShutter(boolean isOpen) throws Exception
      Open or close the shutter. If autoshutter is enabled, it will be disabled. This method will post a ShutterEvent on the application event bus, and if autoshutter was enabled, then it will also post an AutoShutterEvent when it is disabled.
      Parameters:
      isOpen - if true, the shutter will be opened, otherwise it will be closed.
      Returns:
      true if autoshutter was disabled as a side-effect of calling this method; false if autoshutter was already off.
      Throws:
      Exception - if there was a problem setting the shutter state.
    • getShutter

      boolean getShutter() throws Exception
      Return whether or not the shutter is currently open. A straight pass- through to MMCore.getShutterOpen().
      Returns:
      true if shutter is open, false if closed.
      Throws:
      Exception - if there was a problem getting the shutter state.
    • getShutterDevices

      List<String> getShutterDevices()
      Return a list of device names of devices that can be used as shutter devices. Will be null briefly at the start of the program, before a configuration file has been loaded.
      Returns:
      List of strings of shutter device names.
    • getCurrentShutter

      String getCurrentShutter() throws Exception
      Return the current shutter device. A straight pass-through to MMCore.getShutterDevice();
      Returns:
      Name of the device that is the current shutter device.
      Throws:
      Exception - if there was a problem getting the shutter device.
    • setAutoShutter

      void setAutoShutter(boolean isAuto) throws Exception
      Turn autoshutter on or off. When autoshutter is enabled, the shutter will open automatically whenever the current camera is performing an acquisition (either a single-image snap or a sequence acquisition). This method will also close the shutter as a side-effect. This method will post an AutoShutterEvent on the application event bus.
      Parameters:
      isAuto - if true, then autoshutter is enabled, otherwise it will be disabled.
      Throws:
      Exception - if there was an error setting autoshutter or closing the shutter.
    • getAutoShutter

      boolean getAutoShutter()
      Return true if autoshutter is enabled. A straight passthrough to MMCore.getAutoShutter().
      Returns:
      true if autoshutter is enabled, false if disabled.