mmcorej
Class CMMCore

java.lang.Object
  extended by mmcorej.CMMCore

public class CMMCore
extends java.lang.Object


Field Summary
protected  boolean swigCMemOwn
           
 
Constructor Summary
  CMMCore()
          Constructor.
protected CMMCore(long cPtr, boolean cMemoryOwn)
           
 
Method Summary
 void addGalvoPolygonVertex(java.lang.String galvoLabel, int polygonIndex, double x, double y)
           
static void addSearchPath(java.lang.String path)
           
 void assignImageSynchro(java.lang.String deviceLabel)
          Add device to the image-synchro list.
 void clearCircularBuffer()
          Removes all images from the circular buffer.
 void clearROI()
          Set the region of interest of the current camera to the full frame.
 boolean debugLogEnabled()
           
 void defineConfig(java.lang.String groupName, java.lang.String configName)
          Defines a configuration.
 void defineConfig(java.lang.String groupName, java.lang.String configName, java.lang.String deviceLabel, java.lang.String propName, java.lang.String value)
           
 void defineConfigGroup(java.lang.String groupName)
          Creates an empty configuration group.
 void definePixelSizeConfig(java.lang.String resolutionID)
          Defines an empty pixel size entry.
 void definePixelSizeConfig(java.lang.String resolutionID, java.lang.String deviceLabel, java.lang.String propName, java.lang.String value)
           
 void definePropertyBlock(java.lang.String blockName, java.lang.String propertyName, java.lang.String propertyValue)
           
 void defineStateLabel(java.lang.String stateDeviceLabel, int state, java.lang.String stateLabel)
           
 void delete()
           
 void deleteConfig(java.lang.String groupName, java.lang.String configName)
          Deletes a configuration from a group.
 void deleteConfig(java.lang.String groupName, java.lang.String configName, java.lang.String deviceLabel, java.lang.String propName)
           
 void deleteConfigGroup(java.lang.String groupName)
          Deletes an entire configuration group.
 void deleteGalvoPolygons(java.lang.String galvoLabel)
          Remove all added polygons
 void deletePixelSizeConfig(java.lang.String configName)
          Deletes a pixel size configuration.
 DeviceDetectionStatus detectDevice(java.lang.String deviceLabel)
          Tries to communicate to a device through a given serial port Used to automate discovery of correct serial port Also configures the serial port correctly
 boolean deviceBusy(java.lang.String label)
          Checks the busy status of the specific device.
 boolean deviceTypeBusy(DeviceType devType)
          Checks the busy status for all devices of the specific type.
 void displaySLMImage(java.lang.String slmLabel)
          Display the waiting image on the SLM.
 void enableContinuousFocus(boolean enable)
          Enables or disables the operation of the continuous focusing hardware device.
 void enableDebugLog(boolean enable)
          Enable or disable logging of debug messages.
 void enableStderrLog(boolean enable)
          Enables or disables log message display on the standard console.
protected  void finalize()
           
 void fullFocus()
          Performs focus acquisition and lock for the one-shot focusing device.
 StrVector getAllowedPropertyValues(java.lang.String label, java.lang.String propName)
          Returns all valid values for the specified property.
 java.lang.String getAPIVersionInfo()
          Returns the module and device interface versions.
 java.lang.String getAutoFocusDevice()
          Returns the label of the currently selected auto-focus device.
 double getAutoFocusOffset()
          Measures offset for the one-shot focusing device.
 boolean getAutoShutter()
          Returns the current setting of the auto-shutter option.
 StrVector getAvailableConfigGroups()
          Returns the names of all defined configuration groups
 StrVector getAvailableConfigs(java.lang.String configGroup)
          Returns all defined configuration names in a given group
 StrVector getAvailableDeviceDescriptions(java.lang.String library)
          Get descriptions for available devices from the specified library.
 StrVector getAvailableDevices(java.lang.String library)
          Get available devices from the specified device library.
 LongVector getAvailableDeviceTypes(java.lang.String library)
          Get type information for available devices from the specified library.
 StrVector getAvailablePixelSizeConfigs()
          Returns all defined resolution preset names
 StrVector getAvailablePropertyBlocks()
          Returns all defined property block identifiers.
 int getBufferFreeCapacity()
           
 int getBufferTotalCapacity()
           
 long getBytesPerPixel()
          How many bytes for each pixel.
 java.lang.String getCameraChannelName(long channelNr)
           
 java.lang.String getCameraDevice()
          Returns the label of the currently selected camera device.
 java.lang.String getChannelGroup()
          Returns the group determining the channel selection.
 long getCircularBufferMemoryFootprint()
           
 Configuration getConfigData(java.lang.String configGroup, java.lang.String configName)
          Returns the configuration object for a given group and name.
 Configuration getConfigGroupState(java.lang.String group)
          Returns the partial state of the system, only for the devices included in the specified group.
 Configuration getConfigGroupStateFromCache(java.lang.String group)
          Returns the partial state of the system cache, only for the devices included in the specified group.
 Configuration getConfigState(java.lang.String group, java.lang.String config)
          Returns a partial state of the system, only for devices included in the specified configuration.
 java.lang.String getCoreErrorText(int code)
           
protected static long getCPtr(CMMCore obj)
           
 java.lang.String getCurrentConfig(java.lang.String groupName)
          Returns the current configuration for a given group.
 java.lang.String getCurrentConfigFromCache(java.lang.String groupName)
          Returns the configuration for a given group based on the data in the cache.
 double getCurrentFocusScore()
          Returns the focus score from the default focusing device measured at the current Z position.
 java.lang.String getCurrentPixelSizeConfig()
          Get the current pixel configuration name
 java.lang.String getCurrentPixelSizeConfig(boolean cached)
          Get the current pixel configuration name
 PropertyBlock getData(java.lang.String stateDeviceLabel)
          Returns the collection of property-value pairs defined for the current state.
 StrVector getDeviceAdapterNames()
          Return the names of discoverable device adapters.
 StrVector getDeviceAdapterSearchPaths()
          Return the current device adapter search paths.
 double getDeviceDelayMs(java.lang.String label)
          Reports action delay in milliseconds for the specific device.
 java.lang.String getDeviceDescription(java.lang.String label)
          Returns description text for a given device label.
static StrVector getDeviceLibraries()
           
 java.lang.String getDeviceLibrary(java.lang.String label)
          Returns device library (aka module, device adapter) name.
 java.lang.String getDeviceName(java.lang.String label)
          Returns device name for a given device label.
 StrVector getDevicePropertyNames(java.lang.String label)
          Returns all property names supported by the device.
 DeviceType getDeviceType(java.lang.String label)
          Returns device type.
 double getExposure()
          Returns the current exposure setting of the camera in milliseconds.
 double getExposure(java.lang.String label)
          Returns the current exposure setting of the specified camera in milliseconds.
 int getExposureSequenceMaxLength(java.lang.String cameraLabel)
          Gets the maximum length of a camera's exposure sequence.
 java.lang.String getFocusDevice()
          Returns the label of the currently selected focus device.
 int getFocusDirection(java.lang.String stageLabel)
          Get the focus direction of a stage.
 java.lang.String getGalvoChannel(java.lang.String galvoLabel)
          Get the name of the active galvo channel (for a multi-laser galvo device).
 java.lang.String getGalvoDevice()
          Returns the label of the currently selected Galvo device.
 java.awt.geom.Point2D.Double getGalvoPosition(java.lang.String galvoDevice)
           
 void getGalvoPosition(java.lang.String galvoLabel, double[] x_stage, double[] y_stage)
           
 double getGalvoXMinimum(java.lang.String galvoLabel)
          Get the Galvo x minimum
 double getGalvoXRange(java.lang.String galvoLabel)
          Get the Galvo x range
 double getGalvoYMinimum(java.lang.String galvoLabel)
          Get the Galvo y minimum
 double getGalvoYRange(java.lang.String galvoLabel)
          Get the Galvo y range
 java.lang.String getHostName()
          return current computer name.
 java.lang.Object getImage()
          Exposes the internal image buffer.
 java.lang.Object getImage(long numChannel)
          Returns the internal image buffer for a given Camera Channel
 long getImageBitDepth()
          How many bits of dynamic range are to be expected from the camera.
 int getImageBufferSize()
          Returns the size of the internal image buffer.
 long getImageHeight()
          Vertical dimension of the image buffer in pixels.
 java.lang.String getImageProcessorDevice()
          Returns the label of the currently selected image processor device.
 long getImageWidth()
          Horizontal dimension of the image buffer in pixels.
 java.lang.String getInstalledDeviceDescription(java.lang.String hubLabel, java.lang.String peripheralLabel)
           
 StrVector getInstalledDevices(java.lang.String hubLabel)
          Performs auto-detection and loading of child devices that are attached to a Hub device.
 double getLastFocusScore()
          Returns the latest focus score from the focusing device.
 java.lang.Object getLastImage()
          Gets the last image from the circular buffer.
 java.lang.Object getLastImageMD(long channel, long slice, Metadata md)
           
 java.lang.Object getLastImageMD(Metadata md)
          Returns a pointer to the pixels of the image that was last inserted into the circular buffer Also provides all metadata associated with that image
 TaggedImage getLastTaggedImage()
           
 TaggedImage getLastTaggedImage(int cameraChannelIndex)
           
 StrVector getLoadedDevices()
          Returns an array of labels for currently loaded devices.
 StrVector getLoadedDevicesOfType(DeviceType devType)
          Returns an array of labels for currently loaded devices of specific type.
 StrVector getLoadedPeripheralDevices(java.lang.String hubLabel)
           
 StrVector getMACAddresses()
           
 double getMagnificationFactor()
          Returns the product of all Magnifiers in the system or 1.0 when none is found This is used internally by GetPixelSizeUm
 java.util.List<java.awt.Rectangle> getMultiROI()
           
 void getMultiROI(UnsignedVector xs, UnsignedVector ys, UnsignedVector widths, UnsignedVector heights)
           
 java.lang.Object getNBeforeLastImageMD(long n, Metadata md)
          Returns a pointer to the pixels of the image that was inserted n images ago Also provides all metadata associated with that image
 TaggedImage getNBeforeLastTaggedImage(long n)
           
 long getNumberOfCameraChannels()
          Returns the number of simultaneous channels the default camera is returning.
 long getNumberOfComponents()
          Returns the number of components the default camera is returning.
 int getNumberOfStates(java.lang.String stateDeviceLabel)
          Returns the total number of available positions (states).
 java.lang.String getParentLabel(java.lang.String peripheralLabel)
          Returns parent device.
 DoubleVector getPixelSizeAffine()
          Returns the current Affine Transform to related camera pixels with stage movement..
 DoubleVector getPixelSizeAffine(boolean cached)
          Returns the current Affine Transform to related camera pixels with stage movement..
 java.lang.String getPixelSizeAffineAsString()
          Convenience function.
 DoubleVector getPixelSizeAffineByID(java.lang.String resolutionID)
          Returns the Affine Transform to related camera pixels with stage movement for the requested pixel size group The raw affine transform without correction for binning and magnification will be returned.
 Configuration getPixelSizeConfigData(java.lang.String configName)
          Returns the configuration object for a give pixel size preset.
 double getPixelSizeUm()
          Returns the current pixel size in microns.
 double getPixelSizeUm(boolean cached)
          Returns the current pixel size in microns.
 double getPixelSizeUmByID(java.lang.String resolutionID)
          Returns the pixel size in um for the requested pixel size group
 double getPosition()
          Returns the current position of the stage in microns.
 double getPosition(java.lang.String stageLabel)
          Returns the current position of the stage in microns.
 java.lang.String getPrimaryLogFile()
          Return the name of the primary Core log file.
 java.lang.String getProperty(java.lang.String label, java.lang.String propName)
          Returns the property value for the specified device.
 PropertyBlock getPropertyBlockData(java.lang.String blockName)
          Returns the collection of property-value pairs defined in this block.
 java.lang.String getPropertyFromCache(java.lang.String deviceLabel, java.lang.String propName)
          Returns the cached property value for the specified device.
 double getPropertyLowerLimit(java.lang.String label, java.lang.String propName)
          Returns the property lower limit value, if the property has limits - 0 otherwise.
 int getPropertySequenceMaxLength(java.lang.String label, java.lang.String propName)
          Queries device property for the maximum number of events that can be put in a sequence
 PropertyType getPropertyType(java.lang.String label, java.lang.String propName)
          Returns the intrinsic property type.
 double getPropertyUpperLimit(java.lang.String label, java.lang.String propName)
          Returns the property upper limit value, if the property has limits - 0 otherwise.
 int getRemainingImageCount()
           
 java.awt.Rectangle getROI()
           
 void getROI(int[] x, int[] y, int[] xSize, int[] ySize)
           
 java.awt.Rectangle getROI(java.lang.String label)
           
 void getROI(java.lang.String label, int[] x, int[] y, int[] xSize, int[] ySize)
           
 java.lang.String getSerialPortAnswer(java.lang.String portLabel, java.lang.String term)
          Continuously read from the serial port until the terminating sequence is encountered.
 java.lang.String getShutterDevice()
          Returns the label of the currently selected shutter device.
 boolean getShutterOpen()
          Returns the state of the currently selected (default) shutter.
 boolean getShutterOpen(java.lang.String shutterLabel)
          Returns the state of the specified shutter.
 long getSLMBytesPerPixel(java.lang.String slmLabel)
           
 java.lang.String getSLMDevice()
          Returns the label of the currently selected SLM device.
 double getSLMExposure(java.lang.String slmLabel)
           
 long getSLMHeight(java.lang.String slmLabel)
           
 long getSLMNumberOfComponents(java.lang.String slmLabel)
           
 int getSLMSequenceMaxLength(java.lang.String slmLabel)
           
 long getSLMWidth(java.lang.String slmLabel)
           
 int getStageSequenceMaxLength(java.lang.String stageLabel)
          Gets the maximum length of a stage's position sequence.
 int getState(java.lang.String stateDeviceLabel)
          Returns the current state (position) on the specific device.
 int getStateFromLabel(java.lang.String stateDeviceLabel, java.lang.String stateLabel)
          Obtain the state for a given label.
 java.lang.String getStateLabel(java.lang.String stateDeviceLabel)
          Returns the current state as the label (string).
 PropertyBlock getStateLabelData(java.lang.String stateDeviceLabel, java.lang.String stateLabel)
          Returns the collection of property-value pairs defined for the specific device and state label.
 StrVector getStateLabels(java.lang.String stateDeviceLabel)
          Return labels for all states
 Configuration getSystemState()
          Returns the entire system state, i.e.
 Configuration getSystemStateCache()
          Returns the entire system state, i.e.
 TaggedImage getTaggedImage()
           
 TaggedImage getTaggedImage(int cameraChannelIndex)
           
 int getTimeoutMs()
           
 java.lang.String getUserId()
          Displays current user name.
 java.lang.String getVersionInfo()
          Displays core version.
 double getXPosition()
          Obtains the current position of the X axis of the XY stage in microns.
 double getXPosition(java.lang.String xyStageLabel)
          Obtains the current position of the X axis of the XY stage in microns.
 void getXYPosition(double[] x_stage, double[] y_stage)
          Obtains the current position of the XY stage in microns.
 void getXYPosition(java.lang.String xyStageLabel, double[] x_stage, double[] y_stage)
           
 java.lang.String getXYStageDevice()
          Returns the label of the currently selected XYStage device.
 java.awt.geom.Point2D.Double getXYStagePosition()
          Convenience function: returns the current XY position of the current XY stage device as a Point2D.Double.
 java.awt.geom.Point2D.Double getXYStagePosition(java.lang.String stage)
           
 int getXYStageSequenceMaxLength(java.lang.String xyStageLabel)
          Gets the maximum length of an XY stage's position sequence.
 double getYPosition()
          Obtains the current position of the Y axis of the XY stage in microns.
 double getYPosition(java.lang.String xyStageLabel)
          Obtains the current position of the Y axis of the XY stage in microns.
 boolean hasProperty(java.lang.String label, java.lang.String propName)
          Checks if device has a property with a specified name.
 boolean hasPropertyLimits(java.lang.String label, java.lang.String propName)
          Queries device if the specific property has limits.
 void home(java.lang.String xyOrZStageLabel)
          Perform a hardware homing operation for an XY or focus/Z stage.
 void incrementalFocus()
          Performs incremental focus for the one-shot focusing device.
 void initializeAllDevices()
          Calls Initialize() method for each loaded device.
 void initializeCircularBuffer()
          Initialize circular buffer based on the current camera settings.
 void initializeDevice(java.lang.String label)
          Initializes specific device.
 boolean isBufferOverflowed()
           
 boolean isConfigDefined(java.lang.String groupName, java.lang.String configName)
          Checks if the configuration already exists within a group.
 boolean isContinuousFocusDrive(java.lang.String stageLabel)
          Check if a stage has continuous focusing capability (positions can be set while continuous focus runs).
 boolean isContinuousFocusEnabled()
          Checks if the continuous focusing hardware device is ON or OFF.
 boolean isContinuousFocusLocked()
          Returns the lock-in status of the continuous focusing device.
 boolean isExposureSequenceable(java.lang.String cameraLabel)
          Queries camera if exposure can be used in a sequence
 boolean isGroupDefined(java.lang.String groupName)
          Checks if the group already exists.
 boolean isMultiROIEnabled()
          Queries the camera to determine if multiple ROIs are currently set.
 boolean isMultiROISupported()
          Queries the camera to determine if it supports multiple ROIs.
 boolean isPixelSizeConfigDefined(java.lang.String resolutionID)
          Checks if the Pixel Size Resolution already exists
 boolean isPropertyPreInit(java.lang.String label, java.lang.String propName)
          Tells us whether the property must be defined prior to initialization.
 boolean isPropertyReadOnly(java.lang.String label, java.lang.String propName)
          Tells us whether the property can be modified.
 boolean isPropertySequenceable(java.lang.String label, java.lang.String propName)
          Queries device if the specified property can be used in a sequence
 boolean isSequenceRunning()
          Check if the current camera is acquiring the sequence Returns false when the sequence is done
 boolean isSequenceRunning(java.lang.String cameraLabel)
          Check if the specified camera is acquiring the sequence Returns false when the sequence is done
 boolean isStageLinearSequenceable(java.lang.String stageLabel)
           
 boolean isStageSequenceable(java.lang.String stageLabel)
          Queries stage if it can be used in a sequence
 boolean isXYStageSequenceable(java.lang.String xyStageLabel)
          Queries XY stage if it can be used in a sequence
 void loadDevice(java.lang.String label, java.lang.String moduleName, java.lang.String deviceName)
           
 void loadExposureSequence(java.lang.String cameraLabel, DoubleVector exposureSequence_ms)
          Transfer a sequence of exposure times to the camera.
 void loadGalvoPolygons(java.lang.String galvoLabel)
          Load a set of galvo polygons to the device
 void loadPropertySequence(java.lang.String label, java.lang.String propName, StrVector eventSequence)
           
 void loadSLMSequence(java.lang.String slmLabel, java.util.List<byte[]> imageSequence)
           
 void loadStageSequence(java.lang.String stageLabel, DoubleVector positionSequence)
          Transfer a sequence of events/states/whatever to the device This should only be called for device-properties that are sequenceable
 void loadSystemConfiguration(java.lang.String fileName)
          Loads the system configuration from the text file conforming to the MM specific format.
 void loadSystemState(java.lang.String fileName)
          Loads the system configuration from the text file conforming to the MM specific format.
 void loadXYStageSequence(java.lang.String xyStageLabel, DoubleVector xSequence, DoubleVector ySequence)
           
 void logMessage(java.lang.String msg)
          Record text message in the log file.
 void logMessage(java.lang.String msg, boolean debugOnly)
          Record text message in the log file.
static void noop()
          A static method that does nothing.
 void pointGalvoAndFire(java.lang.String galvoLabel, double x, double y, double pulseTime_us)
           
 java.lang.Object popNextImage()
          Gets and removes the next image from the circular buffer.
 java.lang.Object popNextImageMD(long channel, long slice, Metadata md)
           
 java.lang.Object popNextImageMD(Metadata md)
           
 TaggedImage popNextTaggedImage()
           
 TaggedImage popNextTaggedImage(int cameraChannelIndex)
           
 void prepareSequenceAcquisition(java.lang.String cameraLabel)
          Prepare the camera for the sequence acquisition to save the time in the StartSequenceAcqusition() call which is supposed to come next.
 CharVector readFromSerialPort(java.lang.String portLabel)
          Reads the contents of the Rx buffer.
 void registerCallback(MMEventCallback cb)
          Register a callback (listener class).
 void removeImageSynchro(java.lang.String deviceLabel)
          Removes device from the image-synchro list.
 void removeImageSynchroAll()
          Clears the image synchro device list.
 void renameConfig(java.lang.String groupName, java.lang.String oldConfigName, java.lang.String newConfigName)
           
 void renameConfigGroup(java.lang.String oldGroupName, java.lang.String newGroupName)
          Renames a configuration group.
 void renamePixelSizeConfig(java.lang.String oldConfigName, java.lang.String newConfigName)
          Renames a pixel size configuration.
 void reset()
          Unloads all devices from the core, clears all configuration data and property blocks.
 void runGalvoPolygons(java.lang.String galvoLabel)
          Run a loop of galvo polygons
 void runGalvoSequence(java.lang.String galvoLabel)
          Run a sequence of galvo positions
 void saveSystemConfiguration(java.lang.String fileName)
          Saves the current system configuration to a text file of the MM specific format.
 void saveSystemState(java.lang.String fileName)
          Saves the current system state to a text file of the MM specific format.
 void setAdapterOrigin(double newZUm)
          Enable software translation of coordinates for the current focus/Z stage.
 void setAdapterOrigin(java.lang.String stageLabel, double newZUm)
          Enable software translation of coordinates for the given focus/Z stage.
 void setAdapterOriginXY(double newXUm, double newYUm)
          Enable software translation of coordinates for the current XY stage.
 void setAdapterOriginXY(java.lang.String xyStageLabel, double newXUm, double newYUm)
           
 void setAutoFocusDevice(java.lang.String focusLabel)
          Sets the current auto-focus device.
 void setAutoFocusOffset(double offset)
          Applies offset the one-shot focusing device.
 void setAutoShutter(boolean state)
          If this option is enabled Shutter automatically opens and closes when the image is acquired.
 void setCameraDevice(java.lang.String cameraLabel)
          Sets the current camera device.
 void setChannelGroup(java.lang.String channelGroup)
          Specifies the group determining the channel selection.
 void setCircularBufferMemoryFootprint(long sizeMB)
          Reserve memory for the circular buffer.
 void setConfig(java.lang.String groupName, java.lang.String configName)
          Applies a configuration to a group.
 void setDeviceAdapterSearchPaths(StrVector paths)
          Set the device adapter search paths.
 void setDeviceDelayMs(java.lang.String label, double delayMs)
          Overrides the built-in value for the action delay.
 void setExposure(double exp)
          Sets the exposure setting of the current camera in milliseconds.
 void setExposure(java.lang.String cameraLabel, double dExp)
          Sets the exposure setting of the specified camera in milliseconds.
 void setFocusDevice(java.lang.String focusLabel)
          Sets the current focus device.
 void setFocusDirection(java.lang.String stageLabel, int sign)
          Set the focus direction of a stage.
 void setGalvoDevice(java.lang.String galvoLabel)
          Sets the current galvo device.
 void setGalvoIlluminationState(java.lang.String galvoLabel, boolean on)
          Set the galvo's illumination state to on or off
 void setGalvoPolygonRepetitions(java.lang.String galvoLabel, int repetitions)
          Set the number of times to loop galvo polygons
 void setGalvoPosition(java.lang.String galvoLabel, double x, double y)
           
 void setGalvoSpotInterval(java.lang.String galvoLabel, double pulseTime_us)
           
 void setImageProcessorDevice(java.lang.String procLabel)
          Sets the current image processor device.
 void setMultiROI(java.util.List<java.awt.Rectangle> rects)
           
 void setMultiROI(UnsignedVector xs, UnsignedVector ys, UnsignedVector widths, UnsignedVector heights)
           
 void setOrigin()
          Zero the current focus/Z stage's coordinates at the current position.
 void setOrigin(java.lang.String stageLabel)
          Zero the given focus/Z stage's coordinates at the current position.
 void setOriginX()
          Zero the given XY stage's X coordinate at the current position.
 void setOriginX(java.lang.String xyStageLabel)
          Zero the given XY stage's X coordinate at the current position.
 void setOriginXY()
          Zero the current XY stage's coordinates at the current position.
 void setOriginXY(java.lang.String xyStageLabel)
          Zero the given XY stage's coordinates at the current position.
 void setOriginY()
          Zero the given XY stage's Y coordinate at the current position.
 void setOriginY(java.lang.String xyStageLabel)
          Zero the given XY stage's Y coordinate at the current position.
 void setParentLabel(java.lang.String deviceLabel, java.lang.String parentHubLabel)
          Sets parent device label
 void setPixelSizeAffine(java.lang.String resolutionID, DoubleVector affine)
          Sets the raw affine transform for the specific pixel size configuration The affine transform consists of the first two rows of a 3x3 matrix, the third row is alsways assumed to be 0.0 0.0 1.0.
 void setPixelSizeConfig(java.lang.String resolutionID)
          Applies a Pixel Size Configuration.
 void setPixelSizeUm(java.lang.String resolutionID, double pixSize)
          Sets pixel size in microns for the specified resolution sensing configuration preset.
 void setPosition(double position)
          Sets the position of the stage in microns.
 void setPosition(java.lang.String stageLabel, double position)
          Sets the position of the stage in microns.
 void setPrimaryLogFile(java.lang.String filename)
           
 void setPrimaryLogFile(java.lang.String filename, boolean truncate)
          Set the primary Core log file.
 void setProperty(java.lang.String label, java.lang.String propName, boolean propValue)
           
 void setProperty(java.lang.String label, java.lang.String propName, double propValue)
           
 void setProperty(java.lang.String label, java.lang.String propName, float propValue)
           
 void setProperty(java.lang.String label, java.lang.String propName, int propValue)
           
 void setProperty(java.lang.String label, java.lang.String propName, java.lang.String propValue)
           
 void setRelativePosition(double d)
          Sets the relative position of the stage in microns.
 void setRelativePosition(java.lang.String stageLabel, double d)
          Sets the relative position of the stage in microns.
 void setRelativeXYPosition(double dx, double dy)
          Sets the relative position of the XY stage in microns.
 void setRelativeXYPosition(java.lang.String xyStageLabel, double dx, double dy)
           
 void setROI(int x, int y, int xSize, int ySize)
           
 void setROI(java.lang.String label, int x, int y, int xSize, int ySize)
           
 void setSerialPortCommand(java.lang.String portLabel, java.lang.String command, java.lang.String term)
           
 void setSerialProperties(java.lang.String portName, java.lang.String answerTimeout, java.lang.String baudRate, java.lang.String delayBetweenCharsMs, java.lang.String handshaking, java.lang.String parity, java.lang.String stopBits)
           
 void setShutterDevice(java.lang.String shutterLabel)
          Sets the current shutter device.
 void setShutterOpen(boolean state)
          Opens or closes the currently selected (default) shutter.
 void setShutterOpen(java.lang.String shutterLabel, boolean state)
          Opens or closes the specified shutter.
 void setSLMDevice(java.lang.String slmLabel)
          Sets the current slm device.
 void setSLMExposure(java.lang.String slmLabel, double exposure_ms)
           
 void setSLMImage(java.lang.String slmLabel, byte[] pixels)
          Write a 32-bit color image to the SLM.
 void setSLMImage(java.lang.String slmLabel, int[] pixels)
          Write a 32-bit color image to the SLM.
 void setSLMPixelsTo(java.lang.String slmLabel, short intensity)
          Set all SLM pixels to a single 8-bit intensity.
 void setSLMPixelsTo(java.lang.String slmLabel, short red, short green, short blue)
           
 void setStageLinearSequence(java.lang.String stageLabel, double dZ_um, int nSlices)
           
 void setState(java.lang.String stateDeviceLabel, int state)
          Sets the state (position) on the specific device.
 void setStateLabel(java.lang.String stateDeviceLabel, java.lang.String stateLabel)
          Sets device state using the previously assigned label (string).
 void setSystemState(Configuration conf)
          Sets all properties contained in the Configuration object.
 void setTimeoutMs(int timeoutMs)
           
 void setXYPosition(double x, double y)
          Sets the position of the XY stage in microns.
 void setXYPosition(java.lang.String xyStageLabel, double x, double y)
           
 void setXYStageDevice(java.lang.String xyStageLabel)
          Sets the current XY device.
 void sleep(double intervalMs)
          Waits (blocks the calling thread) for specified time in milliseconds.
 void snapImage()
          Acquires a single image with current settings.
 void startContinuousSequenceAcquisition(double intervalMs)
          Starts the continuous camera sequence acquisition.
 void startExposureSequence(java.lang.String cameraLabel)
          Starts an ongoing sequence of triggered exposures in a camera This should only be called for cameras where exposure time is sequenceable
 void startPropertySequence(java.lang.String label, java.lang.String propName)
          Starts an ongoing sequence of triggered events in a property of a device This should only be called for device-properties that are sequenceable
 int startSecondaryLogFile(java.lang.String filename, boolean enableDebug)
           
 int startSecondaryLogFile(java.lang.String filename, boolean enableDebug, boolean truncate)
           
 int startSecondaryLogFile(java.lang.String filename, boolean enableDebug, boolean truncate, boolean synchronous)
           
 void startSequenceAcquisition(int numImages, double intervalMs, boolean stopOnOverflow)
           
 void startSequenceAcquisition(java.lang.String cameraLabel, int numImages, double intervalMs, boolean stopOnOverflow)
           
 void startSLMSequence(java.lang.String slmLabel)
           
 void startStageSequence(java.lang.String stageLabel)
          Starts an ongoing sequence of triggered events in a stage This should only be called for stages
 void startXYStageSequence(java.lang.String xyStageLabel)
          Starts an ongoing sequence of triggered events in an XY stage This should only be called for stages
 boolean stderrLogEnabled()
           
 void stop(java.lang.String xyOrZStageLabel)
          Stop the XY or focus/Z stage motors
 void stopExposureSequence(java.lang.String cameraLabel)
          Stops an ongoing sequence of triggered exposures in a camera This should only be called for cameras where exposure time is sequenceable
 void stopPropertySequence(java.lang.String label, java.lang.String propName)
          Stops an ongoing sequence of triggered events in a property of a device This should only be called for device-properties that are sequenceable
 void stopSecondaryLogFile(int handle)
          Stop capturing logging output into an additional file.
 void stopSequenceAcquisition()
          Stops streaming camera sequence acquisition.
 void stopSequenceAcquisition(java.lang.String cameraLabel)
          Stops streaming camera sequence acquisition for a specified camera.
 void stopSLMSequence(java.lang.String slmLabel)
           
 void stopStageSequence(java.lang.String stageLabel)
          Stops an ongoing sequence of triggered events in a stage This should only be called for stages that are sequenceable
 void stopXYStageSequence(java.lang.String xyStageLabel)
          Stops an ongoing sequence of triggered events in an XY stage This should only be called for stages that are sequenceable
 boolean supportsDeviceDetection(java.lang.String deviceLabel)
          Return whether or not the device supports automatic device detection (i.e.
 boolean systemBusy()
          Checks the busy status of the entire system.
 void unloadAllDevices()
          Unloads all devices from the core and resets all configuration data.
 void unloadDevice(java.lang.String label)
          Unloads the device from the core and adjusts all configuration data.
 void unloadLibrary(java.lang.String moduleName)
          Forcefully unload a library.
 void updateCoreProperties()
           
 void updateSystemStateCache()
          Updates the state of the entire hardware.
 boolean usesDeviceDelay(java.lang.String label)
          Signals if the device will use the delay setting or not.
 void waitForConfig(java.lang.String group, java.lang.String configName)
          Blocks until all devices included in the configuration become ready.
 void waitForDevice(java.lang.String label)
          Waits (blocks the calling thread) until the specified device becomes non-busy.
 void waitForDeviceType(DeviceType devType)
          Blocks until all devices of the specific type become ready (not-busy).
 void waitForImageSynchro()
          Wait for the slowest device in the ImageSynchro list.
 void waitForSystem()
          Blocks until all devices in the system become ready (not-busy).
 void writeToSerialPort(java.lang.String portLabel, CharVector data)
          Sends an array of characters to the serial port and returns immediately.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

swigCMemOwn

protected transient boolean swigCMemOwn
Constructor Detail

CMMCore

protected CMMCore(long cPtr,
                  boolean cMemoryOwn)

CMMCore

public CMMCore()
Constructor. Initializes buffers and error message text. It does not load any hardware devices at this point.

Method Detail

getCPtr

protected static long getCPtr(CMMCore obj)

finalize

protected void finalize()
Overrides:
finalize in class java.lang.Object

delete

public void delete()

getTaggedImage

public TaggedImage getTaggedImage(int cameraChannelIndex)
                           throws java.lang.Exception
Throws:
java.lang.Exception

getTaggedImage

public TaggedImage getTaggedImage()
                           throws java.lang.Exception
Throws:
java.lang.Exception

getLastTaggedImage

public TaggedImage getLastTaggedImage(int cameraChannelIndex)
                               throws java.lang.Exception
Throws:
java.lang.Exception

getLastTaggedImage

public TaggedImage getLastTaggedImage()
                               throws java.lang.Exception
Throws:
java.lang.Exception

getNBeforeLastTaggedImage

public TaggedImage getNBeforeLastTaggedImage(long n)
                                      throws java.lang.Exception
Throws:
java.lang.Exception

popNextTaggedImage

public TaggedImage popNextTaggedImage(int cameraChannelIndex)
                               throws java.lang.Exception
Throws:
java.lang.Exception

popNextTaggedImage

public TaggedImage popNextTaggedImage()
                               throws java.lang.Exception
Throws:
java.lang.Exception

getROI

public java.awt.Rectangle getROI()
                          throws java.lang.Exception
Throws:
java.lang.Exception

getROI

public java.awt.Rectangle getROI(java.lang.String label)
                          throws java.lang.Exception
Throws:
java.lang.Exception

getMultiROI

public java.util.List<java.awt.Rectangle> getMultiROI()
                                               throws java.lang.Exception
Throws:
java.lang.Exception

setMultiROI

public void setMultiROI(java.util.List<java.awt.Rectangle> rects)
                 throws java.lang.Exception
Throws:
java.lang.Exception

getPixelSizeAffineAsString

public java.lang.String getPixelSizeAffineAsString()
                                            throws java.lang.Exception
Convenience function. Retuns affine transform as a String Used in this class and by the acquisition engine (rather than duplicating this code there

Throws:
java.lang.Exception

getXYStagePosition

public java.awt.geom.Point2D.Double getXYStagePosition(java.lang.String stage)
                                                throws java.lang.Exception
Throws:
java.lang.Exception

getXYStagePosition

public java.awt.geom.Point2D.Double getXYStagePosition()
                                                throws java.lang.Exception
Convenience function: returns the current XY position of the current XY stage device as a Point2D.Double.

Throws:
java.lang.Exception

getGalvoPosition

public java.awt.geom.Point2D.Double getGalvoPosition(java.lang.String galvoDevice)
                                              throws java.lang.Exception
Throws:
java.lang.Exception

noop

public static void noop()
A static method that does nothing.


loadDevice

public void loadDevice(java.lang.String label,
                       java.lang.String moduleName,
                       java.lang.String deviceName)
                throws java.lang.Exception
Throws:
java.lang.Exception

unloadDevice

public void unloadDevice(java.lang.String label)
                  throws java.lang.Exception
Unloads the device from the core and adjusts all configuration data.

Throws:
java.lang.Exception

unloadAllDevices

public void unloadAllDevices()
                      throws java.lang.Exception
Unloads all devices from the core and resets all configuration data.

Throws:
java.lang.Exception

initializeAllDevices

public void initializeAllDevices()
                          throws java.lang.Exception
Calls Initialize() method for each loaded device. This method also initialized allowed values for core properties, based on the collection of loaded devices.

Throws:
java.lang.Exception

initializeDevice

public void initializeDevice(java.lang.String label)
                      throws java.lang.Exception
Initializes specific device.

Throws:
java.lang.Exception

reset

public void reset()
           throws java.lang.Exception
Unloads all devices from the core, clears all configuration data and property blocks.

Throws:
java.lang.Exception

unloadLibrary

public void unloadLibrary(java.lang.String moduleName)
                   throws java.lang.Exception
Forcefully unload a library. Experimental. Don't use.

Throws:
java.lang.Exception

updateCoreProperties

public void updateCoreProperties()
                          throws java.lang.Exception
Throws:
java.lang.Exception

getCoreErrorText

public java.lang.String getCoreErrorText(int code)

getVersionInfo

public java.lang.String getVersionInfo()
Displays core version.


getAPIVersionInfo

public java.lang.String getAPIVersionInfo()
Returns the module and device interface versions.


getSystemState

public Configuration getSystemState()
Returns the entire system state, i.e. the collection of all property values from all devices.

Returns:
Configuration object containing a collection of device-property-value triplets

setSystemState

public void setSystemState(Configuration conf)
Sets all properties contained in the Configuration object. The procedure will attempt to set each property it encounters, but won't stop if any of the properties fail or if the requested device is not present. It will just quietly continue.


getConfigState

public Configuration getConfigState(java.lang.String group,
                                    java.lang.String config)
                             throws java.lang.Exception
Returns a partial state of the system, only for devices included in the specified configuration.

Throws:
java.lang.Exception

getConfigGroupState

public Configuration getConfigGroupState(java.lang.String group)
                                  throws java.lang.Exception
Returns the partial state of the system, only for the devices included in the specified group. It will create a union of all devices referenced in a group.

Throws:
java.lang.Exception

saveSystemState

public void saveSystemState(java.lang.String fileName)
                     throws java.lang.Exception
Saves the current system state to a text file of the MM specific format. The file records only read-write properties. The file format is directly readable by the complementary loadSystemState() command.

Throws:
java.lang.Exception

loadSystemState

public void loadSystemState(java.lang.String fileName)
                     throws java.lang.Exception
Loads the system configuration from the text file conforming to the MM specific format. The configuration contains a list of commands to build the desired system state from read-write properties.

Throws:
java.lang.Exception

saveSystemConfiguration

public void saveSystemConfiguration(java.lang.String fileName)
                             throws java.lang.Exception
Saves the current system configuration to a text file of the MM specific format. The configuration file records only the information essential to the hardware setup: devices, labels, equipment pre-initialization properties, and configurations. The file format is the same as for the system state.

Throws:
java.lang.Exception

loadSystemConfiguration

public void loadSystemConfiguration(java.lang.String fileName)
                             throws java.lang.Exception
Loads the system configuration from the text file conforming to the MM specific format. The configuration contains a list of commands to build the desired system state: devices, labels, equipment, properties, and configurations.

Throws:
java.lang.Exception

registerCallback

public void registerCallback(MMEventCallback cb)
Register a callback (listener class). MMCore will send notifications on internal events using this interface


setPrimaryLogFile

public void setPrimaryLogFile(java.lang.String filename,
                              boolean truncate)
                       throws java.lang.Exception
Set the primary Core log file.

Throws:
java.lang.Exception

setPrimaryLogFile

public void setPrimaryLogFile(java.lang.String filename)
                       throws java.lang.Exception
Throws:
java.lang.Exception

getPrimaryLogFile

public java.lang.String getPrimaryLogFile()
Return the name of the primary Core log file.


logMessage

public void logMessage(java.lang.String msg)
Record text message in the log file.


logMessage

public void logMessage(java.lang.String msg,
                       boolean debugOnly)
Record text message in the log file.


enableDebugLog

public void enableDebugLog(boolean enable)
Enable or disable logging of debug messages.


debugLogEnabled

public boolean debugLogEnabled()

enableStderrLog

public void enableStderrLog(boolean enable)
Enables or disables log message display on the standard console.


stderrLogEnabled

public boolean stderrLogEnabled()

startSecondaryLogFile

public int startSecondaryLogFile(java.lang.String filename,
                                 boolean enableDebug,
                                 boolean truncate,
                                 boolean synchronous)
                          throws java.lang.Exception
Throws:
java.lang.Exception

startSecondaryLogFile

public int startSecondaryLogFile(java.lang.String filename,
                                 boolean enableDebug,
                                 boolean truncate)
                          throws java.lang.Exception
Throws:
java.lang.Exception

startSecondaryLogFile

public int startSecondaryLogFile(java.lang.String filename,
                                 boolean enableDebug)
                          throws java.lang.Exception
Throws:
java.lang.Exception

stopSecondaryLogFile

public void stopSecondaryLogFile(int handle)
                          throws java.lang.Exception
Stop capturing logging output into an additional file.

Throws:
java.lang.Exception

getDeviceAdapterSearchPaths

public StrVector getDeviceAdapterSearchPaths()
Return the current device adapter search paths.


setDeviceAdapterSearchPaths

public void setDeviceAdapterSearchPaths(StrVector paths)
Set the device adapter search paths.


addSearchPath

public static void addSearchPath(java.lang.String path)

getDeviceAdapterNames

public StrVector getDeviceAdapterNames()
                                throws java.lang.Exception
Return the names of discoverable device adapters.

Throws:
java.lang.Exception

getDeviceLibraries

public static StrVector getDeviceLibraries()
                                    throws java.lang.Exception
Throws:
java.lang.Exception

getAvailableDevices

public StrVector getAvailableDevices(java.lang.String library)
                              throws java.lang.Exception
Get available devices from the specified device library.

Throws:
java.lang.Exception

getAvailableDeviceDescriptions

public StrVector getAvailableDeviceDescriptions(java.lang.String library)
                                         throws java.lang.Exception
Get descriptions for available devices from the specified library.

Throws:
java.lang.Exception

getAvailableDeviceTypes

public LongVector getAvailableDeviceTypes(java.lang.String library)
                                   throws java.lang.Exception
Get type information for available devices from the specified library.

Throws:
java.lang.Exception

getLoadedDevices

public StrVector getLoadedDevices()
Returns an array of labels for currently loaded devices.

Returns:
array of labels

getLoadedDevicesOfType

public StrVector getLoadedDevicesOfType(DeviceType devType)
Returns an array of labels for currently loaded devices of specific type.

Returns:
array of labels

getDeviceType

public DeviceType getDeviceType(java.lang.String label)
                         throws java.lang.Exception
Returns device type.

Throws:
java.lang.Exception

getDeviceLibrary

public java.lang.String getDeviceLibrary(java.lang.String label)
                                  throws java.lang.Exception
Returns device library (aka module, device adapter) name.

Throws:
java.lang.Exception

getDeviceName

public java.lang.String getDeviceName(java.lang.String label)
                               throws java.lang.Exception
Returns device name for a given device label. "Name" is determined by the library and is immutable, while "label" is user assigned and represents a high-level handle to a device.

Throws:
java.lang.Exception

getDeviceDescription

public java.lang.String getDeviceDescription(java.lang.String label)
                                      throws java.lang.Exception
Returns description text for a given device label. "Description" is determined by the library and is immutable.

Throws:
java.lang.Exception

getDevicePropertyNames

public StrVector getDevicePropertyNames(java.lang.String label)
                                 throws java.lang.Exception
Returns all property names supported by the device.

Returns:
property name array
Throws:
java.lang.Exception

hasProperty

public boolean hasProperty(java.lang.String label,
                           java.lang.String propName)
                    throws java.lang.Exception
Checks if device has a property with a specified name. The exception will be thrown in case device label is not defined.

Throws:
java.lang.Exception

getProperty

public java.lang.String getProperty(java.lang.String label,
                                    java.lang.String propName)
                             throws java.lang.Exception
Returns the property value for the specified device.

Returns:
the property value
Throws:
java.lang.Exception

setProperty

public void setProperty(java.lang.String label,
                        java.lang.String propName,
                        java.lang.String propValue)
                 throws java.lang.Exception
Throws:
java.lang.Exception

setProperty

public void setProperty(java.lang.String label,
                        java.lang.String propName,
                        boolean propValue)
                 throws java.lang.Exception
Throws:
java.lang.Exception

setProperty

public void setProperty(java.lang.String label,
                        java.lang.String propName,
                        int propValue)
                 throws java.lang.Exception
Throws:
java.lang.Exception

setProperty

public void setProperty(java.lang.String label,
                        java.lang.String propName,
                        float propValue)
                 throws java.lang.Exception
Throws:
java.lang.Exception

setProperty

public void setProperty(java.lang.String label,
                        java.lang.String propName,
                        double propValue)
                 throws java.lang.Exception
Throws:
java.lang.Exception

getAllowedPropertyValues

public StrVector getAllowedPropertyValues(java.lang.String label,
                                          java.lang.String propName)
                                   throws java.lang.Exception
Returns all valid values for the specified property. If the array is empty it means that there are no restrictions for values. However, even if all values are allowed it is not guaranteed that all of them will be actually accepted by the device at run time.

Returns:
the array of values
Throws:
java.lang.Exception

isPropertyReadOnly

public boolean isPropertyReadOnly(java.lang.String label,
                                  java.lang.String propName)
                           throws java.lang.Exception
Tells us whether the property can be modified.

Returns:
true for a read-only property
Throws:
java.lang.Exception

isPropertyPreInit

public boolean isPropertyPreInit(java.lang.String label,
                                 java.lang.String propName)
                          throws java.lang.Exception
Tells us whether the property must be defined prior to initialization.

Returns:
true for pre-init property
Throws:
java.lang.Exception

isPropertySequenceable

public boolean isPropertySequenceable(java.lang.String label,
                                      java.lang.String propName)
                               throws java.lang.Exception
Queries device if the specified property can be used in a sequence

Throws:
java.lang.Exception

hasPropertyLimits

public boolean hasPropertyLimits(java.lang.String label,
                                 java.lang.String propName)
                          throws java.lang.Exception
Queries device if the specific property has limits.

Throws:
java.lang.Exception

getPropertyLowerLimit

public double getPropertyLowerLimit(java.lang.String label,
                                    java.lang.String propName)
                             throws java.lang.Exception
Returns the property lower limit value, if the property has limits - 0 otherwise.

Throws:
java.lang.Exception

getPropertyUpperLimit

public double getPropertyUpperLimit(java.lang.String label,
                                    java.lang.String propName)
                             throws java.lang.Exception
Returns the property upper limit value, if the property has limits - 0 otherwise.

Throws:
java.lang.Exception

getPropertyType

public PropertyType getPropertyType(java.lang.String label,
                                    java.lang.String propName)
                             throws java.lang.Exception
Returns the intrinsic property type.

Throws:
java.lang.Exception

startPropertySequence

public void startPropertySequence(java.lang.String label,
                                  java.lang.String propName)
                           throws java.lang.Exception
Starts an ongoing sequence of triggered events in a property of a device This should only be called for device-properties that are sequenceable

Throws:
java.lang.Exception

stopPropertySequence

public void stopPropertySequence(java.lang.String label,
                                 java.lang.String propName)
                          throws java.lang.Exception
Stops an ongoing sequence of triggered events in a property of a device This should only be called for device-properties that are sequenceable

Throws:
java.lang.Exception

getPropertySequenceMaxLength

public int getPropertySequenceMaxLength(java.lang.String label,
                                        java.lang.String propName)
                                 throws java.lang.Exception
Queries device property for the maximum number of events that can be put in a sequence

Throws:
java.lang.Exception

loadPropertySequence

public void loadPropertySequence(java.lang.String label,
                                 java.lang.String propName,
                                 StrVector eventSequence)
                          throws java.lang.Exception
Throws:
java.lang.Exception

deviceBusy

public boolean deviceBusy(java.lang.String label)
                   throws java.lang.Exception
Checks the busy status of the specific device.

Returns:
true if the device is busy
Throws:
java.lang.Exception

waitForDevice

public void waitForDevice(java.lang.String label)
                   throws java.lang.Exception
Waits (blocks the calling thread) until the specified device becomes non-busy.

Throws:
java.lang.Exception

waitForConfig

public void waitForConfig(java.lang.String group,
                          java.lang.String configName)
                   throws java.lang.Exception
Blocks until all devices included in the configuration become ready.

Throws:
java.lang.Exception

systemBusy

public boolean systemBusy()
                   throws java.lang.Exception
Checks the busy status of the entire system. The system will report busy if any of the devices is busy.

Returns:
status (true on busy)
Throws:
java.lang.Exception

waitForSystem

public void waitForSystem()
                   throws java.lang.Exception
Blocks until all devices in the system become ready (not-busy).

Throws:
java.lang.Exception

waitForImageSynchro

public void waitForImageSynchro()
                         throws java.lang.Exception
Wait for the slowest device in the ImageSynchro list.

Throws:
java.lang.Exception

deviceTypeBusy

public boolean deviceTypeBusy(DeviceType devType)
                       throws java.lang.Exception
Checks the busy status for all devices of the specific type. The system will report busy if any of the devices of the specified type are busy.

Returns:
true on busy
Throws:
java.lang.Exception

waitForDeviceType

public void waitForDeviceType(DeviceType devType)
                       throws java.lang.Exception
Blocks until all devices of the specific type become ready (not-busy).

Throws:
java.lang.Exception

getDeviceDelayMs

public double getDeviceDelayMs(java.lang.String label)
                        throws java.lang.Exception
Reports action delay in milliseconds for the specific device. The delay is used in the synchronization process to ensure that the action is performed, without polling. Value of "0" means that action is either blocking or that polling of device status is required. Some devices ignore this setting.

Returns:
the delay time in milliseconds
Throws:
java.lang.Exception

setDeviceDelayMs

public void setDeviceDelayMs(java.lang.String label,
                             double delayMs)
                      throws java.lang.Exception
Overrides the built-in value for the action delay. Some devices ignore this setting.

Throws:
java.lang.Exception

usesDeviceDelay

public boolean usesDeviceDelay(java.lang.String label)
                        throws java.lang.Exception
Signals if the device will use the delay setting or not.

Returns:
true if the device uses a delay
Throws:
java.lang.Exception

setTimeoutMs

public void setTimeoutMs(int timeoutMs)

getTimeoutMs

public int getTimeoutMs()

sleep

public void sleep(double intervalMs)
Waits (blocks the calling thread) for specified time in milliseconds.


getCameraDevice

public java.lang.String getCameraDevice()
Returns the label of the currently selected camera device.

Returns:
camera name

getShutterDevice

public java.lang.String getShutterDevice()
Returns the label of the currently selected shutter device.

Returns:
shutter name

getFocusDevice

public java.lang.String getFocusDevice()
Returns the label of the currently selected focus device.

Returns:
focus stage name

getXYStageDevice

public java.lang.String getXYStageDevice()
Returns the label of the currently selected XYStage device.


getAutoFocusDevice

public java.lang.String getAutoFocusDevice()
Returns the label of the currently selected auto-focus device.


getImageProcessorDevice

public java.lang.String getImageProcessorDevice()
Returns the label of the currently selected image processor device.


getSLMDevice

public java.lang.String getSLMDevice()
Returns the label of the currently selected SLM device.

Returns:
slm name

getGalvoDevice

public java.lang.String getGalvoDevice()
Returns the label of the currently selected Galvo device.

Returns:
galvo name

getChannelGroup

public java.lang.String getChannelGroup()
Returns the group determining the channel selection.


setCameraDevice

public void setCameraDevice(java.lang.String cameraLabel)
                     throws java.lang.Exception
Sets the current camera device.

Throws:
java.lang.Exception

setShutterDevice

public void setShutterDevice(java.lang.String shutterLabel)
                      throws java.lang.Exception
Sets the current shutter device.

Throws:
java.lang.Exception

setFocusDevice

public void setFocusDevice(java.lang.String focusLabel)
                    throws java.lang.Exception
Sets the current focus device.

Throws:
java.lang.Exception

setXYStageDevice

public void setXYStageDevice(java.lang.String xyStageLabel)
                      throws java.lang.Exception
Sets the current XY device.

Throws:
java.lang.Exception

setAutoFocusDevice

public void setAutoFocusDevice(java.lang.String focusLabel)
                        throws java.lang.Exception
Sets the current auto-focus device.

Throws:
java.lang.Exception

setImageProcessorDevice

public void setImageProcessorDevice(java.lang.String procLabel)
                             throws java.lang.Exception
Sets the current image processor device.

Throws:
java.lang.Exception

setSLMDevice

public void setSLMDevice(java.lang.String slmLabel)
                  throws java.lang.Exception
Sets the current slm device.

Throws:
java.lang.Exception

setGalvoDevice

public void setGalvoDevice(java.lang.String galvoLabel)
                    throws java.lang.Exception
Sets the current galvo device.

Throws:
java.lang.Exception

setChannelGroup

public void setChannelGroup(java.lang.String channelGroup)
                     throws java.lang.Exception
Specifies the group determining the channel selection.

Throws:
java.lang.Exception

getSystemStateCache

public Configuration getSystemStateCache()
Returns the entire system state, i.e. the collection of all property values from all devices. This method will return cached values instead of querying each device

Returns:
Configuration object containing a collection of device-property-value triplets

updateSystemStateCache

public void updateSystemStateCache()
Updates the state of the entire hardware.


getPropertyFromCache

public java.lang.String getPropertyFromCache(java.lang.String deviceLabel,
                                             java.lang.String propName)
                                      throws java.lang.Exception
Returns the cached property value for the specified device.

Returns:
the property value
Throws:
java.lang.Exception

getCurrentConfigFromCache

public java.lang.String getCurrentConfigFromCache(java.lang.String groupName)
                                           throws java.lang.Exception
Returns the configuration for a given group based on the data in the cache. An empty string is a valid return value, since the system state will not always correspond to any of the defined configurations. Also, in general it is possible that the system state fits multiple configurations. This method will return only the first matching configuration, if any.

Returns:
The cache's current configuration preset name
Throws:
java.lang.Exception

getConfigGroupStateFromCache

public Configuration getConfigGroupStateFromCache(java.lang.String group)
                                           throws java.lang.Exception
Returns the partial state of the system cache, only for the devices included in the specified group. It will create a union of all devices referenced in a group.

Throws:
java.lang.Exception

defineConfig

public void defineConfig(java.lang.String groupName,
                         java.lang.String configName)
                  throws java.lang.Exception
Defines a configuration. If the configuration group/name was not previously defined a new configuration will be automatically created; otherwise nothing happens.

Throws:
java.lang.Exception

defineConfig

public void defineConfig(java.lang.String groupName,
                         java.lang.String configName,
                         java.lang.String deviceLabel,
                         java.lang.String propName,
                         java.lang.String value)
                  throws java.lang.Exception
Throws:
java.lang.Exception

defineConfigGroup

public void defineConfigGroup(java.lang.String groupName)
                       throws java.lang.Exception
Creates an empty configuration group.

Throws:
java.lang.Exception

deleteConfigGroup

public void deleteConfigGroup(java.lang.String groupName)
                       throws java.lang.Exception
Deletes an entire configuration group.

Throws:
java.lang.Exception

renameConfigGroup

public void renameConfigGroup(java.lang.String oldGroupName,
                              java.lang.String newGroupName)
                       throws java.lang.Exception
Renames a configuration group.

Throws:
java.lang.Exception

isGroupDefined

public boolean isGroupDefined(java.lang.String groupName)
Checks if the group already exists.

Returns:
true if the group is already defined

isConfigDefined

public boolean isConfigDefined(java.lang.String groupName,
                               java.lang.String configName)
Checks if the configuration already exists within a group.

Returns:
true if the configuration is already defined

setConfig

public void setConfig(java.lang.String groupName,
                      java.lang.String configName)
               throws java.lang.Exception
Applies a configuration to a group. The command will fail if the configuration was not previously defined.

Throws:
java.lang.Exception

deleteConfig

public void deleteConfig(java.lang.String groupName,
                         java.lang.String configName)
                  throws java.lang.Exception
Deletes a configuration from a group. The command will fail if the configuration was not previously defined.

Throws:
java.lang.Exception

deleteConfig

public void deleteConfig(java.lang.String groupName,
                         java.lang.String configName,
                         java.lang.String deviceLabel,
                         java.lang.String propName)
                  throws java.lang.Exception
Throws:
java.lang.Exception

renameConfig

public void renameConfig(java.lang.String groupName,
                         java.lang.String oldConfigName,
                         java.lang.String newConfigName)
                  throws java.lang.Exception
Throws:
java.lang.Exception

getAvailableConfigGroups

public StrVector getAvailableConfigGroups()
Returns the names of all defined configuration groups

Returns:
an array of names of configuration groups

getAvailableConfigs

public StrVector getAvailableConfigs(java.lang.String configGroup)
Returns all defined configuration names in a given group

Returns:
an array of configuration names

getCurrentConfig

public java.lang.String getCurrentConfig(java.lang.String groupName)
                                  throws java.lang.Exception
Returns the current configuration for a given group. An empty string is a valid return value, since the system state will not always correspond to any of the defined configurations. Also, in general it is possible that the system state fits multiple configurations. This method will return only the first matching configuration, if any.

Returns:
The current configuration preset's name
Throws:
java.lang.Exception

getConfigData

public Configuration getConfigData(java.lang.String configGroup,
                                   java.lang.String configName)
                            throws java.lang.Exception
Returns the configuration object for a given group and name.

Returns:
The configuration object
Throws:
java.lang.Exception

getCurrentPixelSizeConfig

public java.lang.String getCurrentPixelSizeConfig()
                                           throws java.lang.Exception
Get the current pixel configuration name

Throws:
java.lang.Exception

getCurrentPixelSizeConfig

public java.lang.String getCurrentPixelSizeConfig(boolean cached)
                                           throws java.lang.Exception
Get the current pixel configuration name

Throws:
java.lang.Exception

getPixelSizeUm

public double getPixelSizeUm()
Returns the current pixel size in microns. This method is based on sensing the current pixel size configuration and adjusting for the binning.


getPixelSizeUm

public double getPixelSizeUm(boolean cached)
Returns the current pixel size in microns. This method is based on sensing the current pixel size configuration and adjusting for the binning.


getPixelSizeUmByID

public double getPixelSizeUmByID(java.lang.String resolutionID)
                          throws java.lang.Exception
Returns the pixel size in um for the requested pixel size group

Throws:
java.lang.Exception

getPixelSizeAffine

public DoubleVector getPixelSizeAffine()
                                throws java.lang.Exception
Returns the current Affine Transform to related camera pixels with stage movement.. This function returns the stored affine transform corrected for binning

Throws:
java.lang.Exception

getPixelSizeAffine

public DoubleVector getPixelSizeAffine(boolean cached)
                                throws java.lang.Exception
Returns the current Affine Transform to related camera pixels with stage movement.. This function returns the stored affine transform corrected for binning and known magnification devices

Throws:
java.lang.Exception

getPixelSizeAffineByID

public DoubleVector getPixelSizeAffineByID(java.lang.String resolutionID)
                                    throws java.lang.Exception
Returns the Affine Transform to related camera pixels with stage movement for the requested pixel size group The raw affine transform without correction for binning and magnification will be returned.

Throws:
java.lang.Exception

getMagnificationFactor

public double getMagnificationFactor()
Returns the product of all Magnifiers in the system or 1.0 when none is found This is used internally by GetPixelSizeUm

Returns:
products of all magnifier devices in the system or 1.0 when none is found

setPixelSizeUm

public void setPixelSizeUm(java.lang.String resolutionID,
                           double pixSize)
                    throws java.lang.Exception
Sets pixel size in microns for the specified resolution sensing configuration preset.

Throws:
java.lang.Exception

setPixelSizeAffine

public void setPixelSizeAffine(java.lang.String resolutionID,
                               DoubleVector affine)
                        throws java.lang.Exception
Sets the raw affine transform for the specific pixel size configuration The affine transform consists of the first two rows of a 3x3 matrix, the third row is alsways assumed to be 0.0 0.0 1.0. The transform should be valid for binning 1 and no magnification device (as given by the getMagnification() function). Order: row[0]col[0] row[0]c[1] row[0]c[2] row[1]c[0] row[1]c[1] row[1]c[2] The given vector has to have 6 doubles, or bad stuff will happen

Throws:
java.lang.Exception

definePixelSizeConfig

public void definePixelSizeConfig(java.lang.String resolutionID,
                                  java.lang.String deviceLabel,
                                  java.lang.String propName,
                                  java.lang.String value)
                           throws java.lang.Exception
Throws:
java.lang.Exception

definePixelSizeConfig

public void definePixelSizeConfig(java.lang.String resolutionID)
                           throws java.lang.Exception
Defines an empty pixel size entry.

Throws:
java.lang.Exception

getAvailablePixelSizeConfigs

public StrVector getAvailablePixelSizeConfigs()
Returns all defined resolution preset names

Returns:
an array of resolution presets

isPixelSizeConfigDefined

public boolean isPixelSizeConfigDefined(java.lang.String resolutionID)
                                 throws java.lang.Exception
Checks if the Pixel Size Resolution already exists

Returns:
true if the configuration is already defined
Throws:
java.lang.Exception

setPixelSizeConfig

public void setPixelSizeConfig(java.lang.String resolutionID)
                        throws java.lang.Exception
Applies a Pixel Size Configuration. The command will fail if the configuration was not previously defined.

Throws:
java.lang.Exception

renamePixelSizeConfig

public void renamePixelSizeConfig(java.lang.String oldConfigName,
                                  java.lang.String newConfigName)
                           throws java.lang.Exception
Renames a pixel size configuration. The command will fail if the configuration was not previously defined.

Throws:
java.lang.Exception

deletePixelSizeConfig

public void deletePixelSizeConfig(java.lang.String configName)
                           throws java.lang.Exception
Deletes a pixel size configuration. The command will fail if the configuration was not previously defined.

Throws:
java.lang.Exception

getPixelSizeConfigData

public Configuration getPixelSizeConfigData(java.lang.String configName)
                                     throws java.lang.Exception
Returns the configuration object for a give pixel size preset.

Returns:
The configuration object
Throws:
java.lang.Exception

definePropertyBlock

public void definePropertyBlock(java.lang.String blockName,
                                java.lang.String propertyName,
                                java.lang.String propertyValue)

getAvailablePropertyBlocks

public StrVector getAvailablePropertyBlocks()
Returns all defined property block identifiers.


getPropertyBlockData

public PropertyBlock getPropertyBlockData(java.lang.String blockName)
Returns the collection of property-value pairs defined in this block.


setROI

public void setROI(int x,
                   int y,
                   int xSize,
                   int ySize)
            throws java.lang.Exception
Throws:
java.lang.Exception

setROI

public void setROI(java.lang.String label,
                   int x,
                   int y,
                   int xSize,
                   int ySize)
            throws java.lang.Exception
Throws:
java.lang.Exception

getROI

public void getROI(int[] x,
                   int[] y,
                   int[] xSize,
                   int[] ySize)
            throws java.lang.Exception
Throws:
java.lang.Exception

getROI

public void getROI(java.lang.String label,
                   int[] x,
                   int[] y,
                   int[] xSize,
                   int[] ySize)
            throws java.lang.Exception
Throws:
java.lang.Exception

clearROI

public void clearROI()
              throws java.lang.Exception
Set the region of interest of the current camera to the full frame.

Throws:
java.lang.Exception

isMultiROISupported

public boolean isMultiROISupported()
                            throws java.lang.Exception
Queries the camera to determine if it supports multiple ROIs.

Throws:
java.lang.Exception

isMultiROIEnabled

public boolean isMultiROIEnabled()
                          throws java.lang.Exception
Queries the camera to determine if multiple ROIs are currently set.

Throws:
java.lang.Exception

setMultiROI

public void setMultiROI(UnsignedVector xs,
                        UnsignedVector ys,
                        UnsignedVector widths,
                        UnsignedVector heights)
                 throws java.lang.Exception
Throws:
java.lang.Exception

getMultiROI

public void getMultiROI(UnsignedVector xs,
                        UnsignedVector ys,
                        UnsignedVector widths,
                        UnsignedVector heights)
                 throws java.lang.Exception
Throws:
java.lang.Exception

setExposure

public void setExposure(double exp)
                 throws java.lang.Exception
Sets the exposure setting of the current camera in milliseconds.

Throws:
java.lang.Exception

setExposure

public void setExposure(java.lang.String cameraLabel,
                        double dExp)
                 throws java.lang.Exception
Sets the exposure setting of the specified camera in milliseconds.

Throws:
java.lang.Exception

getExposure

public double getExposure()
                   throws java.lang.Exception
Returns the current exposure setting of the camera in milliseconds.

Returns:
the exposure time in milliseconds
Throws:
java.lang.Exception

getExposure

public double getExposure(java.lang.String label)
                   throws java.lang.Exception
Returns the current exposure setting of the specified camera in milliseconds.

Returns:
the exposure time in milliseconds
Throws:
java.lang.Exception

snapImage

public void snapImage()
               throws java.lang.Exception
Acquires a single image with current settings. Snap is not allowed while the acquisition thread is run

Throws:
java.lang.Exception

getImage

public java.lang.Object getImage()
                          throws java.lang.Exception
Exposes the internal image buffer.

Returns:
a pointer to the internal image buffer.
Throws:
java.lang.Exception

getImage

public java.lang.Object getImage(long numChannel)
                          throws java.lang.Exception
Returns the internal image buffer for a given Camera Channel

Returns:
a pointer to the internal image buffer.
Throws:
java.lang.Exception

getImageWidth

public long getImageWidth()
Horizontal dimension of the image buffer in pixels.

Returns:
the width in pixels (an integer)

getImageHeight

public long getImageHeight()
Vertical dimension of the image buffer in pixels.

Returns:
the height in pixels (an integer)

getBytesPerPixel

public long getBytesPerPixel()
How many bytes for each pixel. This value does not necessarily reflect the capabilities of the particular camera A/D converter.

Returns:
the number of bytes

getImageBitDepth

public long getImageBitDepth()
How many bits of dynamic range are to be expected from the camera. This value should be used only as a guideline - it does not guarantee that image buffer will contain only values from the returned dynamic range.

Returns:
the number of bits

getNumberOfComponents

public long getNumberOfComponents()
Returns the number of components the default camera is returning. For example color camera will return 4 components (RGBA) on each snap.


getNumberOfCameraChannels

public long getNumberOfCameraChannels()
Returns the number of simultaneous channels the default camera is returning.


getCameraChannelName

public java.lang.String getCameraChannelName(long channelNr)

getImageBufferSize

public int getImageBufferSize()
Returns the size of the internal image buffer.

Returns:
buffer size

assignImageSynchro

public void assignImageSynchro(java.lang.String deviceLabel)
                        throws java.lang.Exception
Add device to the image-synchro list. Image acquisition waits for all devices in this list.

Throws:
java.lang.Exception

removeImageSynchro

public void removeImageSynchro(java.lang.String deviceLabel)
                        throws java.lang.Exception
Removes device from the image-synchro list.

Throws:
java.lang.Exception

removeImageSynchroAll

public void removeImageSynchroAll()
Clears the image synchro device list.


setAutoShutter

public void setAutoShutter(boolean state)
If this option is enabled Shutter automatically opens and closes when the image is acquired.


getAutoShutter

public boolean getAutoShutter()
Returns the current setting of the auto-shutter option.


setShutterOpen

public void setShutterOpen(boolean state)
                    throws java.lang.Exception
Opens or closes the currently selected (default) shutter.

Throws:
java.lang.Exception

getShutterOpen

public boolean getShutterOpen()
                       throws java.lang.Exception
Returns the state of the currently selected (default) shutter.

Throws:
java.lang.Exception

setShutterOpen

public void setShutterOpen(java.lang.String shutterLabel,
                           boolean state)
                    throws java.lang.Exception
Opens or closes the specified shutter.

Throws:
java.lang.Exception

getShutterOpen

public boolean getShutterOpen(java.lang.String shutterLabel)
                       throws java.lang.Exception
Returns the state of the specified shutter.

Throws:
java.lang.Exception

startSequenceAcquisition

public void startSequenceAcquisition(int numImages,
                                     double intervalMs,
                                     boolean stopOnOverflow)
                              throws java.lang.Exception
Throws:
java.lang.Exception

startSequenceAcquisition

public void startSequenceAcquisition(java.lang.String cameraLabel,
                                     int numImages,
                                     double intervalMs,
                                     boolean stopOnOverflow)
                              throws java.lang.Exception
Throws:
java.lang.Exception

prepareSequenceAcquisition

public void prepareSequenceAcquisition(java.lang.String cameraLabel)
                                throws java.lang.Exception
Prepare the camera for the sequence acquisition to save the time in the StartSequenceAcqusition() call which is supposed to come next.

Throws:
java.lang.Exception

startContinuousSequenceAcquisition

public void startContinuousSequenceAcquisition(double intervalMs)
                                        throws java.lang.Exception
Starts the continuous camera sequence acquisition. This command does not block the calling thread for the duration of the acquisition.

Throws:
java.lang.Exception

stopSequenceAcquisition

public void stopSequenceAcquisition()
                             throws java.lang.Exception
Stops streaming camera sequence acquisition.

Throws:
java.lang.Exception

stopSequenceAcquisition

public void stopSequenceAcquisition(java.lang.String cameraLabel)
                             throws java.lang.Exception
Stops streaming camera sequence acquisition for a specified camera.

Throws:
java.lang.Exception

isSequenceRunning

public boolean isSequenceRunning()
Check if the current camera is acquiring the sequence Returns false when the sequence is done


isSequenceRunning

public boolean isSequenceRunning(java.lang.String cameraLabel)
                          throws java.lang.Exception
Check if the specified camera is acquiring the sequence Returns false when the sequence is done

Throws:
java.lang.Exception

getLastImage

public java.lang.Object getLastImage()
                              throws java.lang.Exception
Gets the last image from the circular buffer. Returns 0 if the buffer is empty.

Throws:
java.lang.Exception

popNextImage

public java.lang.Object popNextImage()
                              throws java.lang.Exception
Gets and removes the next image from the circular buffer. Returns 0 if the buffer is empty.

Throws:
java.lang.Exception

getLastImageMD

public java.lang.Object getLastImageMD(long channel,
                                       long slice,
                                       Metadata md)
                                throws java.lang.Exception
Throws:
java.lang.Exception

popNextImageMD

public java.lang.Object popNextImageMD(long channel,
                                       long slice,
                                       Metadata md)
                                throws java.lang.Exception
Throws:
java.lang.Exception

getLastImageMD

public java.lang.Object getLastImageMD(Metadata md)
                                throws java.lang.Exception
Returns a pointer to the pixels of the image that was last inserted into the circular buffer Also provides all metadata associated with that image

Throws:
java.lang.Exception

getNBeforeLastImageMD

public java.lang.Object getNBeforeLastImageMD(long n,
                                              Metadata md)
                                       throws java.lang.Exception
Returns a pointer to the pixels of the image that was inserted n images ago Also provides all metadata associated with that image

Throws:
java.lang.Exception

popNextImageMD

public java.lang.Object popNextImageMD(Metadata md)
                                throws java.lang.Exception
Throws:
java.lang.Exception

getRemainingImageCount

public int getRemainingImageCount()

getBufferTotalCapacity

public int getBufferTotalCapacity()

getBufferFreeCapacity

public int getBufferFreeCapacity()

isBufferOverflowed

public boolean isBufferOverflowed()

setCircularBufferMemoryFootprint

public void setCircularBufferMemoryFootprint(long sizeMB)
                                      throws java.lang.Exception
Reserve memory for the circular buffer.

Throws:
java.lang.Exception

getCircularBufferMemoryFootprint

public long getCircularBufferMemoryFootprint()

initializeCircularBuffer

public void initializeCircularBuffer()
                              throws java.lang.Exception
Initialize circular buffer based on the current camera settings.

Throws:
java.lang.Exception

clearCircularBuffer

public void clearCircularBuffer()
                         throws java.lang.Exception
Removes all images from the circular buffer.

Throws:
java.lang.Exception

isExposureSequenceable

public boolean isExposureSequenceable(java.lang.String cameraLabel)
                               throws java.lang.Exception
Queries camera if exposure can be used in a sequence

Returns:
true if exposure can be sequenced
Throws:
java.lang.Exception

startExposureSequence

public void startExposureSequence(java.lang.String cameraLabel)
                           throws java.lang.Exception
Starts an ongoing sequence of triggered exposures in a camera This should only be called for cameras where exposure time is sequenceable

Throws:
java.lang.Exception

stopExposureSequence

public void stopExposureSequence(java.lang.String cameraLabel)
                          throws java.lang.Exception
Stops an ongoing sequence of triggered exposures in a camera This should only be called for cameras where exposure time is sequenceable

Throws:
java.lang.Exception

getExposureSequenceMaxLength

public int getExposureSequenceMaxLength(java.lang.String cameraLabel)
                                 throws java.lang.Exception
Gets the maximum length of a camera's exposure sequence. This should only be called for cameras where exposure time is sequenceable

Throws:
java.lang.Exception

loadExposureSequence

public void loadExposureSequence(java.lang.String cameraLabel,
                                 DoubleVector exposureSequence_ms)
                          throws java.lang.Exception
Transfer a sequence of exposure times to the camera. This should only be called for cameras where exposure time is sequenceable

Throws:
java.lang.Exception

getLastFocusScore

public double getLastFocusScore()
Returns the latest focus score from the focusing device. Use this value to estimate or record how reliable the focus is. The range of values is device dependent.


getCurrentFocusScore

public double getCurrentFocusScore()
Returns the focus score from the default focusing device measured at the current Z position. Use this value to create profiles or just to verify that the image is in focus. The absolute range of returned scores depends on the actual focusing device.


enableContinuousFocus

public void enableContinuousFocus(boolean enable)
                           throws java.lang.Exception
Enables or disables the operation of the continuous focusing hardware device.

Throws:
java.lang.Exception

isContinuousFocusEnabled

public boolean isContinuousFocusEnabled()
                                 throws java.lang.Exception
Checks if the continuous focusing hardware device is ON or OFF.

Throws:
java.lang.Exception

isContinuousFocusLocked

public boolean isContinuousFocusLocked()
                                throws java.lang.Exception
Returns the lock-in status of the continuous focusing device.

Throws:
java.lang.Exception

isContinuousFocusDrive

public boolean isContinuousFocusDrive(java.lang.String stageLabel)
                               throws java.lang.Exception
Check if a stage has continuous focusing capability (positions can be set while continuous focus runs).

Throws:
java.lang.Exception

fullFocus

public void fullFocus()
               throws java.lang.Exception
Performs focus acquisition and lock for the one-shot focusing device.

Throws:
java.lang.Exception

incrementalFocus

public void incrementalFocus()
                      throws java.lang.Exception
Performs incremental focus for the one-shot focusing device.

Throws:
java.lang.Exception

setAutoFocusOffset

public void setAutoFocusOffset(double offset)
                        throws java.lang.Exception
Applies offset the one-shot focusing device.

Throws:
java.lang.Exception

getAutoFocusOffset

public double getAutoFocusOffset()
                          throws java.lang.Exception
Measures offset for the one-shot focusing device.

Throws:
java.lang.Exception

setState

public void setState(java.lang.String stateDeviceLabel,
                     int state)
              throws java.lang.Exception
Sets the state (position) on the specific device. The command will fail if the device does not support states.

Throws:
java.lang.Exception

getState

public int getState(java.lang.String stateDeviceLabel)
             throws java.lang.Exception
Returns the current state (position) on the specific device. The command will fail if the device does not support states.

Returns:
the current state
Throws:
java.lang.Exception

getNumberOfStates

public int getNumberOfStates(java.lang.String stateDeviceLabel)
Returns the total number of available positions (states).


setStateLabel

public void setStateLabel(java.lang.String stateDeviceLabel,
                          java.lang.String stateLabel)
                   throws java.lang.Exception
Sets device state using the previously assigned label (string).

Throws:
java.lang.Exception

getStateLabel

public java.lang.String getStateLabel(java.lang.String stateDeviceLabel)
                               throws java.lang.Exception
Returns the current state as the label (string).

Returns:
the current state's label
Throws:
java.lang.Exception

defineStateLabel

public void defineStateLabel(java.lang.String stateDeviceLabel,
                             int state,
                             java.lang.String stateLabel)
                      throws java.lang.Exception
Throws:
java.lang.Exception

getStateLabels

public StrVector getStateLabels(java.lang.String stateDeviceLabel)
                         throws java.lang.Exception
Return labels for all states

Returns:
an array of state labels
Throws:
java.lang.Exception

getStateFromLabel

public int getStateFromLabel(java.lang.String stateDeviceLabel,
                             java.lang.String stateLabel)
                      throws java.lang.Exception
Obtain the state for a given label.

Returns:
the state (an integer)
Throws:
java.lang.Exception

getStateLabelData

public PropertyBlock getStateLabelData(java.lang.String stateDeviceLabel,
                                       java.lang.String stateLabel)
Returns the collection of property-value pairs defined for the specific device and state label.


getData

public PropertyBlock getData(java.lang.String stateDeviceLabel)
Returns the collection of property-value pairs defined for the current state.


setPosition

public void setPosition(java.lang.String stageLabel,
                        double position)
                 throws java.lang.Exception
Sets the position of the stage in microns.

Throws:
java.lang.Exception

setPosition

public void setPosition(double position)
                 throws java.lang.Exception
Sets the position of the stage in microns. Uses the current Z positioner (focus) device.

Throws:
java.lang.Exception

getPosition

public double getPosition(java.lang.String stageLabel)
                   throws java.lang.Exception
Returns the current position of the stage in microns.

Returns:
the position in microns
Throws:
java.lang.Exception

getPosition

public double getPosition()
                   throws java.lang.Exception
Returns the current position of the stage in microns. Uses the current Z positioner (focus) device.

Returns:
the position in microns
Throws:
java.lang.Exception

setRelativePosition

public void setRelativePosition(java.lang.String stageLabel,
                                double d)
                         throws java.lang.Exception
Sets the relative position of the stage in microns.

Throws:
java.lang.Exception

setRelativePosition

public void setRelativePosition(double d)
                         throws java.lang.Exception
Sets the relative position of the stage in microns. Uses the current Z positioner (focus) device.

Throws:
java.lang.Exception

setOrigin

public void setOrigin(java.lang.String stageLabel)
               throws java.lang.Exception
Zero the given focus/Z stage's coordinates at the current position.

Throws:
java.lang.Exception

setOrigin

public void setOrigin()
               throws java.lang.Exception
Zero the current focus/Z stage's coordinates at the current position.

Throws:
java.lang.Exception

setAdapterOrigin

public void setAdapterOrigin(java.lang.String stageLabel,
                             double newZUm)
                      throws java.lang.Exception
Enable software translation of coordinates for the given focus/Z stage.

Throws:
java.lang.Exception

setAdapterOrigin

public void setAdapterOrigin(double newZUm)
                      throws java.lang.Exception
Enable software translation of coordinates for the current focus/Z stage.

Throws:
java.lang.Exception

setFocusDirection

public void setFocusDirection(java.lang.String stageLabel,
                              int sign)
Set the focus direction of a stage.


getFocusDirection

public int getFocusDirection(java.lang.String stageLabel)
                      throws java.lang.Exception
Get the focus direction of a stage.

Throws:
java.lang.Exception

isStageSequenceable

public boolean isStageSequenceable(java.lang.String stageLabel)
                            throws java.lang.Exception
Queries stage if it can be used in a sequence

Returns:
true if the stage can be sequenced
Throws:
java.lang.Exception

isStageLinearSequenceable

public boolean isStageLinearSequenceable(java.lang.String stageLabel)
                                  throws java.lang.Exception
Throws:
java.lang.Exception

startStageSequence

public void startStageSequence(java.lang.String stageLabel)
                        throws java.lang.Exception
Starts an ongoing sequence of triggered events in a stage This should only be called for stages

Throws:
java.lang.Exception

stopStageSequence

public void stopStageSequence(java.lang.String stageLabel)
                       throws java.lang.Exception
Stops an ongoing sequence of triggered events in a stage This should only be called for stages that are sequenceable

Throws:
java.lang.Exception

getStageSequenceMaxLength

public int getStageSequenceMaxLength(java.lang.String stageLabel)
                              throws java.lang.Exception
Gets the maximum length of a stage's position sequence. This should only be called for stages that are sequenceable

Returns:
the maximum length (integer)
Throws:
java.lang.Exception

loadStageSequence

public void loadStageSequence(java.lang.String stageLabel,
                              DoubleVector positionSequence)
                       throws java.lang.Exception
Transfer a sequence of events/states/whatever to the device This should only be called for device-properties that are sequenceable

Throws:
java.lang.Exception

setStageLinearSequence

public void setStageLinearSequence(java.lang.String stageLabel,
                                   double dZ_um,
                                   int nSlices)
                            throws java.lang.Exception
Throws:
java.lang.Exception

setXYPosition

public void setXYPosition(java.lang.String xyStageLabel,
                          double x,
                          double y)
                   throws java.lang.Exception
Throws:
java.lang.Exception

setXYPosition

public void setXYPosition(double x,
                          double y)
                   throws java.lang.Exception
Sets the position of the XY stage in microns. Uses the current XY stage device.

Throws:
java.lang.Exception

setRelativeXYPosition

public void setRelativeXYPosition(java.lang.String xyStageLabel,
                                  double dx,
                                  double dy)
                           throws java.lang.Exception
Throws:
java.lang.Exception

setRelativeXYPosition

public void setRelativeXYPosition(double dx,
                                  double dy)
                           throws java.lang.Exception
Sets the relative position of the XY stage in microns. Uses the current XY stage device.

Throws:
java.lang.Exception

getXYPosition

public void getXYPosition(java.lang.String xyStageLabel,
                          double[] x_stage,
                          double[] y_stage)
                   throws java.lang.Exception
Throws:
java.lang.Exception

getXYPosition

public void getXYPosition(double[] x_stage,
                          double[] y_stage)
                   throws java.lang.Exception
Obtains the current position of the XY stage in microns. Uses the current XY stage device.

Throws:
java.lang.Exception

getXPosition

public double getXPosition(java.lang.String xyStageLabel)
                    throws java.lang.Exception
Obtains the current position of the X axis of the XY stage in microns.

Returns:
the x position
Throws:
java.lang.Exception

getYPosition

public double getYPosition(java.lang.String xyStageLabel)
                    throws java.lang.Exception
Obtains the current position of the Y axis of the XY stage in microns.

Returns:
the y position
Throws:
java.lang.Exception

getXPosition

public double getXPosition()
                    throws java.lang.Exception
Obtains the current position of the X axis of the XY stage in microns. Uses the current XY stage device.

Returns:
the x position
Throws:
java.lang.Exception

getYPosition

public double getYPosition()
                    throws java.lang.Exception
Obtains the current position of the Y axis of the XY stage in microns. Uses the current XY stage device.

Returns:
the y position
Throws:
java.lang.Exception

stop

public void stop(java.lang.String xyOrZStageLabel)
          throws java.lang.Exception
Stop the XY or focus/Z stage motors

Throws:
java.lang.Exception

home

public void home(java.lang.String xyOrZStageLabel)
          throws java.lang.Exception
Perform a hardware homing operation for an XY or focus/Z stage.

Throws:
java.lang.Exception

setOriginXY

public void setOriginXY(java.lang.String xyStageLabel)
                 throws java.lang.Exception
Zero the given XY stage's coordinates at the current position.

Throws:
java.lang.Exception

setOriginXY

public void setOriginXY()
                 throws java.lang.Exception
Zero the current XY stage's coordinates at the current position.

Throws:
java.lang.Exception

setOriginX

public void setOriginX(java.lang.String xyStageLabel)
                throws java.lang.Exception
Zero the given XY stage's X coordinate at the current position.

Throws:
java.lang.Exception

setOriginX

public void setOriginX()
                throws java.lang.Exception
Zero the given XY stage's X coordinate at the current position.

Throws:
java.lang.Exception

setOriginY

public void setOriginY(java.lang.String xyStageLabel)
                throws java.lang.Exception
Zero the given XY stage's Y coordinate at the current position.

Throws:
java.lang.Exception

setOriginY

public void setOriginY()
                throws java.lang.Exception
Zero the given XY stage's Y coordinate at the current position.

Throws:
java.lang.Exception

setAdapterOriginXY

public void setAdapterOriginXY(java.lang.String xyStageLabel,
                               double newXUm,
                               double newYUm)
                        throws java.lang.Exception
Throws:
java.lang.Exception

setAdapterOriginXY

public void setAdapterOriginXY(double newXUm,
                               double newYUm)
                        throws java.lang.Exception
Enable software translation of coordinates for the current XY stage.

Throws:
java.lang.Exception

isXYStageSequenceable

public boolean isXYStageSequenceable(java.lang.String xyStageLabel)
                              throws java.lang.Exception
Queries XY stage if it can be used in a sequence

Throws:
java.lang.Exception

startXYStageSequence

public void startXYStageSequence(java.lang.String xyStageLabel)
                          throws java.lang.Exception
Starts an ongoing sequence of triggered events in an XY stage This should only be called for stages

Throws:
java.lang.Exception

stopXYStageSequence

public void stopXYStageSequence(java.lang.String xyStageLabel)
                         throws java.lang.Exception
Stops an ongoing sequence of triggered events in an XY stage This should only be called for stages that are sequenceable

Throws:
java.lang.Exception

getXYStageSequenceMaxLength

public int getXYStageSequenceMaxLength(java.lang.String xyStageLabel)
                                throws java.lang.Exception
Gets the maximum length of an XY stage's position sequence. This should only be called for XY stages that are sequenceable

Returns:
the maximum allowed sequence length
Throws:
java.lang.Exception

loadXYStageSequence

public void loadXYStageSequence(java.lang.String xyStageLabel,
                                DoubleVector xSequence,
                                DoubleVector ySequence)
                         throws java.lang.Exception
Throws:
java.lang.Exception

setSerialProperties

public void setSerialProperties(java.lang.String portName,
                                java.lang.String answerTimeout,
                                java.lang.String baudRate,
                                java.lang.String delayBetweenCharsMs,
                                java.lang.String handshaking,
                                java.lang.String parity,
                                java.lang.String stopBits)
                         throws java.lang.Exception
Throws:
java.lang.Exception

setSerialPortCommand

public void setSerialPortCommand(java.lang.String portLabel,
                                 java.lang.String command,
                                 java.lang.String term)
                          throws java.lang.Exception
Throws:
java.lang.Exception

getSerialPortAnswer

public java.lang.String getSerialPortAnswer(java.lang.String portLabel,
                                            java.lang.String term)
                                     throws java.lang.Exception
Continuously read from the serial port until the terminating sequence is encountered.

Throws:
java.lang.Exception

writeToSerialPort

public void writeToSerialPort(java.lang.String portLabel,
                              CharVector data)
                       throws java.lang.Exception
Sends an array of characters to the serial port and returns immediately.

Throws:
java.lang.Exception

readFromSerialPort

public CharVector readFromSerialPort(java.lang.String portLabel)
                              throws java.lang.Exception
Reads the contents of the Rx buffer.

Throws:
java.lang.Exception

setSLMImage

public void setSLMImage(java.lang.String slmLabel,
                        byte[] pixels)
                 throws java.lang.Exception
Write a 32-bit color image to the SLM.

Throws:
java.lang.Exception

setSLMImage

public void setSLMImage(java.lang.String slmLabel,
                        int[] pixels)
                 throws java.lang.Exception
Write a 32-bit color image to the SLM.

Throws:
java.lang.Exception

setSLMPixelsTo

public void setSLMPixelsTo(java.lang.String slmLabel,
                           short intensity)
                    throws java.lang.Exception
Set all SLM pixels to a single 8-bit intensity.

Throws:
java.lang.Exception

setSLMPixelsTo

public void setSLMPixelsTo(java.lang.String slmLabel,
                           short red,
                           short green,
                           short blue)
                    throws java.lang.Exception
Throws:
java.lang.Exception

displaySLMImage

public void displaySLMImage(java.lang.String slmLabel)
                     throws java.lang.Exception
Display the waiting image on the SLM.

Throws:
java.lang.Exception

setSLMExposure

public void setSLMExposure(java.lang.String slmLabel,
                           double exposure_ms)
                    throws java.lang.Exception
Throws:
java.lang.Exception

getSLMExposure

public double getSLMExposure(java.lang.String slmLabel)
                      throws java.lang.Exception
Throws:
java.lang.Exception

getSLMWidth

public long getSLMWidth(java.lang.String slmLabel)

getSLMHeight

public long getSLMHeight(java.lang.String slmLabel)

getSLMNumberOfComponents

public long getSLMNumberOfComponents(java.lang.String slmLabel)

getSLMBytesPerPixel

public long getSLMBytesPerPixel(java.lang.String slmLabel)

getSLMSequenceMaxLength

public int getSLMSequenceMaxLength(java.lang.String slmLabel)

startSLMSequence

public void startSLMSequence(java.lang.String slmLabel)
                      throws java.lang.Exception
Throws:
java.lang.Exception

stopSLMSequence

public void stopSLMSequence(java.lang.String slmLabel)
                     throws java.lang.Exception
Throws:
java.lang.Exception

loadSLMSequence

public void loadSLMSequence(java.lang.String slmLabel,
                            java.util.List<byte[]> imageSequence)
                     throws java.lang.Exception
Throws:
java.lang.Exception

pointGalvoAndFire

public void pointGalvoAndFire(java.lang.String galvoLabel,
                              double x,
                              double y,
                              double pulseTime_us)
                       throws java.lang.Exception
Throws:
java.lang.Exception

setGalvoSpotInterval

public void setGalvoSpotInterval(java.lang.String galvoLabel,
                                 double pulseTime_us)
                          throws java.lang.Exception
Throws:
java.lang.Exception

setGalvoPosition

public void setGalvoPosition(java.lang.String galvoLabel,
                             double x,
                             double y)
                      throws java.lang.Exception
Throws:
java.lang.Exception

getGalvoPosition

public void getGalvoPosition(java.lang.String galvoLabel,
                             double[] x_stage,
                             double[] y_stage)
                      throws java.lang.Exception
Throws:
java.lang.Exception

setGalvoIlluminationState

public void setGalvoIlluminationState(java.lang.String galvoLabel,
                                      boolean on)
                               throws java.lang.Exception
Set the galvo's illumination state to on or off

Throws:
java.lang.Exception

getGalvoXRange

public double getGalvoXRange(java.lang.String galvoLabel)
                      throws java.lang.Exception
Get the Galvo x range

Throws:
java.lang.Exception

getGalvoXMinimum

public double getGalvoXMinimum(java.lang.String galvoLabel)
                        throws java.lang.Exception
Get the Galvo x minimum

Throws:
java.lang.Exception

getGalvoYRange

public double getGalvoYRange(java.lang.String galvoLabel)
                      throws java.lang.Exception
Get the Galvo y range

Throws:
java.lang.Exception

getGalvoYMinimum

public double getGalvoYMinimum(java.lang.String galvoLabel)
                        throws java.lang.Exception
Get the Galvo y minimum

Throws:
java.lang.Exception

addGalvoPolygonVertex

public void addGalvoPolygonVertex(java.lang.String galvoLabel,
                                  int polygonIndex,
                                  double x,
                                  double y)
                           throws java.lang.Exception
Throws:
java.lang.Exception

deleteGalvoPolygons

public void deleteGalvoPolygons(java.lang.String galvoLabel)
                         throws java.lang.Exception
Remove all added polygons

Throws:
java.lang.Exception

loadGalvoPolygons

public void loadGalvoPolygons(java.lang.String galvoLabel)
                       throws java.lang.Exception
Load a set of galvo polygons to the device

Throws:
java.lang.Exception

setGalvoPolygonRepetitions

public void setGalvoPolygonRepetitions(java.lang.String galvoLabel,
                                       int repetitions)
                                throws java.lang.Exception
Set the number of times to loop galvo polygons

Throws:
java.lang.Exception

runGalvoPolygons

public void runGalvoPolygons(java.lang.String galvoLabel)
                      throws java.lang.Exception
Run a loop of galvo polygons

Throws:
java.lang.Exception

runGalvoSequence

public void runGalvoSequence(java.lang.String galvoLabel)
                      throws java.lang.Exception
Run a sequence of galvo positions

Throws:
java.lang.Exception

getGalvoChannel

public java.lang.String getGalvoChannel(java.lang.String galvoLabel)
                                 throws java.lang.Exception
Get the name of the active galvo channel (for a multi-laser galvo device).

Throws:
java.lang.Exception

supportsDeviceDetection

public boolean supportsDeviceDetection(java.lang.String deviceLabel)
Return whether or not the device supports automatic device detection (i.e. whether or not detectDevice() may be safely called).


detectDevice

public DeviceDetectionStatus detectDevice(java.lang.String deviceLabel)
Tries to communicate to a device through a given serial port Used to automate discovery of correct serial port Also configures the serial port correctly


getParentLabel

public java.lang.String getParentLabel(java.lang.String peripheralLabel)
                                throws java.lang.Exception
Returns parent device.

Throws:
java.lang.Exception

setParentLabel

public void setParentLabel(java.lang.String deviceLabel,
                           java.lang.String parentHubLabel)
                    throws java.lang.Exception
Sets parent device label

Throws:
java.lang.Exception

getInstalledDevices

public StrVector getInstalledDevices(java.lang.String hubLabel)
                              throws java.lang.Exception
Performs auto-detection and loading of child devices that are attached to a Hub device. For example, if a motorized microscope is represented by a Hub device, it is capable of discovering what specific child devices are currently attached. In that case this call might report that Z-stage, filter changer and objective turret are currently installed and return three device names in the string list.

Throws:
java.lang.Exception

getInstalledDeviceDescription

public java.lang.String getInstalledDeviceDescription(java.lang.String hubLabel,
                                                      java.lang.String peripheralLabel)
                                               throws java.lang.Exception
Throws:
java.lang.Exception

getLoadedPeripheralDevices

public StrVector getLoadedPeripheralDevices(java.lang.String hubLabel)
                                     throws java.lang.Exception
Throws:
java.lang.Exception

getUserId

public java.lang.String getUserId()
Displays current user name.


getHostName

public java.lang.String getHostName()
return current computer name.


getMACAddresses

public StrVector getMACAddresses()