MMCore  1.4
Public Member Functions | Static Public Member Functions | Friends | List of all members
CMMCore Class Reference

The Micro-Manager Core. More...

#include <MMCore.h>

Public Member Functions

 CMMCore ()
 
 ~CMMCore ()
 
Initialization and setup.
void loadDevice (const char *label, const char *moduleName, const char *deviceName) throw (CMMError)
 
void unloadDevice (const char *label) throw (CMMError)
 
void unloadAllDevices () throw (CMMError)
 
void initializeAllDevices () throw (CMMError)
 
void initializeDevice (const char *label) throw (CMMError)
 
void reset () throw (CMMError)
 
void unloadLibrary (const char *moduleName) throw (CMMError)
 
void updateCoreProperties () throw (CMMError)
 
std::string getCoreErrorText (int code) const
 
std::string getVersionInfo () const
 
std::string getAPIVersionInfo () const
 
Configuration getSystemState ()
 
void setSystemState (const Configuration &conf)
 
Configuration getConfigState (const char *group, const char *config) throw (CMMError)
 
Configuration getConfigGroupState (const char *group) throw (CMMError)
 
void saveSystemState (const char *fileName) throw (CMMError)
 
void loadSystemState (const char *fileName) throw (CMMError)
 
void saveSystemConfiguration (const char *fileName) throw (CMMError)
 
void loadSystemConfiguration (const char *fileName) throw (CMMError)
 
void registerCallback (MMEventCallback *cb)
 
Logging and log management.
void setPrimaryLogFile (const char *filename, bool truncate=false) throw (CMMError)
 
std::string getPrimaryLogFile () const
 
void logMessage (const char *msg)
 
void logMessage (const char *msg, bool debugOnly)
 
void enableDebugLog (bool enable)
 
bool debugLogEnabled ()
 
void enableStderrLog (bool enable)
 
bool stderrLogEnabled ()
 
int startSecondaryLogFile (const char *filename, bool enableDebug, bool truncate=true, bool synchronous=false) throw (CMMError)
 
void stopSecondaryLogFile (int handle) throw (CMMError)
 
Device listing.
std::vector< std::string > getDeviceAdapterSearchPaths ()
 
void setDeviceAdapterSearchPaths (const std::vector< std::string > &paths)
 
 MMCORE_DEPRECATED (static void addSearchPath(const char *path))
 
std::vector< std::string > getDeviceAdapterNames () throw (CMMError)
 
 MMCORE_DEPRECATED (static std::vector< std::string > getDeviceLibraries() throw(CMMError))
 
std::vector< std::string > getAvailableDevices (const char *library) throw (CMMError)
 
std::vector< std::string > getAvailableDeviceDescriptions (const char *library) throw (CMMError)
 
std::vector< long > getAvailableDeviceTypes (const char *library) throw (CMMError)
 
Generic device control.

Functionality supported by all devices.

std::vector< std::string > getLoadedDevices () const
 
std::vector< std::string > getLoadedDevicesOfType (MM::DeviceType devType) const
 
MM::DeviceType getDeviceType (const char *label) throw (CMMError)
 
std::string getDeviceLibrary (const char *label) throw (CMMError)
 
std::string getDeviceName (const char *label) throw (CMMError)
 
std::string getDeviceDescription (const char *label) throw (CMMError)
 
std::vector< std::string > getDevicePropertyNames (const char *label) throw (CMMError)
 
bool hasProperty (const char *label, const char *propName) throw (CMMError)
 
std::string getProperty (const char *label, const char *propName) throw (CMMError)
 
void setProperty (const char *label, const char *propName, const char *propValue) throw (CMMError)
 
void setProperty (const char *label, const char *propName, const bool propValue) throw (CMMError)
 
void setProperty (const char *label, const char *propName, const long propValue) throw (CMMError)
 
void setProperty (const char *label, const char *propName, const float propValue) throw (CMMError)
 
void setProperty (const char *label, const char *propName, const double propValue) throw (CMMError)
 
std::vector< std::string > getAllowedPropertyValues (const char *label, const char *propName) throw (CMMError)
 
bool isPropertyReadOnly (const char *label, const char *propName) throw (CMMError)
 
bool isPropertyPreInit (const char *label, const char *propName) throw (CMMError)
 
bool isPropertySequenceable (const char *label, const char *propName) throw (CMMError)
 
bool hasPropertyLimits (const char *label, const char *propName) throw (CMMError)
 
double getPropertyLowerLimit (const char *label, const char *propName) throw (CMMError)
 
double getPropertyUpperLimit (const char *label, const char *propName) throw (CMMError)
 
MM::PropertyType getPropertyType (const char *label, const char *propName) throw (CMMError)
 
void startPropertySequence (const char *label, const char *propName) throw (CMMError)
 
void stopPropertySequence (const char *label, const char *propName) throw (CMMError)
 
long getPropertySequenceMaxLength (const char *label, const char *propName) throw (CMMError)
 
void loadPropertySequence (const char *label, const char *propName, std::vector< std::string > eventSequence) throw (CMMError)
 
bool deviceBusy (const char *label) throw (CMMError)
 
void waitForDevice (const char *label) throw (CMMError)
 
void waitForConfig (const char *group, const char *configName) throw (CMMError)
 
bool systemBusy () throw (CMMError)
 
void waitForSystem () throw (CMMError)
 
void waitForImageSynchro () throw (CMMError)
 
bool deviceTypeBusy (MM::DeviceType devType) throw (CMMError)
 
void waitForDeviceType (MM::DeviceType devType) throw (CMMError)
 
double getDeviceDelayMs (const char *label) throw (CMMError)
 
void setDeviceDelayMs (const char *label, double delayMs) throw (CMMError)
 
bool usesDeviceDelay (const char *label) throw (CMMError)
 
void setTimeoutMs (long timeoutMs)
 
long getTimeoutMs ()
 
void sleep (double intervalMs) const
 
Management of 'current' device for specific roles.
std::string getCameraDevice ()
 
std::string getShutterDevice ()
 
std::string getFocusDevice ()
 
std::string getXYStageDevice ()
 
std::string getAutoFocusDevice ()
 
std::string getImageProcessorDevice ()
 
std::string getSLMDevice ()
 
std::string getGalvoDevice ()
 
std::string getChannelGroup ()
 
void setCameraDevice (const char *cameraLabel) throw (CMMError)
 
void setShutterDevice (const char *shutterLabel) throw (CMMError)
 
void setFocusDevice (const char *focusLabel) throw (CMMError)
 
void setXYStageDevice (const char *xyStageLabel) throw (CMMError)
 
void setAutoFocusDevice (const char *focusLabel) throw (CMMError)
 
void setImageProcessorDevice (const char *procLabel) throw (CMMError)
 
void setSLMDevice (const char *slmLabel) throw (CMMError)
 
void setGalvoDevice (const char *galvoLabel) throw (CMMError)
 
void setChannelGroup (const char *channelGroup) throw (CMMError)
 
System state cache.

The system state cache retains the last-set or last-read value of each device property.

Configuration getSystemStateCache () const
 
void updateSystemStateCache ()
 
std::string getPropertyFromCache (const char *deviceLabel, const char *propName) const throw (CMMError)
 
std::string getCurrentConfigFromCache (const char *groupName) throw (CMMError)
 
Configuration getConfigGroupStateFromCache (const char *group) throw (CMMError)
 
Configuration groups.
void defineConfig (const char *groupName, const char *configName) throw (CMMError)
 
void defineConfig (const char *groupName, const char *configName, const char *deviceLabel, const char *propName, const char *value) throw (CMMError)
 
void defineConfigGroup (const char *groupName) throw (CMMError)
 
void deleteConfigGroup (const char *groupName) throw (CMMError)
 
void renameConfigGroup (const char *oldGroupName, const char *newGroupName) throw (CMMError)
 
bool isGroupDefined (const char *groupName)
 
bool isConfigDefined (const char *groupName, const char *configName)
 
void setConfig (const char *groupName, const char *configName) throw (CMMError)
 
void deleteConfig (const char *groupName, const char *configName) throw (CMMError)
 
void deleteConfig (const char *groupName, const char *configName, const char *deviceLabel, const char *propName) throw (CMMError)
 
void renameConfig (const char *groupName, const char *oldConfigName, const char *newConfigName) throw (CMMError)
 
std::vector< std::string > getAvailableConfigGroups () const
 
std::vector< std::string > getAvailableConfigs (const char *configGroup) const
 
std::string getCurrentConfig (const char *groupName) throw (CMMError)
 
Configuration getConfigData (const char *configGroup, const char *configName) throw (CMMError)
 
The pixel size configuration group.
std::string getCurrentPixelSizeConfig () throw (CMMError)
 
std::string getCurrentPixelSizeConfig (bool cached) throw (CMMError)
 
double getPixelSizeUm ()
 
double getPixelSizeUm (bool cached)
 
double getPixelSizeUmByID (const char *resolutionID) throw (CMMError)
 
std::vector< double > getPixelSizeAffine () throw (CMMError)
 
std::vector< double > getPixelSizeAffine (bool cached) throw (CMMError)
 
std::vector< double > getPixelSizeAffineByID (const char *resolutionID) throw (CMMError)
 
double getMagnificationFactor () const
 
void setPixelSizeUm (const char *resolutionID, double pixSize) throw (CMMError)
 
void setPixelSizeAffine (const char *resolutionID, std::vector< double > affine) throw (CMMError)
 
void definePixelSizeConfig (const char *resolutionID, const char *deviceLabel, const char *propName, const char *value) throw (CMMError)
 
void definePixelSizeConfig (const char *resolutionID) throw (CMMError)
 
std::vector< std::string > getAvailablePixelSizeConfigs () const
 
bool isPixelSizeConfigDefined (const char *resolutionID) const throw (CMMError)
 
void setPixelSizeConfig (const char *resolutionID) throw (CMMError)
 
void renamePixelSizeConfig (const char *oldConfigName, const char *newConfigName) throw (CMMError)
 
void deletePixelSizeConfig (const char *configName) throw (CMMError)
 
Configuration getPixelSizeConfigData (const char *configName) throw (CMMError)
 
Property blocks.
void definePropertyBlock (const char *blockName, const char *propertyName, const char *propertyValue)
 
std::vector< std::string > getAvailablePropertyBlocks () const
 
PropertyBlock getPropertyBlockData (const char *blockName)
 
Image acquisition.
void setROI (int x, int y, int xSize, int ySize) throw (CMMError)
 
void setROI (const char *label, int x, int y, int xSize, int ySize) throw (CMMError)
 
void getROI (int &x, int &y, int &xSize, int &ySize) throw (CMMError)
 
void getROI (const char *label, int &x, int &y, int &xSize, int &ySize) throw (CMMError)
 
void clearROI () throw (CMMError)
 
bool isMultiROISupported () throw (CMMError)
 
bool isMultiROIEnabled () throw (CMMError)
 
void setMultiROI (std::vector< unsigned > xs, std::vector< unsigned > ys, std::vector< unsigned > widths, std::vector< unsigned > heights) throw (CMMError)
 
void getMultiROI (std::vector< unsigned > &xs, std::vector< unsigned > &ys, std::vector< unsigned > &widths, std::vector< unsigned > &heights) throw (CMMError)
 
void setExposure (double exp) throw (CMMError)
 
void setExposure (const char *cameraLabel, double dExp) throw (CMMError)
 
double getExposure () throw (CMMError)
 
double getExposure (const char *label) throw (CMMError)
 
void snapImage () throw (CMMError)
 
void * getImage () throw (CMMError)
 
void * getImage (unsigned numChannel) throw (CMMError)
 
unsigned getImageWidth ()
 
unsigned getImageHeight ()
 
unsigned getBytesPerPixel ()
 
unsigned getImageBitDepth ()
 
unsigned getNumberOfComponents ()
 
unsigned getNumberOfCameraChannels ()
 
std::string getCameraChannelName (unsigned int channelNr)
 
long getImageBufferSize ()
 
void assignImageSynchro (const char *deviceLabel) throw (CMMError)
 
void removeImageSynchro (const char *deviceLabel) throw (CMMError)
 
void removeImageSynchroAll ()
 
void setAutoShutter (bool state)
 
bool getAutoShutter ()
 
void setShutterOpen (bool state) throw (CMMError)
 
bool getShutterOpen () throw (CMMError)
 
void setShutterOpen (const char *shutterLabel, bool state) throw (CMMError)
 
bool getShutterOpen (const char *shutterLabel) throw (CMMError)
 
void startSequenceAcquisition (long numImages, double intervalMs, bool stopOnOverflow) throw (CMMError)
 
void startSequenceAcquisition (const char *cameraLabel, long numImages, double intervalMs, bool stopOnOverflow) throw (CMMError)
 
void prepareSequenceAcquisition (const char *cameraLabel) throw (CMMError)
 
void startContinuousSequenceAcquisition (double intervalMs) throw (CMMError)
 
void stopSequenceAcquisition () throw (CMMError)
 
void stopSequenceAcquisition (const char *cameraLabel) throw (CMMError)
 
bool isSequenceRunning () throw ()
 
bool isSequenceRunning (const char *cameraLabel) throw (CMMError)
 
void * getLastImage () throw (CMMError)
 
void * popNextImage () throw (CMMError)
 
void * getLastImageMD (unsigned channel, unsigned slice, Metadata &md) const throw (CMMError)
 
void * popNextImageMD (unsigned channel, unsigned slice, Metadata &md) throw (CMMError)
 
void * getLastImageMD (Metadata &md) const throw (CMMError)
 
void * getNBeforeLastImageMD (unsigned long n, Metadata &md) const throw (CMMError)
 
void * popNextImageMD (Metadata &md) throw (CMMError)
 
long getRemainingImageCount ()
 
long getBufferTotalCapacity ()
 
long getBufferFreeCapacity ()
 
bool isBufferOverflowed () const
 
void setCircularBufferMemoryFootprint (unsigned sizeMB) throw (CMMError)
 
unsigned getCircularBufferMemoryFootprint ()
 
void initializeCircularBuffer () throw (CMMError)
 
void clearCircularBuffer () throw (CMMError)
 
bool isExposureSequenceable (const char *cameraLabel) throw (CMMError)
 
void startExposureSequence (const char *cameraLabel) throw (CMMError)
 
void stopExposureSequence (const char *cameraLabel) throw (CMMError)
 
long getExposureSequenceMaxLength (const char *cameraLabel) throw (CMMError)
 
void loadExposureSequence (const char *cameraLabel, std::vector< double > exposureSequence_ms) throw (CMMError)
 
Autofocus control.
double getLastFocusScore ()
 
double getCurrentFocusScore ()
 
void enableContinuousFocus (bool enable) throw (CMMError)
 
bool isContinuousFocusEnabled () throw (CMMError)
 
bool isContinuousFocusLocked () throw (CMMError)
 
bool isContinuousFocusDrive (const char *stageLabel) throw (CMMError)
 
void fullFocus () throw (CMMError)
 
void incrementalFocus () throw (CMMError)
 
void setAutoFocusOffset (double offset) throw (CMMError)
 
double getAutoFocusOffset () throw (CMMError)
 
State device control.
void setState (const char *stateDeviceLabel, long state) throw (CMMError)
 
long getState (const char *stateDeviceLabel) throw (CMMError)
 
long getNumberOfStates (const char *stateDeviceLabel)
 
void setStateLabel (const char *stateDeviceLabel, const char *stateLabel) throw (CMMError)
 
std::string getStateLabel (const char *stateDeviceLabel) throw (CMMError)
 
void defineStateLabel (const char *stateDeviceLabel, long state, const char *stateLabel) throw (CMMError)
 
std::vector< std::string > getStateLabels (const char *stateDeviceLabel) throw (CMMError)
 
long getStateFromLabel (const char *stateDeviceLabel, const char *stateLabel) throw (CMMError)
 
PropertyBlock getStateLabelData (const char *stateDeviceLabel, const char *stateLabel)
 
PropertyBlock getData (const char *stateDeviceLabel)
 
Focus (Z) stage control.
void setPosition (const char *stageLabel, double position) throw (CMMError)
 
void setPosition (double position) throw (CMMError)
 
double getPosition (const char *stageLabel) throw (CMMError)
 
double getPosition () throw (CMMError)
 
void setRelativePosition (const char *stageLabel, double d) throw (CMMError)
 
void setRelativePosition (double d) throw (CMMError)
 
void setOrigin (const char *stageLabel) throw (CMMError)
 
void setOrigin () throw (CMMError)
 
void setAdapterOrigin (const char *stageLabel, double newZUm) throw (CMMError)
 
void setAdapterOrigin (double newZUm) throw (CMMError)
 
void setFocusDirection (const char *stageLabel, int sign)
 Set the focus direction of a stage. More...
 
int getFocusDirection (const char *stageLabel) throw (CMMError)
 Get the focus direction of a stage. More...
 
bool isStageSequenceable (const char *stageLabel) throw (CMMError)
 
bool isStageLinearSequenceable (const char *stageLabel) throw (CMMError)
 
void startStageSequence (const char *stageLabel) throw (CMMError)
 
void stopStageSequence (const char *stageLabel) throw (CMMError)
 
long getStageSequenceMaxLength (const char *stageLabel) throw (CMMError)
 
void loadStageSequence (const char *stageLabel, std::vector< double > positionSequence) throw (CMMError)
 
void setStageLinearSequence (const char *stageLabel, double dZ_um, int nSlices) throw (CMMError)
 
XY stage control.
void setXYPosition (const char *xyStageLabel, double x, double y) throw (CMMError)
 
void setXYPosition (double x, double y) throw (CMMError)
 
void setRelativeXYPosition (const char *xyStageLabel, double dx, double dy) throw (CMMError)
 
void setRelativeXYPosition (double dx, double dy) throw (CMMError)
 
void getXYPosition (const char *xyStageLabel, double &x_stage, double &y_stage) throw (CMMError)
 
void getXYPosition (double &x_stage, double &y_stage) throw (CMMError)
 
double getXPosition (const char *xyStageLabel) throw (CMMError)
 
double getYPosition (const char *xyStageLabel) throw (CMMError)
 
double getXPosition () throw (CMMError)
 
double getYPosition () throw (CMMError)
 
void stop (const char *xyOrZStageLabel) throw (CMMError)
 
void home (const char *xyOrZStageLabel) throw (CMMError)
 
void setOriginXY (const char *xyStageLabel) throw (CMMError)
 
void setOriginXY () throw (CMMError)
 
void setOriginX (const char *xyStageLabel) throw (CMMError)
 
void setOriginX () throw (CMMError)
 
void setOriginY (const char *xyStageLabel) throw (CMMError)
 
void setOriginY () throw (CMMError)
 
void setAdapterOriginXY (const char *xyStageLabel, double newXUm, double newYUm) throw (CMMError)
 
void setAdapterOriginXY (double newXUm, double newYUm) throw (CMMError)
 
bool isXYStageSequenceable (const char *xyStageLabel) throw (CMMError)
 
void startXYStageSequence (const char *xyStageLabel) throw (CMMError)
 
void stopXYStageSequence (const char *xyStageLabel) throw (CMMError)
 
long getXYStageSequenceMaxLength (const char *xyStageLabel) throw (CMMError)
 
void loadXYStageSequence (const char *xyStageLabel, std::vector< double > xSequence, std::vector< double > ySequence) throw (CMMError)
 
Serial port control.
void setSerialProperties (const char *portName, const char *answerTimeout, const char *baudRate, const char *delayBetweenCharsMs, const char *handshaking, const char *parity, const char *stopBits) throw (CMMError)
 
void setSerialPortCommand (const char *portLabel, const char *command, const char *term) throw (CMMError)
 
std::string getSerialPortAnswer (const char *portLabel, const char *term) throw (CMMError)
 
void writeToSerialPort (const char *portLabel, const std::vector< char > &data) throw (CMMError)
 
std::vector< char > readFromSerialPort (const char *portLabel) throw (CMMError)
 
SLM control.

Control of spatial light modulators such as liquid crystal on silicon (LCoS), digital micromirror devices (DMD), or multimedia projectors.

void setSLMImage (const char *slmLabel, unsigned char *pixels) throw (CMMError)
 
void setSLMImage (const char *slmLabel, imgRGB32 pixels) throw (CMMError)
 
void setSLMPixelsTo (const char *slmLabel, unsigned char intensity) throw (CMMError)
 
void setSLMPixelsTo (const char *slmLabel, unsigned char red, unsigned char green, unsigned char blue) throw (CMMError)
 
void displaySLMImage (const char *slmLabel) throw (CMMError)
 
void setSLMExposure (const char *slmLabel, double exposure_ms) throw (CMMError)
 
double getSLMExposure (const char *slmLabel) throw (CMMError)
 
unsigned getSLMWidth (const char *slmLabel) throw (CMMError)
 
unsigned getSLMHeight (const char *slmLabel) throw (CMMError)
 
unsigned getSLMNumberOfComponents (const char *slmLabel) throw (CMMError)
 
unsigned getSLMBytesPerPixel (const char *slmLabel) throw (CMMError)
 
long getSLMSequenceMaxLength (const char *slmLabel) throw (CMMError)
 
void startSLMSequence (const char *slmLabel) throw (CMMError)
 
void stopSLMSequence (const char *slmLabel) throw (CMMError)
 
void loadSLMSequence (const char *slmLabel, std::vector< unsigned char *> imageSequence) throw (CMMError)
 
Galvo control.

Control of beam-steering devices.

void pointGalvoAndFire (const char *galvoLabel, double x, double y, double pulseTime_us) throw (CMMError)
 
void setGalvoSpotInterval (const char *galvoLabel, double pulseTime_us) throw (CMMError)
 
void setGalvoPosition (const char *galvoLabel, double x, double y) throw (CMMError)
 
void getGalvoPosition (const char *galvoLabel, double &x_stage, double &y_stage) throw (CMMError)
 
void setGalvoIlluminationState (const char *galvoLabel, bool on) throw (CMMError)
 
double getGalvoXRange (const char *galvoLabel) throw (CMMError)
 
double getGalvoXMinimum (const char *galvoLabel) throw (CMMError)
 
double getGalvoYRange (const char *galvoLabel) throw (CMMError)
 
double getGalvoYMinimum (const char *galvoLabel) throw (CMMError)
 
void addGalvoPolygonVertex (const char *galvoLabel, int polygonIndex, double x, double y) throw (CMMError)
 
void deleteGalvoPolygons (const char *galvoLabel) throw (CMMError)
 
void loadGalvoPolygons (const char *galvoLabel) throw (CMMError)
 
void setGalvoPolygonRepetitions (const char *galvoLabel, int repetitions) throw (CMMError)
 
void runGalvoPolygons (const char *galvoLabel) throw (CMMError)
 
void runGalvoSequence (const char *galvoLabel) throw (CMMError)
 
std::string getGalvoChannel (const char *galvoLabel) throw (CMMError)
 
Device discovery.
bool supportsDeviceDetection (char *deviceLabel)
 
MM::DeviceDetectionStatus detectDevice (char *deviceLabel)
 
Hub and peripheral devices.
std::string getParentLabel (const char *peripheralLabel) throw (CMMError)
 
void setParentLabel (const char *deviceLabel, const char *parentHubLabel) throw (CMMError)
 
std::vector< std::string > getInstalledDevices (const char *hubLabel) throw (CMMError)
 
std::string getInstalledDeviceDescription (const char *hubLabel, const char *peripheralLabel) throw (CMMError)
 
std::vector< std::string > getLoadedPeripheralDevices (const char *hubLabel) throw (CMMError)
 
Miscellaneous.
std::string getUserId () const
 
std::string getHostName () const
 
std::vector< std::string > getMACAddresses (void)
 

Static Public Member Functions

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

Friends

class CoreCallback
 
class CorePropertyCollection
 

Detailed Description

The Micro-Manager Core.

Provides a device-independent interface for hardware control. Additionally, provides some facilities (such as configuration groups) for application programming.

The signatures of most of the public member functions are designed to be wrapped by SWIG with minimal manual configuration.

Constructor & Destructor Documentation

◆ CMMCore()

CMMCore::CMMCore ( )

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

◆ ~CMMCore()

CMMCore::~CMMCore ( )

Destructor. Cleans-up and unloads all devices.

References reset().

Member Function Documentation

◆ addGalvoPolygonVertex()

void CMMCore::addGalvoPolygonVertex ( const char *  deviceLabel,
int  polygonIndex,
double  x,
double  y 
)
throw (CMMError
)

Add a vertex to a galvo polygon.

◆ assignImageSynchro()

void CMMCore::assignImageSynchro ( const char *  label)
throw (CMMError
)

Add device to the image-synchro list. Image acquisition waits for all devices in this list.

Parameters
labelthe device label

Referenced by loadSystemConfiguration().

◆ clearCircularBuffer()

void CMMCore::clearCircularBuffer ( )
throw (CMMError
)

Removes all images from the circular buffer.

It is rarely necessary to call this directly since starting a sequence acquisition or changing the ROI will always clear the buffer.

◆ clearROI()

void CMMCore::clearROI ( )
throw (CMMError
)

Set the region of interest of the current camera to the full frame.

A successful call to this method will clear any images in the sequence buffer, even if the ROI does not change.

◆ debugLogEnabled()

bool CMMCore::debugLogEnabled ( )

Indicates if logging of debug messages is enabled

◆ defineConfig() [1/2]

void CMMCore::defineConfig ( const char *  groupName,
const char *  configName 
)
throw (CMMError
)

Defines a configuration. If the configuration group/name was not previously defined a new configuration will be automatically created; otherwise nothing happens.

Parameters
groupNamethe configuration group name
configNamethe configuration preset name

Referenced by defineStateLabel(), and loadSystemConfiguration().

◆ defineConfig() [2/2]

void CMMCore::defineConfig ( const char *  groupName,
const char *  configName,
const char *  deviceLabel,
const char *  propName,
const char *  value 
)
throw (CMMError
)

Defines a single configuration entry (setting). If the configuration group/name was not previously defined a new configuration will be automatically created. If the name was previously defined the new setting will be added to its list of property settings. The new setting will override previously defined ones if it refers to the same property name.

Parameters
groupNamethe group name
configNamethe configuration name
deviceLabelthe device label
propNamethe property name
valuethe property value

◆ defineConfigGroup()

void CMMCore::defineConfigGroup ( const char *  groupName)
throw (CMMError
)

Creates an empty configuration group.

References getCoreErrorText().

Referenced by loadSystemConfiguration().

◆ definePixelSizeConfig() [1/2]

void CMMCore::definePixelSizeConfig ( const char *  resolutionID,
const char *  deviceLabel,
const char *  propName,
const char *  value 
)
throw (CMMError
)

Defines a single pixel size entry (setting). The system will treat pixel size configurations very similar to configuration presets, i.e. it will try to detect if any of the pixel size presets matches the current state of the system. If the pixel size was previously defined the new setting will be added to its list of property settings. The new setting will override previously defined ones if it refers to the same property name.

Parameters
resolutionIDidentifier for one unique property setting
deviceLabeldevice label
propNameproperty name
valueproperty value

Referenced by loadSystemConfiguration().

◆ definePixelSizeConfig() [2/2]

void CMMCore::definePixelSizeConfig ( const char *  resolutionID)
throw (CMMError
)

Defines an empty pixel size entry.

◆ definePropertyBlock()

void CMMCore::definePropertyBlock ( const char *  blockName,
const char *  propertyName,
const char *  propertyValue 
)

Defines a reference for the collection of property-value pairs. This construct is useful for defining interchangeable equipment features, such as objective magnifications, filter wavelengths, etc.

References PropertyBlock::addPair().

Referenced by loadSystemConfiguration().

◆ defineStateLabel()

void CMMCore::defineStateLabel ( const char *  deviceLabel,
long  state,
const char *  label 
)
throw (CMMError
)

Defines a label for the specific state/

Parameters
deviceLabelthe device label
statethe state to be labeled
labelthe label for the specified state

References defineConfig(), deleteConfig(), getAvailableConfigGroups(), getAvailableConfigs(), getConfigData(), Configuration::isPropertyIncluded(), and Configuration::isSettingIncluded().

Referenced by loadSystemConfiguration().

◆ deleteConfig() [1/2]

void CMMCore::deleteConfig ( const char *  groupName,
const char *  configName 
)
throw (CMMError
)

Deletes a configuration from a group. The command will fail if the configuration was not previously defined.

References getCoreErrorText().

Referenced by defineStateLabel().

◆ deleteConfig() [2/2]

void CMMCore::deleteConfig ( const char *  groupName,
const char *  configName,
const char *  deviceLabel,
const char *  propName 
)
throw (CMMError
)

Deletes a property from a configuration in the specified group. The command will fail if the configuration was not previously defined.

References getCoreErrorText().

◆ deleteConfigGroup()

void CMMCore::deleteConfigGroup ( const char *  groupName)
throw (CMMError
)

Deletes an entire configuration group.

References getCoreErrorText(), and setChannelGroup().

◆ deleteGalvoPolygons()

void CMMCore::deleteGalvoPolygons ( const char *  deviceLabel)
throw (CMMError
)

Remove all added polygons

◆ deletePixelSizeConfig()

void CMMCore::deletePixelSizeConfig ( const char *  configName)
throw (CMMError
)

Deletes a pixel size configuration. The command will fail if the configuration was not previously defined.

References getCoreErrorText().

◆ detectDevice()

MM::DeviceDetectionStatus CMMCore::detectDevice ( char *  label)

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

Parameters
labelthe label of the device for which the serial port should be found

References getProperty(), and setProperty().

◆ deviceBusy()

bool CMMCore::deviceBusy ( const char *  label)
throw (CMMError
)

Checks the busy status of the specific device.

Parameters
labelthe device label
Returns
true if the device is busy

◆ deviceTypeBusy()

bool CMMCore::deviceTypeBusy ( MM::DeviceType  devType)
throw (CMMError
)

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
Parameters
devTypea constant specifying the device type

Referenced by systemBusy().

◆ displaySLMImage()

void CMMCore::displaySLMImage ( const char *  deviceLabel)
throw (CMMError
)

Display the waiting image on the SLM.

◆ enableContinuousFocus()

void CMMCore::enableContinuousFocus ( bool  enable)
throw (CMMError
)

Enables or disables the operation of the continuous focusing hardware device.

References getCoreErrorText(), and getDeviceName().

◆ enableDebugLog()

void CMMCore::enableDebugLog ( bool  enable)

Enable or disable logging of debug messages.

Parameters
enableif set to true, debug messages will be recorded in the log file

◆ enableStderrLog()

void CMMCore::enableStderrLog ( bool  enable)

Enables or disables log message display on the standard console.

Parameters
enableif set to true, log file messages will be echoed on the stderr.

◆ fullFocus()

void CMMCore::fullFocus ( )
throw (CMMError
)

Performs focus acquisition and lock for the one-shot focusing device.

References getCoreErrorText(), and getDeviceName().

◆ getAllowedPropertyValues()

std::vector< std::string > CMMCore::getAllowedPropertyValues ( const char *  label,
const char *  propName 
)
throw (CMMError
)

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
Parameters
labelthe device label
propNamethe property name

◆ getAPIVersionInfo()

string CMMCore::getAPIVersionInfo ( ) const

Returns the module and device interface versions.

◆ getAutoFocusDevice()

string CMMCore::getAutoFocusDevice ( )

Returns the label of the currently selected auto-focus device.

Referenced by setAutoFocusDevice().

◆ getAutoFocusOffset()

double CMMCore::getAutoFocusOffset ( )
throw (CMMError
)

◆ getAutoShutter()

bool CMMCore::getAutoShutter ( )

Returns the current setting of the auto-shutter option.

◆ getAvailableConfigGroups()

vector< string > CMMCore::getAvailableConfigGroups ( ) const

Returns the names of all defined configuration groups

Returns
an array of names of configuration groups

Referenced by defineStateLabel(), and saveSystemConfiguration().

◆ getAvailableConfigs()

vector< string > CMMCore::getAvailableConfigs ( const char *  group) const

Returns all defined configuration names in a given group

Returns
an array of configuration names

Referenced by defineStateLabel(), and saveSystemConfiguration().

◆ getAvailableDeviceDescriptions()

std::vector< std::string > CMMCore::getAvailableDeviceDescriptions ( const char *  moduleName)
throw (CMMError
)

Get descriptions for available devices from the specified library.

◆ getAvailableDevices()

std::vector< std::string > CMMCore::getAvailableDevices ( const char *  moduleName)
throw (CMMError
)

Get available devices from the specified device library.

◆ getAvailableDeviceTypes()

std::vector< long > CMMCore::getAvailableDeviceTypes ( const char *  moduleName)
throw (CMMError
)

Get type information for available devices from the specified library.

◆ getAvailablePixelSizeConfigs()

vector< string > CMMCore::getAvailablePixelSizeConfigs ( ) const

Returns all defined resolution preset names

Returns
an array of resolution presets

◆ getAvailablePropertyBlocks()

std::vector< std::string > CMMCore::getAvailablePropertyBlocks ( ) const

Returns all defined property block identifiers.

Referenced by saveSystemConfiguration().

◆ getBufferFreeCapacity()

long CMMCore::getBufferFreeCapacity ( )

Returns the number of images that can be added to the buffer without overflowing

◆ getBufferTotalCapacity()

long CMMCore::getBufferTotalCapacity ( )

Returns the total number of images that can be stored in the buffer

◆ getBytesPerPixel()

unsigned CMMCore::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

◆ getCameraChannelName()

string CMMCore::getCameraChannelName ( unsigned int  channelNr)

Returns the name of the requested channel as known by the default camera

◆ getCameraDevice()

string CMMCore::getCameraDevice ( )

Returns the label of the currently selected camera device.

Returns
camera name

Referenced by setCameraDevice().

◆ getChannelGroup()

string CMMCore::getChannelGroup ( )

Returns the group determining the channel selection.

◆ getCircularBufferMemoryFootprint()

unsigned CMMCore::getCircularBufferMemoryFootprint ( )

Returns the size of the Circular Buffer in MB

◆ getConfigData()

Configuration CMMCore::getConfigData ( const char *  groupName,
const char *  configName 
)
throw (CMMError
)

Returns the configuration object for a given group and name.

Returns
The configuration object

References getCoreErrorText().

Referenced by defineStateLabel(), getConfigGroupStateFromCache(), getConfigState(), saveSystemConfiguration(), and waitForConfig().

◆ getConfigGroupState()

Configuration CMMCore::getConfigGroupState ( const char *  group)
throw (CMMError
)

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.

Referenced by getConfigGroupStateFromCache(), getCurrentConfig(), and getCurrentConfigFromCache().

◆ getConfigGroupStateFromCache()

Configuration CMMCore::getConfigGroupStateFromCache ( const char *  group)
throw (CMMError
)

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.

References Configuration::addSetting(), getConfigData(), getConfigGroupState(), PropertySetting::getDeviceLabel(), getProperty(), getPropertyFromCache(), PropertySetting::getPropertyName(), Configuration::getSetting(), Configuration::isPropertyIncluded(), and Configuration::size().

◆ getConfigState()

Configuration CMMCore::getConfigState ( const char *  group,
const char *  config 
)
throw (CMMError
)

Returns a partial state of the system, only for devices included in the specified configuration.

References Configuration::addSetting(), getConfigData(), PropertySetting::getDeviceLabel(), getProperty(), PropertySetting::getPropertyName(), Configuration::getSetting(), and Configuration::size().

◆ getCoreErrorText()

string CMMCore::getCoreErrorText ( int  code) const

◆ getCurrentConfig()

string CMMCore::getCurrentConfig ( const char *  groupName)
throw (CMMError
)

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

References getConfigGroupState(), and Configuration::isConfigurationIncluded().

◆ getCurrentConfigFromCache()

string CMMCore::getCurrentConfigFromCache ( const char *  groupName)
throw (CMMError
)

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

References getConfigGroupState(), and Configuration::isConfigurationIncluded().

◆ getCurrentFocusScore()

double CMMCore::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.

◆ getCurrentPixelSizeConfig() [1/2]

string CMMCore::getCurrentPixelSizeConfig ( )
throw (CMMError
)

Get the current pixel configuration name

Referenced by getPixelSizeAffine(), and getPixelSizeUm().

◆ getCurrentPixelSizeConfig() [2/2]

string CMMCore::getCurrentPixelSizeConfig ( bool  cached)
throw (CMMError
)

◆ getData()

PropertyBlock CMMCore::getData ( const char *  deviceLabel)

Returns the collection of property-value pairs defined for the current state.

References getPropertyBlockData().

◆ getDeviceAdapterNames()

std::vector< std::string > CMMCore::getDeviceAdapterNames ( )
throw (CMMError
)

Return the names of discoverable device adapters.

Note that this list is constructed based on filename matching in the current search paths. This method does not check whether the files are valid and compatible device adapters.

◆ getDeviceAdapterSearchPaths()

std::vector< std::string > CMMCore::getDeviceAdapterSearchPaths ( )

Return the current device adapter search paths.

◆ getDeviceDelayMs()

double CMMCore::getDeviceDelayMs ( const char *  label)
throw (CMMError
)

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
Parameters
labelthe device label

◆ getDeviceDescription()

std::string CMMCore::getDeviceDescription ( const char *  label)
throw (CMMError
)

Returns description text for a given device label. "Description" is determined by the library and is immutable.

◆ getDeviceLibrary()

std::string CMMCore::getDeviceLibrary ( const char *  label)
throw (CMMError
)

Returns device library (aka module, device adapter) name.

◆ getDeviceName()

std::string CMMCore::getDeviceName ( const char *  label)
throw (CMMError
)

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.

Referenced by enableContinuousFocus(), fullFocus(), getAutoFocusOffset(), incrementalFocus(), initializeCircularBuffer(), isContinuousFocusEnabled(), setAutoFocusOffset(), startContinuousSequenceAcquisition(), startSequenceAcquisition(), and stopSequenceAcquisition().

◆ getDevicePropertyNames()

vector< string > CMMCore::getDevicePropertyNames ( const char *  label)
throw (CMMError
)

Returns all property names supported by the device.

Returns
property name array
Parameters
labelthe device label

◆ getDeviceType()

MM::DeviceType CMMCore::getDeviceType ( const char *  label)
throw (CMMError
)

Returns device type.

◆ getExposure() [1/2]

double CMMCore::getExposure ( )
throw (CMMError
)

Returns the current exposure setting of the camera in milliseconds.

Returns
the exposure time in milliseconds

◆ getExposure() [2/2]

double CMMCore::getExposure ( const char *  label)
throw (CMMError
)

Returns the current exposure setting of the specified camera in milliseconds.

Parameters
labelthe camera device label
Returns
the exposure time in milliseconds

◆ getExposureSequenceMaxLength()

long CMMCore::getExposureSequenceMaxLength ( const char *  cameraLabel)
throw (CMMError
)

Gets the maximum length of a camera's exposure sequence. This should only be called for cameras where exposure time is sequenceable

Parameters
cameraLabelthe camera device label

Referenced by loadExposureSequence().

◆ getFocusDevice()

string CMMCore::getFocusDevice ( )

Returns the label of the currently selected focus device.

Returns
focus stage name

Referenced by getPosition(), setAdapterOrigin(), setFocusDevice(), setOrigin(), setPosition(), and setRelativePosition().

◆ getFocusDirection()

int CMMCore::getFocusDirection ( const char *  stageLabel)
throw (CMMError
)

Get the focus direction of a stage.

Returns +1 if increasing position brings objective closer to sample, -1 if increasing position moves objective away from sample, or 0 if unknown. (Make sure to check for zero!)

The returned value is determined by the most recent call to setFocusDirection() for the stage, or defaults to what the stage device adapter declares (often 0, for unknown).

An exception is thrown if the direction has not been set and the device encounters an error when determining the default direction.

Referenced by saveSystemConfiguration().

◆ getGalvoChannel()

string CMMCore::getGalvoChannel ( const char *  deviceLabel)
throw (CMMError
)

Get the name of the active galvo channel (for a multi-laser galvo device).

◆ getGalvoDevice()

string CMMCore::getGalvoDevice ( )

Returns the label of the currently selected Galvo device.

Returns
galvo name

Referenced by setGalvoDevice().

◆ getGalvoPosition()

void CMMCore::getGalvoPosition ( const char *  deviceLabel,
double &  x,
double &  y 
)
throw (CMMError
)

Get the Galvo x,y position

◆ getGalvoXMinimum()

double CMMCore::getGalvoXMinimum ( const char *  deviceLabel)
throw (CMMError
)

Get the Galvo x minimum

◆ getGalvoXRange()

double CMMCore::getGalvoXRange ( const char *  deviceLabel)
throw (CMMError
)

Get the Galvo x range

◆ getGalvoYMinimum()

double CMMCore::getGalvoYMinimum ( const char *  deviceLabel)
throw (CMMError
)

Get the Galvo y minimum

◆ getGalvoYRange()

double CMMCore::getGalvoYRange ( const char *  deviceLabel)
throw (CMMError
)

Get the Galvo y range

◆ getHostName()

string CMMCore::getHostName ( ) const

return current computer name.

◆ getImage() [1/2]

void * CMMCore::getImage ( )
throw (CMMError
)

Exposes the internal image buffer.

Use to get the image acquired by snapImage

Multi-Channel cameras will return the content of the first channel in this function

Designed specifically for the SWIG wrapping for Java and scripting languages.

Supported data types are byte (8 bits per pixel, 1 component), short (16 bits per pixel, 1 component), float (32 bits per pixel, 1 component, not supported by the UI yet), RGB_32 (8 bits per component, 4 components), RGB_64 (16 bits per component, 4 components, not supported by UI yet). RGB buffers are expected to be in big endian ARGB format (ARGB8888), which means that on little endian the format is BGRA888 (see: https://en.wikipedia.org/wiki/RGBA_color_model).

Returns
a pointer to the internal image buffer.
Exceptions
CMMErrorwhen the camera returns no data

References getCoreErrorText().

◆ getImage() [2/2]

void * CMMCore::getImage ( unsigned  channelNr)
throw (CMMError
)

Returns the internal image buffer for a given Camera Channel

Use to get the image acquired by snapImage

Single channel cameras will return the content of their image buffer irrespective of the channelNr argument Designed specifically for the SWIG wrapping for Java and scripting languages.

Parameters
channelNrChannel number for which the image buffer is requested
Returns
a pointer to the internal image buffer.

References getCoreErrorText().

◆ getImageBitDepth()

unsigned CMMCore::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

◆ getImageBufferSize()

long CMMCore::getImageBufferSize ( )

Returns the size of the internal image buffer.

Returns
buffer size

◆ getImageHeight()

unsigned CMMCore::getImageHeight ( )

Vertical dimension of the image buffer in pixels.

Returns
the height in pixels (an integer)

◆ getImageProcessorDevice()

string CMMCore::getImageProcessorDevice ( )

Returns the label of the currently selected image processor device.

Referenced by setImageProcessorDevice().

◆ getImageWidth()

unsigned CMMCore::getImageWidth ( )

Horizontal dimension of the image buffer in pixels.

Returns
the width in pixels (an integer)

◆ getInstalledDevices()

std::vector< std::string > CMMCore::getInstalledDevices ( const char *  hubDeviceLabel)
throw (CMMError
)

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.

Currently, this method can only be called once, right after loading the hub device. Doing otherwise results in undefined behavior. This function was intended for use during initial configuration, not routine loading of devices. These restrictions may be relaxed in the future if possible.

Parameters
hubDeviceLabelthe label for the device of type Hub

◆ getLastFocusScore()

double CMMCore::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.

◆ getLastImage()

void * CMMCore::getLastImage ( )
throw (CMMError
)

Gets the last image from the circular buffer. Returns 0 if the buffer is empty.

References getCoreErrorText().

◆ getLastImageMD()

void * CMMCore::getLastImageMD ( Metadata &  md) const
throw (CMMError
)

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

Supported data types are byte (8 bits per pixel, 1 component), short (16 bits per pixel, 1 component), float (32 bits per pixel, 1 component, not supported by the UI yet), RGB_32 (8 bits per component, 4 components), RGB_64 (16 bits per component, 4 components, not supported by UI yet). RGB buffers are expected to be in big endian ARGB format (ARGB8888), which means that on little endian the format is BGRA888 (see: https://en.wikipedia.org/wiki/RGBA_color_model).

◆ getLoadedDevices()

vector< string > CMMCore::getLoadedDevices ( ) const

Returns an array of labels for currently loaded devices.

Returns
array of labels

◆ getLoadedDevicesOfType()

vector< string > CMMCore::getLoadedDevicesOfType ( MM::DeviceType  devType) const

Returns an array of labels for currently loaded devices of specific type.

Parameters
devTypethe device type identifier
Returns
array of labels

Referenced by getMagnificationFactor(), and updateCoreProperties().

◆ getMACAddresses()

std::vector< std::string > CMMCore::getMACAddresses ( void  )

Retrieve vector of MAC addresses for the Ethernet cards in the current computer formatted xx-xx-xx-xx-xx-xx

◆ getMagnificationFactor()

double CMMCore::getMagnificationFactor ( ) const

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

References getLoadedDevicesOfType().

Referenced by getPixelSizeAffine(), and getPixelSizeUm().

◆ getMultiROI()

void CMMCore::getMultiROI ( std::vector< unsigned > &  xs,
std::vector< unsigned > &  ys,
std::vector< unsigned > &  widths,
std::vector< unsigned > &  heights 
)
throw (CMMError
)

Get multiple ROIs from the current camera device. Will fail if the camera does not support multiple ROIs. Will return empty vectors if multiple ROIs are not currently being used.

Parameters
xs(Return value) X indices for the upper-left corners of each ROI.
ys(Return value) Y indices for the upper-left corners of each ROI.
widths(Return value) Width in pixels for each ROI.
heights(Return value) Height in pixels for each ROI.

References getCoreErrorText().

◆ getNBeforeLastImageMD()

void * CMMCore::getNBeforeLastImageMD ( unsigned long  n,
Metadata &  md 
) const
throw (CMMError
)

Returns a pointer to the pixels of the image that was inserted n images ago Also provides all metadata associated with that image

Supported data types are byte (8 bits per pixel, 1 component), short (16 bits per pixel, 1 component), float (32 bits per pixel, 1 component, not supported by the UI yet), RGB_32 (8 bits per component, 4 components), RGB_64 (16 bits per component, 4 components, not supported by UI yet). RGB buffers are expected to be in big endian ARGB format (ARGB8888), which means that on little endian the format is BGRA888 (see: https://en.wikipedia.org/wiki/RGBA_color_model).

References getCoreErrorText().

◆ getNumberOfCameraChannels()

unsigned CMMCore::getNumberOfCameraChannels ( )

Returns the number of simultaneous channels the default camera is returning.

◆ getNumberOfComponents()

unsigned CMMCore::getNumberOfComponents ( )

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

◆ getNumberOfStates()

long CMMCore::getNumberOfStates ( const char *  deviceLabel)

Returns the total number of available positions (states).

◆ getParentLabel()

std::string CMMCore::getParentLabel ( const char *  label)
throw (CMMError
)

Returns parent device.

◆ getPixelSizeAffine() [1/2]

std::vector< double > CMMCore::getPixelSizeAffine ( )
throw (CMMError
)

Returns the current Affine Transform to related camera pixels with stage movement.. This function returns the stored affine transform corrected for binning

◆ getPixelSizeAffine() [2/2]

std::vector< double > CMMCore::getPixelSizeAffine ( bool  cached)
throw (CMMError
)

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

References getCurrentPixelSizeConfig(), and getMagnificationFactor().

◆ getPixelSizeAffineByID()

std::vector< double > CMMCore::getPixelSizeAffineByID ( const char *  resolutionID)
throw (CMMError
)

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.

References getCoreErrorText().

◆ getPixelSizeConfigData()

Configuration CMMCore::getPixelSizeConfigData ( const char *  configName)
throw (CMMError
)

Returns the configuration object for a give pixel size preset.

Returns
The configuration object

References getCoreErrorText().

◆ getPixelSizeUm() [1/2]

double CMMCore::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() [2/2]

double CMMCore::getPixelSizeUm ( bool  cached)

Returns the current pixel size in microns. This method is based on sensing the current pixel size configuration and adjusting for the binning.

References getCurrentPixelSizeConfig(), and getMagnificationFactor().

◆ getPixelSizeUmByID()

double CMMCore::getPixelSizeUmByID ( const char *  resolutionID)
throw (CMMError
)

Returns the pixel size in um for the requested pixel size group

References getCoreErrorText().

◆ getPosition() [1/2]

double CMMCore::getPosition ( const char *  label)
throw (CMMError
)

Returns the current position of the stage in microns.

Returns
the position in microns
Parameters
labelthe single-axis drive device label

◆ getPosition() [2/2]

double CMMCore::getPosition ( )
throw (CMMError
)

Returns the current position of the stage in microns. Uses the current Z positioner (focus) device.

Returns
the position in microns

References getFocusDevice().

◆ getPrimaryLogFile()

std::string CMMCore::getPrimaryLogFile ( ) const

Return the name of the primary Core log file.

◆ getProperty()

string CMMCore::getProperty ( const char *  label,
const char *  propName 
)
throw (CMMError
)

Returns the property value for the specified device.

Returns
the property value
Parameters
labelthe device label
propNamethe property name

Referenced by detectDevice(), getConfigGroupStateFromCache(), getConfigState(), and getCurrentPixelSizeConfig().

◆ getPropertyBlockData()

PropertyBlock CMMCore::getPropertyBlockData ( const char *  blockName)

Returns the collection of property-value pairs defined in this block.

References getCoreErrorText().

Referenced by getData(), getStateLabelData(), and saveSystemConfiguration().

◆ getPropertyFromCache()

string CMMCore::getPropertyFromCache ( const char *  label,
const char *  propName 
) const
throw (CMMError
)

Returns the cached property value for the specified device.

Returns
the property value
Parameters
labelthe device label
propNamethe property name

References PropertySetting::getPropertyValue().

Referenced by getConfigGroupStateFromCache().

◆ getPropertyLowerLimit()

double CMMCore::getPropertyLowerLimit ( const char *  label,
const char *  propName 
)
throw (CMMError
)

Returns the property lower limit value, if the property has limits - 0 otherwise.

◆ getPropertySequenceMaxLength()

long CMMCore::getPropertySequenceMaxLength ( const char *  label,
const char *  propName 
)
throw (CMMError
)

Queries device property for the maximum number of events that can be put in a sequence

Parameters
labelthe device name
propNamethe property label

◆ getPropertyType()

MM::PropertyType CMMCore::getPropertyType ( const char *  label,
const char *  propName 
)
throw (CMMError
)

Returns the intrinsic property type.

◆ getPropertyUpperLimit()

double CMMCore::getPropertyUpperLimit ( const char *  label,
const char *  propName 
)
throw (CMMError
)

Returns the property upper limit value, if the property has limits - 0 otherwise.

◆ getRemainingImageCount()

long CMMCore::getRemainingImageCount ( )

Returns number ofimages available in the Circular Buffer

◆ getROI() [1/2]

void CMMCore::getROI ( int &  x,
int &  y,
int &  xSize,
int &  ySize 
)
throw (CMMError
)

Return the current hardware region of interest for a camera. If multiple ROIs are set, this method instead returns a rectangle that describes the image that the camera will generate.

The coordinates are in units of binned pixels. That is, conceptually, binning is applied before the ROI.

Parameters
xcoordinate of the top left corner
ycoordinate of the top left corner
xSizenumber of horizontal pixels
ySizenumber of horizontal pixels

◆ getROI() [2/2]

void CMMCore::getROI ( const char *  label,
int &  x,
int &  y,
int &  xSize,
int &  ySize 
)
throw (CMMError
)

Return the current hardware region of interest for a camera. If multiple ROIs are set, this method instead returns a rectangle that describes the image that the camera will generate.

Parameters
labelcamera label
xcoordinate of the top left corner
ycoordinate of the top left corner
xSizenumber of horizontal pixels
ySizenumber of vertical pixels

◆ getSerialPortAnswer()

std::string CMMCore::getSerialPortAnswer ( const char *  portLabel,
const char *  term 
)
throw (CMMError
)

Continuously read from the serial port until the terminating sequence is encountered.

◆ getShutterDevice()

string CMMCore::getShutterDevice ( )

Returns the label of the currently selected shutter device.

Returns
shutter name

Referenced by getShutterOpen(), setShutterDevice(), and setShutterOpen().

◆ getShutterOpen() [1/2]

bool CMMCore::getShutterOpen ( )
throw (CMMError
)

Returns the state of the currently selected (default) shutter.

References getShutterDevice().

Referenced by setShutterDevice().

◆ getShutterOpen() [2/2]

bool CMMCore::getShutterOpen ( const char *  shutterLabel)
throw (CMMError
)

Returns the state of the specified shutter.

Parameters
shutterLabelthe name of the shutter

◆ getSLMBytesPerPixel()

unsigned CMMCore::getSLMBytesPerPixel ( const char *  deviceLabel)
throw (CMMError
)

Returns the number of bytes per SLM pixel

Parameters
deviceLabelname of the SLM

◆ getSLMDevice()

string CMMCore::getSLMDevice ( )

Returns the label of the currently selected SLM device.

Returns
slm name

Referenced by setSLMDevice().

◆ getSLMExposure()

double CMMCore::getSLMExposure ( const char *  deviceLabel)
throw (CMMError
)

Returns the exposure time that will be used by the SLM for illumination

◆ getSLMHeight()

unsigned CMMCore::getSLMHeight ( const char *  deviceLabel)
throw (CMMError
)

Returns the height (in "pixels") of the SLM

Parameters
deviceLabelname of the SLM

◆ getSLMNumberOfComponents()

unsigned CMMCore::getSLMNumberOfComponents ( const char *  deviceLabel)
throw (CMMError
)

Returns the number of components (usually these depict colors) of the SLM For instance, an RGB projector will return 3, but a grey scale SLM returns 1

Parameters
deviceLabelname of the SLM

◆ getSLMSequenceMaxLength()

long CMMCore::getSLMSequenceMaxLength ( const char *  deviceLabel)
throw (CMMError
)

For SLMs that support sequences, returns the maximum length of the sequence that can be uploaded to the device

Parameters
deviceLabelname of the SLM

◆ getSLMWidth()

unsigned CMMCore::getSLMWidth ( const char *  deviceLabel)
throw (CMMError
)

Returns the width (in "pixels") of the SLM

Parameters
deviceLabelname of the SLM

◆ getStageSequenceMaxLength()

long CMMCore::getStageSequenceMaxLength ( const char *  label)
throw (CMMError
)

Gets the maximum length of a stage's position sequence. This should only be called for stages that are sequenceable

Parameters
labelthe stage device label
Returns
the maximum length (integer)

◆ getState()

long CMMCore::getState ( const char *  deviceLabel)
throw (CMMError
)

Returns the current state (position) on the specific device. The command will fail if the device does not support states.

Returns
the current state
Parameters
deviceLabelthe device label

◆ getStateFromLabel()

long CMMCore::getStateFromLabel ( const char *  deviceLabel,
const char *  stateLabel 
)
throw (CMMError
)

Obtain the state for a given label.

Returns
the state (an integer)
Parameters
deviceLabelthe device label
stateLabelthe label for which the state is being queried

Referenced by setStateLabel().

◆ getStateLabel()

string CMMCore::getStateLabel ( const char *  deviceLabel)
throw (CMMError
)

Returns the current state as the label (string).

Returns
the current state's label
Parameters
deviceLabelthe device label

◆ getStateLabelData()

PropertyBlock CMMCore::getStateLabelData ( const char *  deviceLabel,
const char *  stateLabel 
)

Returns the collection of property-value pairs defined for the specific device and state label.

References getPropertyBlockData().

◆ getStateLabels()

vector< string > CMMCore::getStateLabels ( const char *  deviceLabel)
throw (CMMError
)

Return labels for all states

Returns
an array of state labels
Parameters
deviceLabelthe device label

◆ getSystemState()

Configuration CMMCore::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

References Configuration::addSetting().

Referenced by saveSystemConfiguration(), saveSystemState(), and updateSystemStateCache().

◆ getSystemStateCache()

Configuration CMMCore::getSystemStateCache ( ) const

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

◆ getUserId()

string CMMCore::getUserId ( ) const

Displays current user name.

◆ getVersionInfo()

string CMMCore::getVersionInfo ( ) const

Displays core version.

◆ getXPosition() [1/2]

double CMMCore::getXPosition ( const char *  label)
throw (CMMError
)

Obtains the current position of the X axis of the XY stage in microns.

Returns
the x position
Parameters
labelthe stage device label

◆ getXPosition() [2/2]

double CMMCore::getXPosition ( )
throw (CMMError
)

Obtains the current position of the X axis of the XY stage in microns. Uses the current XY stage device.

Returns
the x position
Parameters
labelthe stage device label

References getXYStageDevice().

◆ getXYPosition() [1/2]

void CMMCore::getXYPosition ( const char *  label,
double &  x,
double &  y 
)
throw (CMMError
)

Obtains the current position of the XY stage in microns.

Parameters
labelthe stage device label
xa return parameter yielding the X position in microns
ya return parameter yielding the Y position in microns

Referenced by getXYPosition().

◆ getXYPosition() [2/2]

void CMMCore::getXYPosition ( double &  x,
double &  y 
)
throw (CMMError
)

Obtains the current position of the XY stage in microns. Uses the current XY stage device.

Parameters
xa return parameter yielding the X position in microns
ya return parameter yielding the Y position in microns

References getXYPosition(), and getXYStageDevice().

◆ getXYStageDevice()

string CMMCore::getXYStageDevice ( )

◆ getXYStageSequenceMaxLength()

long CMMCore::getXYStageSequenceMaxLength ( const char *  label)
throw (CMMError
)

Gets the maximum length of an XY stage's position sequence. This should only be called for XY stages that are sequenceable

Parameters
labelthe XY stage device label
Returns
the maximum allowed sequence length

◆ getYPosition() [1/2]

double CMMCore::getYPosition ( const char *  label)
throw (CMMError
)

Obtains the current position of the Y axis of the XY stage in microns.

Returns
the y position
Parameters
labelthe stage device label

◆ getYPosition() [2/2]

double CMMCore::getYPosition ( )
throw (CMMError
)

Obtains the current position of the Y axis of the XY stage in microns. Uses the current XY stage device.

Returns
the y position
Parameters
labelthe stage device label

References getXYStageDevice().

◆ hasProperty()

bool CMMCore::hasProperty ( const char *  label,
const char *  propName 
)
throw (CMMError
)

Checks if device has a property with a specified name. The exception will be thrown in case device label is not defined.

◆ hasPropertyLimits()

bool CMMCore::hasPropertyLimits ( const char *  label,
const char *  propName 
)
throw (CMMError
)

Queries device if the specific property has limits.

Parameters
labelthe device name
propNamethe property label

◆ home()

void CMMCore::home ( const char *  label)
throw (CMMError
)

Perform a hardware homing operation for an XY or focus/Z stage.

Not all stages support this operation. The user should be warned before calling this method, as it can cause large stage movements, potentially resulting in collision (e.g. with an expensive objective lens).

Parameters
labelthe stage device label (either XY or focus/Z stage)

◆ incrementalFocus()

void CMMCore::incrementalFocus ( )
throw (CMMError
)

Performs incremental focus for the one-shot focusing device.

References getCoreErrorText(), and getDeviceName().

◆ initializeAllDevices()

void CMMCore::initializeAllDevices ( )
throw (CMMError
)

Calls Initialize() method for each loaded device. This method also initialized allowed values for core properties, based on the collection of loaded devices.

References CMMError::getMsg(), and updateCoreProperties().

◆ initializeCircularBuffer()

void CMMCore::initializeCircularBuffer ( )
throw (CMMError
)

Initialize circular buffer based on the current camera settings.

References getCoreErrorText(), and getDeviceName().

◆ initializeDevice()

void CMMCore::initializeDevice ( const char *  label)
throw (CMMError
)

Initializes specific device.

Parameters
labelthe device label
Parameters
labelthe device to initialize

References updateCoreProperties().

◆ isBufferOverflowed()

bool CMMCore::isBufferOverflowed ( ) const

Indicates whether the circular buffer is overflowed

◆ isConfigDefined()

bool CMMCore::isConfigDefined ( const char *  groupName,
const char *  configName 
)

Checks if the configuration already exists within a group.

Returns
true if the configuration is already defined

Referenced by loadSystemConfiguration(), and reset().

◆ isContinuousFocusDrive()

bool CMMCore::isContinuousFocusDrive ( const char *  stageLabel)
throw (CMMError
)

Check if a stage has continuous focusing capability (positions can be set while continuous focus runs).

◆ isContinuousFocusEnabled()

bool CMMCore::isContinuousFocusEnabled ( )
throw (CMMError
)

Checks if the continuous focusing hardware device is ON or OFF.

References getDeviceName().

◆ isContinuousFocusLocked()

bool CMMCore::isContinuousFocusLocked ( )
throw (CMMError
)

Returns the lock-in status of the continuous focusing device.

◆ isExposureSequenceable()

bool CMMCore::isExposureSequenceable ( const char *  cameraLabel)
throw (CMMError
)

Queries camera if exposure can be used in a sequence

Parameters
cameraLabelthe camera device label
Returns
true if exposure can be sequenced

◆ isGroupDefined()

bool CMMCore::isGroupDefined ( const char *  groupName)

Checks if the group already exists.

Returns
true if the group is already defined

◆ isMultiROIEnabled()

bool CMMCore::isMultiROIEnabled ( )
throw (CMMError
)

Queries the camera to determine if multiple ROIs are currently set.

References getCoreErrorText().

◆ isMultiROISupported()

bool CMMCore::isMultiROISupported ( )
throw (CMMError
)

Queries the camera to determine if it supports multiple ROIs.

References getCoreErrorText().

◆ isPixelSizeConfigDefined()

bool CMMCore::isPixelSizeConfigDefined ( const char *  resolutionID) const
throw (CMMError
)

Checks if the Pixel Size Resolution already exists

Returns
true if the configuration is already defined

◆ isPropertyPreInit()

bool CMMCore::isPropertyPreInit ( const char *  label,
const char *  propName 
)
throw (CMMError
)

Tells us whether the property must be defined prior to initialization.

Returns
true for pre-init property
Parameters
labelthe device label
propNamethe property name

◆ isPropertyReadOnly()

bool CMMCore::isPropertyReadOnly ( const char *  label,
const char *  propName 
)
throw (CMMError
)

Tells us whether the property can be modified.

Returns
true for a read-only property
Parameters
labelthe device label
propNamethe property name

Referenced by saveSystemState().

◆ isPropertySequenceable()

bool CMMCore::isPropertySequenceable ( const char *  label,
const char *  propName 
)
throw (CMMError
)

Queries device if the specified property can be used in a sequence

Parameters
labelthe device name
propNamethe property label

◆ isSequenceRunning() [1/2]

bool CMMCore::isSequenceRunning ( )
throw (
)

Check if the current camera is acquiring the sequence Returns false when the sequence is done

Referenced by setCameraDevice().

◆ isSequenceRunning() [2/2]

bool CMMCore::isSequenceRunning ( const char *  label)
throw (CMMError
)

Check if the specified camera is acquiring the sequence Returns false when the sequence is done

◆ isStageLinearSequenceable()

bool CMMCore::isStageLinearSequenceable ( const char *  label)
throw (CMMError
)

Queries if the stage can be used in a linear sequence A linear sequence is defined by a stepsize and number of slices

Parameters
labelthe stage device label
Returns
true if the stage supports linear sequences

◆ isStageSequenceable()

bool CMMCore::isStageSequenceable ( const char *  label)
throw (CMMError
)

Queries stage if it can be used in a sequence

Parameters
labelthe stage device label
Returns
true if the stage can be sequenced

◆ isXYStageSequenceable()

bool CMMCore::isXYStageSequenceable ( const char *  label)
throw (CMMError
)

Queries XY stage if it can be used in a sequence

Parameters
labelthe XY stage device label

◆ loadDevice()

void CMMCore::loadDevice ( const char *  label,
const char *  moduleName,
const char *  deviceName 
)
throw (CMMError
)

Loads a device from the plugin library.

Parameters
labelassigned name for the device during the core session
moduleNamethe name of the device adapter module (short name, not full file name)
deviceNamethe name of the device. The name must correspond to one of the names recognized by the specific plugin library.

Referenced by loadSystemConfiguration().

◆ loadExposureSequence()

void CMMCore::loadExposureSequence ( const char *  cameraLabel,
std::vector< double >  exposureTime_ms 
)
throw (CMMError
)

Transfer a sequence of exposure times to the camera. This should only be called for cameras where exposure time is sequenceable

Parameters
cameraLabelthe camera device label
exposureTime_mssequence of exposure times the camera will use during a sequence acquisition

References getExposureSequenceMaxLength().

◆ loadGalvoPolygons()

void CMMCore::loadGalvoPolygons ( const char *  deviceLabel)
throw (CMMError
)

Load a set of galvo polygons to the device

◆ loadPropertySequence()

void CMMCore::loadPropertySequence ( const char *  label,
const char *  propName,
std::vector< std::string >  eventSequence 
)
throw (CMMError
)

Transfer a sequence of events/states/whatever to the device This should only be called for device-properties that are sequenceable

Parameters
labelthe device name
propNamethe property label
eventSequencethe sequence of events/states that the device will execute in response to external triggers

◆ loadSLMSequence()

void CMMCore::loadSLMSequence ( const char *  deviceLabel,
std::vector< unsigned char *>  imageSequence 
)
throw (CMMError
)

Load a sequence of images into the SLM

Parameters
deviceLabelname of the SLM
imagesequencepointers to the images to be used in the sequence

◆ loadStageSequence()

void CMMCore::loadStageSequence ( const char *  label,
std::vector< double >  positionSequence 
)
throw (CMMError
)

Transfer a sequence of events/states/whatever to the device This should only be called for device-properties that are sequenceable

Parameters
labelthe device label
positionSequencea sequence of positions that the stage will execute in response to external triggers

◆ loadSystemConfiguration()

void CMMCore::loadSystemConfiguration ( const char *  fileName)
throw (CMMError
)

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.

Format specification: Each line consists of a number of string fields separated by "," (comma) characters. Lines beginning with "#" are ignored (can be used for comments). Each line in the file will be parsed by the system and as a result a corresponding command will be immediately executed. The first field in the line always specifies the command from the following set of values: Device - executes loadDevice() Label - executes defineStateLabel() command Equipment - executes definePropertyBlockCommand() Property - executes setPropertyCommand() Configuration - ignored for backward compatibility

The remaining fields in the line will be used for corresponding command parameters. The number of parameters depends on the actual command used.

References assignImageSynchro(), defineConfig(), defineConfigGroup(), definePixelSizeConfig(), definePropertyBlock(), defineStateLabel(), getCoreErrorText(), CMMError::getFullMsg(), isConfigDefined(), loadDevice(), setConfig(), setDeviceDelayMs(), setFocusDirection(), setParentLabel(), setPixelSizeAffine(), setPixelSizeUm(), setProperty(), unloadAllDevices(), updateSystemStateCache(), and waitForSystem().

◆ loadSystemState()

void CMMCore::loadSystemState ( const char *  fileName)
throw (CMMError
)

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.

Format specification: the same as in loadSystemConfiguration() command

References getCoreErrorText(), and setProperty().

◆ loadXYStageSequence()

void CMMCore::loadXYStageSequence ( const char *  label,
std::vector< double >  xSequence,
std::vector< double >  ySequence 
)
throw (CMMError
)

Transfer a sequence of stage positions to the xy stage. xSequence and ySequence must have the same length. This should only be called for XY stages that are sequenceable

Parameters
labelthe XY stage device label
xSequencethe sequence of x positions that the stage will execute in response to external triggers
ySequencethe sequence of y positions that the stage will execute in response to external triggers

◆ logMessage() [1/2]

void CMMCore::logMessage ( const char *  msg)

Record text message in the log file.

◆ logMessage() [2/2]

void CMMCore::logMessage ( const char *  msg,
bool  debugOnly 
)

Record text message in the log file.

◆ noop()

static void CMMCore::noop ( )
inlinestatic

A static method that does nothing.

This method can be called as a sanity check when dynamically loading the Core library (e.g. through a foreign function interface for a high-level language).

◆ pointGalvoAndFire()

void CMMCore::pointGalvoAndFire ( const char *  deviceLabel,
double  x,
double  y,
double  pulseTime_us 
)
throw (CMMError
)

Set the Galvo to an x,y position and fire the laser for a predetermined duration.

◆ popNextImage()

void * CMMCore::popNextImage ( )
throw (CMMError
)

Gets and removes the next image from the circular buffer. Returns 0 if the buffer is empty.

Supported data types are byte (8 bits per pixel, 1 component), short (16 bits per pixel, 1 component), float (32 bits per pixel, 1 component, not supported by the UI yet), RGB_32 (8 bits per component, 4 components), RGB_64 (16 bits per component, 4 components, not supported by UI yet). RGB buffers are expected to be in big endian ARGB format (ARGB8888), which means that on little endian the format is BGRA888 (see: https://en.wikipedia.org/wiki/RGBA_color_model).

References getCoreErrorText().

◆ popNextImageMD() [1/2]

void * CMMCore::popNextImageMD ( unsigned  channel,
unsigned  slice,
Metadata &  md 
)
throw (CMMError
)

Gets and removes the next image (and metadata) from the circular buffer channel indicates which cameraChannel image should be retrieved. slice has not been implement and should always be 0

References getCoreErrorText().

Referenced by popNextImageMD().

◆ popNextImageMD() [2/2]

void * CMMCore::popNextImageMD ( Metadata &  md)
throw (CMMError
)

Gets and removes the next image (and metadata) from the circular buffer

References popNextImageMD().

◆ prepareSequenceAcquisition()

void CMMCore::prepareSequenceAcquisition ( const char *  label)
throw (CMMError
)

Prepare the camera for the sequence acquisition to save the time in the StartSequenceAcqusition() call which is supposed to come next.

References getCoreErrorText().

◆ readFromSerialPort()

vector< char > CMMCore::readFromSerialPort ( const char *  portLabel)
throw (CMMError
)

Reads the contents of the Rx buffer.

◆ registerCallback()

void CMMCore::registerCallback ( MMEventCallback cb)

Register a callback (listener class). MMCore will send notifications on internal events using this interface

◆ removeImageSynchro()

void CMMCore::removeImageSynchro ( const char *  label)
throw (CMMError
)

Removes device from the image-synchro list.

Parameters
labelthe device label

◆ removeImageSynchroAll()

void CMMCore::removeImageSynchroAll ( )

Clears the image synchro device list.

◆ renameConfig()

void CMMCore::renameConfig ( const char *  groupName,
const char *  oldConfigName,
const char *  newConfigName 
)
throw (CMMError
)

Renames a configuration within a specified group. The command will fail if the configuration was not previously defined.

References getCoreErrorText().

◆ renameConfigGroup()

void CMMCore::renameConfigGroup ( const char *  oldGroupName,
const char *  newGroupName 
)
throw (CMMError
)

Renames a configuration group.

References getCoreErrorText(), and setChannelGroup().

◆ renamePixelSizeConfig()

void CMMCore::renamePixelSizeConfig ( const char *  oldConfigName,
const char *  newConfigName 
)
throw (CMMError
)

Renames a pixel size configuration. The command will fail if the configuration was not previously defined.

References getCoreErrorText().

◆ reset()

void CMMCore::reset ( )
throw (CMMError
)

Unloads all devices from the core, clears all configuration data and property blocks.

References isConfigDefined(), setConfig(), unloadAllDevices(), and waitForSystem().

Referenced by ~CMMCore().

◆ runGalvoPolygons()

void CMMCore::runGalvoPolygons ( const char *  deviceLabel)
throw (CMMError
)

Run a loop of galvo polygons

◆ runGalvoSequence()

void CMMCore::runGalvoSequence ( const char *  deviceLabel)
throw (CMMError
)

Run a sequence of galvo positions

◆ saveSystemConfiguration()

void CMMCore::saveSystemConfiguration ( const char *  fileName)
throw (CMMError
)

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.

References getAvailableConfigGroups(), getAvailableConfigs(), getAvailablePropertyBlocks(), getConfigData(), getCoreErrorText(), PropertySetting::getDeviceLabel(), getFocusDirection(), PropertyBlock::getPair(), getPropertyBlockData(), PropertySetting::getPropertyName(), PropertyPair::getPropertyName(), PropertySetting::getPropertyValue(), PropertyPair::getPropertyValue(), Configuration::getSetting(), getSystemState(), Configuration::size(), and PropertyBlock::size().

◆ saveSystemState()

void CMMCore::saveSystemState ( const char *  fileName)
throw (CMMError
)

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.

References getCoreErrorText(), PropertySetting::getDeviceLabel(), PropertySetting::getPropertyName(), PropertySetting::getPropertyValue(), Configuration::getSetting(), getSystemState(), isPropertyReadOnly(), and Configuration::size().

◆ setAdapterOrigin() [1/2]

void CMMCore::setAdapterOrigin ( const char *  label,
double  newZUm 
)
throw (CMMError
)

Enable software translation of coordinates for the given focus/Z stage.

The current position of the stage becomes Z = newZUm. Only some stages support this functionality; it is recommended that setOrigin() be used instead where available.

Parameters
labelthe stage device label
newZUmthe new coordinate to assign to the current Z position

Referenced by setAdapterOrigin().

◆ setAdapterOrigin() [2/2]

void CMMCore::setAdapterOrigin ( double  newZUm)
throw (CMMError
)

Enable software translation of coordinates for the current focus/Z stage.

The current position of the stage becomes Z = newZUm. Only some stages support this functionality; it is recommended that setOrigin() be used instead where available.

Parameters
newZUmthe new coordinate to assign to the current Z position

References getFocusDevice(), and setAdapterOrigin().

◆ setAdapterOriginXY() [1/2]

void CMMCore::setAdapterOriginXY ( const char *  label,
double  newXUm,
double  newYUm 
)
throw (CMMError
)

Enable software translation of coordinates for the given XY stage.

The current position of the stage becomes (newXUm, newYUm). It is recommended that setOriginXY() be used instead where available.

Parameters
labelthe XY stage device label
newXUmthe new coordinate to assign to the current X position
newYUmthe new coordinate to assign to the current Y position

Referenced by setAdapterOriginXY().

◆ setAdapterOriginXY() [2/2]

void CMMCore::setAdapterOriginXY ( double  newXUm,
double  newYUm 
)
throw (CMMError
)

Enable software translation of coordinates for the current XY stage.

The current position of the stage becomes (newXUm, newYUm). It is recommended that setOriginXY() be used instead where available.

Parameters
newXUmthe new coordinate to assign to the current X position
newYUmthe new coordinate to assign to the current Y position

References getXYStageDevice(), and setAdapterOriginXY().

◆ setAutoFocusDevice()

void CMMCore::setAutoFocusDevice ( const char *  autofocusLabel)
throw (CMMError
)

Sets the current auto-focus device.

References getAutoFocusDevice().

◆ setAutoFocusOffset()

void CMMCore::setAutoFocusOffset ( double  offset)
throw (CMMError
)

Applies offset the one-shot focusing device.

References getCoreErrorText(), and getDeviceName().

◆ setAutoShutter()

void CMMCore::setAutoShutter ( bool  state)

If this option is enabled Shutter automatically opens and closes when the image is acquired.

Parameters
statetrue for enabled

◆ setCameraDevice()

void CMMCore::setCameraDevice ( const char *  cameraLabel)
throw (CMMError
)

Sets the current camera device.

Parameters
camerathe camera device label

References getCameraDevice(), and isSequenceRunning().

◆ setChannelGroup()

void CMMCore::setChannelGroup ( const char *  chGroup)
throw (CMMError
)

Specifies the group determining the channel selection.

Referenced by deleteConfigGroup(), and renameConfigGroup().

◆ setCircularBufferMemoryFootprint()

void CMMCore::setCircularBufferMemoryFootprint ( unsigned  sizeMB)
throw (CMMError
)

Reserve memory for the circular buffer.

Parameters
sizeMBn megabytes

References getCoreErrorText().

◆ setConfig()

void CMMCore::setConfig ( const char *  groupName,
const char *  configName 
)
throw (CMMError
)

Applies a configuration to a group. The command will fail if the configuration was not previously defined.

Parameters
groupNamethe configuration group name
configNamethe configuration preset name

Referenced by loadSystemConfiguration(), and reset().

◆ setDeviceAdapterSearchPaths()

void CMMCore::setDeviceAdapterSearchPaths ( const std::vector< std::string > &  paths)

Set the device adapter search paths.

Upon subsequent attempts to load device adapters, these paths (and only these paths) will be searched. Calling this function has no effect on device adapters that have already been loaded.

If you want to simply add to the list of paths, you must first retrieve the current paths by calling getDeviceAdapterSearchPaths().

Parameters
pathsthe device adapter search paths

◆ setDeviceDelayMs()

void CMMCore::setDeviceDelayMs ( const char *  label,
double  delayMs 
)
throw (CMMError
)

Overrides the built-in value for the action delay. Some devices ignore this setting.

Parameters
labelthe device label
delayMsthe desired delay in milliseconds

Referenced by loadSystemConfiguration().

◆ setExposure() [1/2]

void CMMCore::setExposure ( double  dExp)
throw (CMMError
)

Sets the exposure setting of the current camera in milliseconds.

Parameters
dExpthe exposure in milliseconds

References getCoreErrorText().

◆ setExposure() [2/2]

void CMMCore::setExposure ( const char *  label,
double  dExp 
)
throw (CMMError
)

Sets the exposure setting of the specified camera in milliseconds.

Parameters
labelthe camera device label
dExpthe exposure in milliseconds

◆ setFocusDevice()

void CMMCore::setFocusDevice ( const char *  focusLabel)
throw (CMMError
)

Sets the current focus device.

Parameters
focusthe focus stage device label

References getFocusDevice().

◆ setFocusDirection()

void CMMCore::setFocusDirection ( const char *  stageLabel,
int  sign 
)

Set the focus direction of a stage.

The sign should be +1 (or any positive value), zero, or -1 (or any negative value), and is interpreted in the same way as the return value of getFocusDirection().

Once this method is called, getFocusDirection() for the stage will always return the set value.

Referenced by loadSystemConfiguration().

◆ setGalvoDevice()

void CMMCore::setGalvoDevice ( const char *  galvoLabel)
throw (CMMError
)

Sets the current galvo device.

References getGalvoDevice().

◆ setGalvoIlluminationState()

void CMMCore::setGalvoIlluminationState ( const char *  deviceLabel,
bool  on 
)
throw (CMMError
)

Set the galvo's illumination state to on or off

◆ setGalvoPolygonRepetitions()

void CMMCore::setGalvoPolygonRepetitions ( const char *  deviceLabel,
int  repetitions 
)
throw (CMMError
)

Set the number of times to loop galvo polygons

◆ setGalvoPosition()

void CMMCore::setGalvoPosition ( const char *  deviceLabel,
double  x,
double  y 
)
throw (CMMError
)

Set the Galvo to an x,y position

◆ setImageProcessorDevice()

void CMMCore::setImageProcessorDevice ( const char *  procLabel)
throw (CMMError
)

Sets the current image processor device.

References getImageProcessorDevice().

◆ setMultiROI()

void CMMCore::setMultiROI ( std::vector< unsigned >  xs,
std::vector< unsigned >  ys,
std::vector< unsigned >  widths,
std::vector< unsigned >  heights 
)
throw (CMMError
)

Set multiple ROIs for the current camera device. Will fail if the camera does not support multiple ROIs, any widths or heights are non-positive, or if the vectors do not all have the same length.

Parameters
xsX indices for the upper-left corners of each ROI.
ysY indices for the upper-left corners of each ROI.
widthsWidth in pixels for each ROI.
heightsHeight in pixels for each ROI.

References getCoreErrorText().

◆ setOrigin() [1/2]

void CMMCore::setOrigin ( const char *  label)
throw (CMMError
)

Zero the given focus/Z stage's coordinates at the current position.

The current position becomes the new origin (Z = 0). Not to be confused with setAdapterOrigin().

Parameters
labelthe stage device label

◆ setOrigin() [2/2]

void CMMCore::setOrigin ( )
throw (CMMError
)

Zero the current focus/Z stage's coordinates at the current position.

The current position becomes the new origin (Z = 0). Not to be confused with setAdapterOrigin().

References getFocusDevice().

◆ setOriginX() [1/2]

void CMMCore::setOriginX ( const char *  label)
throw (CMMError
)

Zero the given XY stage's X coordinate at the current position.

The current position becomes the new X = 0.

Parameters
labelthe xy stage device label

◆ setOriginX() [2/2]

void CMMCore::setOriginX ( )
throw (CMMError
)

Zero the given XY stage's X coordinate at the current position.

The current position becomes the new X = 0.

References getXYStageDevice().

◆ setOriginXY() [1/2]

void CMMCore::setOriginXY ( const char *  label)
throw (CMMError
)

Zero the given XY stage's coordinates at the current position.

The current position becomes the new origin. Not to be confused with setAdapterOriginXY().

Parameters
labelthe stage device label

◆ setOriginXY() [2/2]

void CMMCore::setOriginXY ( )
throw (CMMError
)

Zero the current XY stage's coordinates at the current position.

The current position becomes the new origin. Not to be confused with setAdapterOriginXY().

References getXYStageDevice().

◆ setOriginY() [1/2]

void CMMCore::setOriginY ( const char *  label)
throw (CMMError
)

Zero the given XY stage's Y coordinate at the current position.

The current position becomes the new Y = 0.

Parameters
labelthe xy stage device label

◆ setOriginY() [2/2]

void CMMCore::setOriginY ( )
throw (CMMError
)

Zero the given XY stage's Y coordinate at the current position.

The current position becomes the new Y = 0.

References getXYStageDevice().

◆ setParentLabel()

void CMMCore::setParentLabel ( const char *  label,
const char *  parentLabel 
)
throw (CMMError
)

Sets parent device label

Referenced by loadSystemConfiguration().

◆ setPixelSizeAffine()

void CMMCore::setPixelSizeAffine ( const char *  resolutionID,
std::vector< double >  affine 
)
throw (CMMError
)

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

References getCoreErrorText().

Referenced by loadSystemConfiguration().

◆ setPixelSizeConfig()

void CMMCore::setPixelSizeConfig ( const char *  resolutionID)
throw (CMMError
)

Applies a Pixel Size Configuration. The command will fail if the configuration was not previously defined.

Parameters
groupNamethe configuration group name
configNamethe configuration preset name

References CMMError::getCode(), and getCoreErrorText().

◆ setPixelSizeUm()

void CMMCore::setPixelSizeUm ( const char *  resolutionID,
double  pixSize 
)
throw (CMMError
)

Sets pixel size in microns for the specified resolution sensing configuration preset.

References getCoreErrorText().

Referenced by loadSystemConfiguration().

◆ setPosition() [1/2]

void CMMCore::setPosition ( const char *  label,
double  position 
)
throw (CMMError
)

Sets the position of the stage in microns.

Parameters
labelthe stage device label
positionthe desired stage position, in microns

Referenced by setPosition().

◆ setPosition() [2/2]

void CMMCore::setPosition ( double  position)
throw (CMMError
)

Sets the position of the stage in microns. Uses the current Z positioner (focus) device.

Parameters
positionthe desired stage position, in microns

References getFocusDevice(), and setPosition().

◆ setPrimaryLogFile()

void CMMCore::setPrimaryLogFile ( const char *  filename,
bool  truncate = false 
)
throw (CMMError
)

Set the primary Core log file.

Parameters
filenameThe log filename. If empty or null, the primary log file is disabled.

◆ setProperty() [1/5]

void CMMCore::setProperty ( const char *  label,
const char *  propName,
const char *  propValue 
)
throw (CMMError
)

Changes the value of the device property.

Parameters
labelthe device label
propNamethe property name
propValuethe new property value

Referenced by detectDevice(), loadSystemConfiguration(), loadSystemState(), setProperty(), setSerialProperties(), and setSystemState().

◆ setProperty() [2/5]

void CMMCore::setProperty ( const char *  label,
const char *  propName,
const bool  propValue 
)
throw (CMMError
)

Changes the value of the device property.

Parameters
labelthe device label
propNameproperty name
propValuethe new property value

References setProperty().

◆ setProperty() [3/5]

void CMMCore::setProperty ( const char *  label,
const char *  propName,
const long  propValue 
)
throw (CMMError
)

Changes the value of the device property.

Parameters
labelthe device label
propNamethe property name
propValuethe new property value

References setProperty().

◆ setProperty() [4/5]

void CMMCore::setProperty ( const char *  label,
const char *  propName,
const float  propValue 
)
throw (CMMError
)

Changes the value of the device property.

Parameters
labelthe device label
propNamethe property name
propValuethe new property value

References setProperty().

◆ setProperty() [5/5]

void CMMCore::setProperty ( const char *  label,
const char *  propName,
const double  propValue 
)
throw (CMMError
)

Changes the value of the device property.

Parameters
labelthe device label
propNamethe property name
propValuethe new property value

References setProperty().

◆ setRelativePosition() [1/2]

void CMMCore::setRelativePosition ( const char *  label,
double  d 
)
throw (CMMError
)

Sets the relative position of the stage in microns.

Parameters
labelthe single-axis drive device label
dthe amount to move the stage, in microns (positive or negative)

Referenced by setRelativePosition().

◆ setRelativePosition() [2/2]

void CMMCore::setRelativePosition ( double  d)
throw (CMMError
)

Sets the relative position of the stage in microns. Uses the current Z positioner (focus) device.

Parameters
dthe amount to move the stage, in microns (positive or negative)

References getFocusDevice(), and setRelativePosition().

◆ setRelativeXYPosition() [1/2]

void CMMCore::setRelativeXYPosition ( const char *  label,
double  dx,
double  dy 
)
throw (CMMError
)

Sets the relative position of the XY stage in microns.

Parameters
labelthe xy stage device label
dxthe distance to move in X (positive or negative)
dythe distance to move in Y (positive or negative)

Referenced by setRelativeXYPosition().

◆ setRelativeXYPosition() [2/2]

void CMMCore::setRelativeXYPosition ( double  dx,
double  dy 
)
throw (CMMError
)

Sets the relative position of the XY stage in microns. Uses the current XY stage device.

Parameters
dxthe distance to move in X (positive or negative)
dythe distance to move in Y (positive or negative)

References getXYStageDevice(), and setRelativeXYPosition().

◆ setROI() [1/2]

void CMMCore::setROI ( int  x,
int  y,
int  xSize,
int  ySize 
)
throw (CMMError
)

Set the hardware region of interest for the current camera.

A successful call to this method will clear any images in the sequence buffer, even if the ROI does not change.

If multiple ROIs are set prior to this call, they will be replaced by the new single ROI.

The coordinates are in units of binned pixels. That is, conceptually, binning is applied before the ROI.

Parameters
xcoordinate of the top left corner
ycoordinate of the top left corner
xSizenumber of horizontal pixels
ySizenumber of horizontal pixels

References getCoreErrorText().

◆ setROI() [2/2]

void CMMCore::setROI ( const char *  label,
int  x,
int  y,
int  xSize,
int  ySize 
)
throw (CMMError
)

Set the hardware region of interest for a specified camera.

A successful call to this method will clear any images in the sequence buffer, even if the ROI does not change.

Warning: the clearing of the sequence buffer will interfere with any sequence acquisitions currently being performed on other cameras.

If multiple ROIs are set prior to this call, they will be replaced by the new single ROI.

The coordinates are in units of binned pixels. That is, conceptually, binning is applied before the ROI.

Parameters
labelcamera label
xcoordinate of the top left corner
ycoordinate of the top left corner
xSizenumber of horizontal pixels
ySizenumber of horizontal pixels

References getCoreErrorText().

◆ setSerialPortCommand()

void CMMCore::setSerialPortCommand ( const char *  portLabel,
const char *  command,
const char *  term 
)
throw (CMMError
)

Send string to the serial device and return an answer. This command blocks until it receives an answer from the device terminated by the specified sequence.

◆ setSerialProperties()

void CMMCore::setSerialProperties ( const char *  portName,
const char *  answerTimeout,
const char *  baudRate,
const char *  delayBetweenCharsMs,
const char *  handshaking,
const char *  parity,
const char *  stopBits 
)
throw (CMMError
)

Sets all com port properties in a single call

References setProperty().

◆ setShutterDevice()

void CMMCore::setShutterDevice ( const char *  shutterLabel)
throw (CMMError
)

Sets the current shutter device.

Parameters
shutterthe shutter device label

References getShutterDevice(), getShutterOpen(), and setShutterOpen().

◆ setShutterOpen() [1/2]

void CMMCore::setShutterOpen ( bool  state)
throw (CMMError
)

Opens or closes the currently selected (default) shutter.

Parameters
statethe desired state of the shutter (true for open)

References getShutterDevice().

Referenced by setShutterDevice().

◆ setShutterOpen() [2/2]

void CMMCore::setShutterOpen ( const char *  shutterLabel,
bool  state 
)
throw (CMMError
)

Opens or closes the specified shutter.

Parameters
statethe desired state of the shutter (true for open)

◆ setSLMDevice()

void CMMCore::setSLMDevice ( const char *  slmLabel)
throw (CMMError
)

Sets the current slm device.

References getSLMDevice().

◆ setSLMExposure()

void CMMCore::setSLMExposure ( const char *  deviceLabel,
double  exposure_ms 
)
throw (CMMError
)

For SLM devices with build-in light source (such as projectors) this will set the exposure time, but not (yet) start the illumination

◆ setSLMImage() [1/2]

void CMMCore::setSLMImage ( const char *  deviceLabel,
unsigned char *  pixels 
)
throw (CMMError
)

Write an 8-bit monochrome image to the SLM.

◆ setSLMImage() [2/2]

void CMMCore::setSLMImage ( const char *  deviceLabel,
imgRGB32  pixels 
)
throw (CMMError
)

Write a 32-bit color image to the SLM.

◆ setSLMPixelsTo() [1/2]

void CMMCore::setSLMPixelsTo ( const char *  deviceLabel,
unsigned char  intensity 
)
throw (CMMError
)

Set all SLM pixels to a single 8-bit intensity.

◆ setSLMPixelsTo() [2/2]

void CMMCore::setSLMPixelsTo ( const char *  deviceLabel,
unsigned char  red,
unsigned char  green,
unsigned char  blue 
)
throw (CMMError
)

Set all SLM pixels to an RGB color.

◆ setStageLinearSequence()

void CMMCore::setStageLinearSequence ( const char *  label,
double  dZ_um,
int  nSlices 
)
throw (CMMError
)

Loads a linear sequence (defined by stepsize and nr. of steps) into the device. Why was it not called loadStageLinearSequence???

Parameters
labelName of the stage device
dZ_umStep size between slices in microns
nSlicesNumber of slices fo ethis sequence Presumably the sequence will repeat after this number of TTLs was received

◆ setState()

void CMMCore::setState ( const char *  deviceLabel,
long  state 
)
throw (CMMError
)

Sets the state (position) on the specific device. The command will fail if the device does not support states.

Parameters
deviceLabelthe device label
statethe new state

◆ setStateLabel()

void CMMCore::setStateLabel ( const char *  deviceLabel,
const char *  stateLabel 
)
throw (CMMError
)

Sets device state using the previously assigned label (string).

Parameters
deviceLabelthe device label
stateLabelthe state label

References getStateFromLabel().

◆ setSystemState()

void CMMCore::setSystemState ( const 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.

Parameters
confthe configuration object representing the desired system state

References PropertySetting::getDeviceLabel(), PropertySetting::getPropertyName(), PropertySetting::getPropertyValue(), PropertySetting::getReadOnly(), Configuration::getSetting(), setProperty(), Configuration::size(), and updateSystemStateCache().

◆ setXYPosition() [1/2]

void CMMCore::setXYPosition ( const char *  label,
double  x,
double  y 
)
throw (CMMError
)

Sets the position of the XY stage in microns.

Parameters
labelthe XY stage device label
xthe X axis position in microns
ythe Y axis position in microns

Referenced by setXYPosition().

◆ setXYPosition() [2/2]

void CMMCore::setXYPosition ( double  x,
double  y 
)
throw (CMMError
)

Sets the position of the XY stage in microns. Uses the current XY stage device.

Parameters
xthe X axis position in microns
ythe Y axis position in microns

References getXYStageDevice(), and setXYPosition().

◆ setXYStageDevice()

void CMMCore::setXYStageDevice ( const char *  xyDeviceLabel)
throw (CMMError
)

Sets the current XY device.

References getXYStageDevice().

◆ sleep()

void CMMCore::sleep ( double  intervalMs) const

Waits (blocks the calling thread) for specified time in milliseconds.

Parameters
intervalMsthe time to sleep in milliseconds

Referenced by waitForDevice().

◆ snapImage()

void CMMCore::snapImage ( )
throw (CMMError
)

Acquires a single image with current settings. Snap is not allowed while the acquisition thread is run

References getCoreErrorText(), waitForDevice(), and waitForImageSynchro().

◆ startContinuousSequenceAcquisition()

void CMMCore::startContinuousSequenceAcquisition ( double  intervalMs)
throw (CMMError
)

Starts the continuous camera sequence acquisition. This command does not block the calling thread for the duration of the acquisition.

References getCoreErrorText(), and getDeviceName().

◆ startExposureSequence()

void CMMCore::startExposureSequence ( const char *  cameraLabel)
throw (CMMError
)

Starts an ongoing sequence of triggered exposures in a camera This should only be called for cameras where exposure time is sequenceable

Parameters
cameraLabelthe camera device label

◆ startPropertySequence()

void CMMCore::startPropertySequence ( const char *  label,
const char *  propName 
)
throw (CMMError
)

Starts an ongoing sequence of triggered events in a property of a device This should only be called for device-properties that are sequenceable

Parameters
labelthe device name
propNamethe property label

◆ startSecondaryLogFile()

int CMMCore::startSecondaryLogFile ( const char *  filename,
bool  enableDebug,
bool  truncate = true,
bool  synchronous = false 
)
throw (CMMError
)

Start capturing logging output into an additional file.

Parameters
filenameThe filename to which the log will be captured
enableDebugWhether to include debug logging (regardless of whether debug logging is enabled for the primary log).
truncateIf false, append to the file.
synchronousIf true, enable synchronous logging for this file (logging calls will not return until the output is written to the file, facilitating the debugging of crashes in some cases, but with a performance cost).
Returns
A handle required when calling stopSecondaryLogFile().

◆ startSequenceAcquisition() [1/2]

void CMMCore::startSequenceAcquisition ( long  numImages,
double  intervalMs,
bool  stopOnOverflow 
)
throw (CMMError
)

Starts streaming camera sequence acquisition. This command does not block the calling thread for the duration of the acquisition.

Parameters
numImagesNumber of images requested from the camera
intervalMsThe interval between images, currently only supported by Andor cameras
stopOnOverflowwhether or not the camera stops acquiring when the circular buffer is full

References getCoreErrorText(), and getDeviceName().

◆ startSequenceAcquisition() [2/2]

void CMMCore::startSequenceAcquisition ( const char *  label,
long  numImages,
double  intervalMs,
bool  stopOnOverflow 
)
throw (CMMError
)

Starts streaming camera sequence acquisition for a specified camera. This command does not block the calling thread for the duration of the acquisition. The difference between this method and the one with the same name but operating on the "default" camera is that it does not automatically initialize the circular buffer.

References getCoreErrorText().

◆ startSLMSequence()

void CMMCore::startSLMSequence ( const char *  deviceLabel)
throw (CMMError
)

Starts the sequence previously uploaded to the SLM

Parameters
deviceLabelname of the SLM

◆ startStageSequence()

void CMMCore::startStageSequence ( const char *  label)
throw (CMMError
)

Starts an ongoing sequence of triggered events in a stage This should only be called for stages

Parameters
labelthe stage device label

◆ startXYStageSequence()

void CMMCore::startXYStageSequence ( const char *  label)
throw (CMMError
)

Starts an ongoing sequence of triggered events in an XY stage This should only be called for stages

Parameters
labelthe XY stage device label

◆ stderrLogEnabled()

bool CMMCore::stderrLogEnabled ( )

Indicates whether logging output goes to stdErr

◆ stop()

void CMMCore::stop ( const char *  label)
throw (CMMError
)

Stop the XY or focus/Z stage motors

Not all stages support this operation; check before use.

Parameters
labelthe stage device label (either XY or focus/Z stage)

◆ stopExposureSequence()

void CMMCore::stopExposureSequence ( const char *  cameraLabel)
throw (CMMError
)

Stops an ongoing sequence of triggered exposures in a camera This should only be called for cameras where exposure time is sequenceable

Parameters
cameraLabelthe camera device label

◆ stopPropertySequence()

void CMMCore::stopPropertySequence ( const char *  label,
const char *  propName 
)
throw (CMMError
)

Stops an ongoing sequence of triggered events in a property of a device This should only be called for device-properties that are sequenceable

Parameters
labelthe device label
propNamethe property name

◆ stopSecondaryLogFile()

void CMMCore::stopSecondaryLogFile ( int  handle)
throw (CMMError
)

Stop capturing logging output into an additional file.

Parameters
handleThe secondary log handle returned by startSecondaryLogFile().

◆ stopSequenceAcquisition() [1/2]

void CMMCore::stopSequenceAcquisition ( )
throw (CMMError
)

Stops streaming camera sequence acquisition.

References getCoreErrorText(), and getDeviceName().

◆ stopSequenceAcquisition() [2/2]

void CMMCore::stopSequenceAcquisition ( const char *  label)
throw (CMMError
)

Stops streaming camera sequence acquisition for a specified camera.

Parameters
labelThe camera name

◆ stopSLMSequence()

void CMMCore::stopSLMSequence ( const char *  deviceLabel)
throw (CMMError
)

Stops the SLM sequence if previously started

Parameters
deviceLabelname of the SLM

◆ stopStageSequence()

void CMMCore::stopStageSequence ( const char *  label)
throw (CMMError
)

Stops an ongoing sequence of triggered events in a stage This should only be called for stages that are sequenceable

Parameters
labelthe stage device label

◆ stopXYStageSequence()

void CMMCore::stopXYStageSequence ( const char *  label)
throw (CMMError
)

Stops an ongoing sequence of triggered events in an XY stage This should only be called for stages that are sequenceable

Parameters
labelthe XY stage device label

◆ supportsDeviceDetection()

bool CMMCore::supportsDeviceDetection ( char *  label)

Return whether or not the device supports automatic device detection (i.e. whether or not detectDevice() may be safely called).

◆ systemBusy()

bool CMMCore::systemBusy ( )
throw (CMMError
)

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)

References deviceTypeBusy().

◆ unloadAllDevices()

void CMMCore::unloadAllDevices ( )
throw (CMMError
)

Unloads all devices from the core and resets all configuration data.

References CMMError::getMsg().

Referenced by loadSystemConfiguration(), and reset().

◆ unloadDevice()

void CMMCore::unloadDevice ( const char *  label)
throw (CMMError
)

Unloads the device from the core and adjusts all configuration data.

Parameters
labelthe name of the device to unload

References CMMError::getMsg().

Referenced by unloadLibrary().

◆ unloadLibrary()

void CMMCore::unloadLibrary ( const char *  moduleName)
throw (CMMError
)

Forcefully unload a library. Experimental. Don't use.

References unloadDevice().

◆ updateCoreProperties()

void CMMCore::updateCoreProperties ( )
throw (CMMError
)

Updates CoreProperties (currently all Core properties are devices types) with the loaded hardware. After this call, each of the Core-Device properties will be populated with the currently loaded devices of that type

References getLoadedDevicesOfType().

Referenced by initializeAllDevices(), and initializeDevice().

◆ updateSystemStateCache()

void CMMCore::updateSystemStateCache ( )

Updates the state of the entire hardware.

References getSystemState().

Referenced by loadSystemConfiguration(), and setSystemState().

◆ usesDeviceDelay()

bool CMMCore::usesDeviceDelay ( const char *  label)
throw (CMMError
)

Signals if the device will use the delay setting or not.

Parameters
labelthe device label
Returns
true if the device uses a delay

◆ waitForConfig()

void CMMCore::waitForConfig ( const char *  group,
const char *  configName 
)
throw (CMMError
)

Blocks until all devices included in the configuration become ready.

Parameters
groupthe configuration group
configthe configuration preset

References getConfigData(), PropertySetting::getDeviceLabel(), CMMError::getMsg(), Configuration::getSetting(), Configuration::size(), and waitForDevice().

◆ waitForDevice()

void CMMCore::waitForDevice ( const char *  label)
throw (CMMError
)

Waits (blocks the calling thread) until the specified device becomes non-busy.

Parameters
labelthe device label

References sleep().

Referenced by snapImage(), waitForConfig(), waitForDeviceType(), and waitForImageSynchro().

◆ waitForDeviceType()

void CMMCore::waitForDeviceType ( MM::DeviceType  devType)
throw (CMMError
)

Blocks until all devices of the specific type become ready (not-busy).

Parameters
devTypea constant specifying the device type

References waitForDevice().

Referenced by waitForSystem().

◆ waitForImageSynchro()

void CMMCore::waitForImageSynchro ( )
throw (CMMError
)

Wait for the slowest device in the ImageSynchro list.

References waitForDevice().

Referenced by snapImage().

◆ waitForSystem()

void CMMCore::waitForSystem ( )
throw (CMMError
)

Blocks until all devices in the system become ready (not-busy).

References waitForDeviceType().

Referenced by loadSystemConfiguration(), and reset().

◆ writeToSerialPort()

void CMMCore::writeToSerialPort ( const char *  portLabel,
const std::vector< char > &  data 
)
throw (CMMError
)

Sends an array of characters to the serial port and returns immediately.


The documentation for this class was generated from the following files: