MMCore 10.1.1
CMMCore Class Reference

The Micro-Manager Core. More...

#include <MMCore.h>

Public Member Functions

 CMMCore ()
 ~CMMCore ()
Logging and log management.
void setPrimaryLogFile (const char *filename, bool truncate=false) MMCORE_LEGACY_THROW(CMMError)
std::string getPrimaryLogFile () const
void setPrimaryLogFileRotation (long long maxFileSize, int maxBackupCount)
void logMessage (const char *msg)
void logMessage (const char *msg, bool debugOnly)
void log (const char *msg, mmcore::LogLevel level)
void log (const char *msg, mmcore::LogLevel level, const char *loggerName)
void setPrimaryLogLevel (mmcore::LogLevel level)
mmcore::LogLevel getPrimaryLogLevel ()
void enableDebugLog (bool enable)
bool debugLogEnabled ()
void enableStderrLog (bool enable)
bool stderrLogEnabled ()
void setStderrLogLevel (mmcore::LogLevel level)
mmcore::LogLevel getStderrLogLevel ()
int startSecondaryLogFile (const char *filename, bool enableDebug, bool truncate=true, bool synchronous=false) MMCORE_LEGACY_THROW(CMMError)
void stopSecondaryLogFile (int handle) MMCORE_LEGACY_THROW(CMMError)
Device listing.
std::vector< std::string > getDeviceAdapterSearchPaths ()
void setDeviceAdapterSearchPaths (const std::vector< std::string > &paths)
std::vector< std::string > getDeviceAdapterNames () MMCORE_LEGACY_THROW(CMMError)
std::vector< std::string > getAvailableDevices (const char *library) MMCORE_LEGACY_THROW(CMMError)
std::vector< std::string > getAvailableDeviceDescriptions (const char *library) MMCORE_LEGACY_THROW(CMMError)
std::vector< long > getAvailableDeviceTypes (const char *library) MMCORE_LEGACY_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) MMCORE_LEGACY_THROW(CMMError)
std::string getDeviceLibrary (const char *label) MMCORE_LEGACY_THROW(CMMError)
std::string getDeviceName (const char *label) MMCORE_LEGACY_THROW(CMMError)
std::string getDeviceDescription (const char *label) MMCORE_LEGACY_THROW(CMMError)
std::vector< std::string > getDevicePropertyNames (const char *label) MMCORE_LEGACY_THROW(CMMError)
bool hasProperty (const char *label, const char *propName) MMCORE_LEGACY_THROW(CMMError)
std::string getProperty (const char *label, const char *propName) MMCORE_LEGACY_THROW(CMMError)
void setProperty (const char *label, const char *propName, const char *propValue) MMCORE_LEGACY_THROW(CMMError)
void setProperty (const char *label, const char *propName, const bool propValue) MMCORE_LEGACY_THROW(CMMError)
void setProperty (const char *label, const char *propName, const long propValue) MMCORE_LEGACY_THROW(CMMError)
void setProperty (const char *label, const char *propName, const float propValue) MMCORE_LEGACY_THROW(CMMError)
void setProperty (const char *label, const char *propName, const double propValue) MMCORE_LEGACY_THROW(CMMError)
std::vector< std::string > getAllowedPropertyValues (const char *label, const char *propName) MMCORE_LEGACY_THROW(CMMError)
bool isPropertyReadOnly (const char *label, const char *propName) MMCORE_LEGACY_THROW(CMMError)
bool isPropertyPreInit (const char *label, const char *propName) MMCORE_LEGACY_THROW(CMMError)
bool isPropertySequenceable (const char *label, const char *propName) MMCORE_LEGACY_THROW(CMMError)
bool hasPropertyLimits (const char *label, const char *propName) MMCORE_LEGACY_THROW(CMMError)
double getPropertyLowerLimit (const char *label, const char *propName) MMCORE_LEGACY_THROW(CMMError)
double getPropertyUpperLimit (const char *label, const char *propName) MMCORE_LEGACY_THROW(CMMError)
MM::PropertyType getPropertyType (const char *label, const char *propName) MMCORE_LEGACY_THROW(CMMError)
void startPropertySequence (const char *label, const char *propName) MMCORE_LEGACY_THROW(CMMError)
void stopPropertySequence (const char *label, const char *propName) MMCORE_LEGACY_THROW(CMMError)
long getPropertySequenceMaxLength (const char *label, const char *propName) MMCORE_LEGACY_THROW(CMMError)
void loadPropertySequence (const char *label, const char *propName, std::vector< std::string > eventSequence) MMCORE_LEGACY_THROW(CMMError)
bool deviceBusy (const char *label) MMCORE_LEGACY_THROW(CMMError)
void waitForDevice (const char *label) MMCORE_LEGACY_THROW(CMMError)
void waitForConfig (const char *group, const char *configName) MMCORE_LEGACY_THROW(CMMError)
bool systemBusy () MMCORE_LEGACY_THROW(CMMError)
void waitForSystem () MMCORE_LEGACY_THROW(CMMError)
bool deviceTypeBusy (MM::DeviceType devType) MMCORE_LEGACY_THROW(CMMError)
void waitForDeviceType (MM::DeviceType devType) MMCORE_LEGACY_THROW(CMMError)
double getDeviceDelayMs (const char *label) MMCORE_LEGACY_THROW(CMMError)
void setDeviceDelayMs (const char *label, double delayMs) MMCORE_LEGACY_THROW(CMMError)
bool usesDeviceDelay (const char *label) MMCORE_LEGACY_THROW(CMMError)
void setTimeoutMs (long timeoutMs)
long getTimeoutMs ()
void setDeviceTimeoutMs (const char *label, long timeoutMs) MMCORE_LEGACY_THROW(CMMError)
void unsetDeviceTimeout (const char *label) MMCORE_LEGACY_THROW(CMMError)
long getDeviceTimeoutMs (const char *label) MMCORE_LEGACY_THROW(CMMError)
bool hasDeviceTimeout (const char *label) MMCORE_LEGACY_THROW(CMMError)
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) MMCORE_LEGACY_THROW(CMMError)
void setShutterDevice (const char *shutterLabel) MMCORE_LEGACY_THROW(CMMError)
void setFocusDevice (const char *focusLabel) MMCORE_LEGACY_THROW(CMMError)
void setXYStageDevice (const char *xyStageLabel) MMCORE_LEGACY_THROW(CMMError)
void setAutoFocusDevice (const char *focusLabel) MMCORE_LEGACY_THROW(CMMError)
void setImageProcessorDevice (const char *procLabel) MMCORE_LEGACY_THROW(CMMError)
void setSLMDevice (const char *slmLabel) MMCORE_LEGACY_THROW(CMMError)
void setGalvoDevice (const char *galvoLabel) MMCORE_LEGACY_THROW(CMMError)
void setChannelGroup (const char *channelGroup) MMCORE_LEGACY_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 MMCORE_LEGACY_THROW(CMMError)
std::string getCurrentConfigFromCache (const char *groupName) MMCORE_LEGACY_THROW(CMMError)
Configuration getConfigGroupStateFromCache (const char *group) MMCORE_LEGACY_THROW(CMMError)
Configuration groups.
void defineConfig (const char *groupName, const char *configName) MMCORE_LEGACY_THROW(CMMError)
void defineConfig (const char *groupName, const char *configName, const char *deviceLabel, const char *propName, const char *value) MMCORE_LEGACY_THROW(CMMError)
void defineConfigGroup (const char *groupName) MMCORE_LEGACY_THROW(CMMError)
void deleteConfigGroup (const char *groupName) MMCORE_LEGACY_THROW(CMMError)
void renameConfigGroup (const char *oldGroupName, const char *newGroupName) MMCORE_LEGACY_THROW(CMMError)
bool isGroupDefined (const char *groupName)
bool isConfigDefined (const char *groupName, const char *configName)
void setConfig (const char *groupName, const char *configName) MMCORE_LEGACY_THROW(CMMError)
void deleteConfig (const char *groupName, const char *configName) MMCORE_LEGACY_THROW(CMMError)
void deleteConfig (const char *groupName, const char *configName, const char *deviceLabel, const char *propName) MMCORE_LEGACY_THROW(CMMError)
void renameConfig (const char *groupName, const char *oldConfigName, const char *newConfigName) MMCORE_LEGACY_THROW(CMMError)
std::vector< std::string > getAvailableConfigGroups () const
std::vector< std::string > getAvailableConfigs (const char *configGroup) const
std::string getCurrentConfig (const char *groupName) MMCORE_LEGACY_THROW(CMMError)
Configuration getConfigData (const char *configGroup, const char *configName) MMCORE_LEGACY_THROW(CMMError)
The pixel size configuration group.
std::string getCurrentPixelSizeConfig () MMCORE_LEGACY_THROW(CMMError)
std::string getCurrentPixelSizeConfig (bool cached) MMCORE_LEGACY_THROW(CMMError)
double getPixelSizeUm ()
double getPixelSizeUm (bool cached)
double getPixelSizeUmByID (const char *resolutionID) MMCORE_LEGACY_THROW(CMMError)
std::vector< double > getPixelSizeAffine () MMCORE_LEGACY_THROW(CMMError)
std::vector< double > getPixelSizeAffine (bool cached) MMCORE_LEGACY_THROW(CMMError)
std::vector< double > getPixelSizeAffineByID (const char *resolutionID) MMCORE_LEGACY_THROW(CMMError)
double getPixelSizedxdz () MMCORE_LEGACY_THROW(CMMError)
double getPixelSizedxdz (bool cached) MMCORE_LEGACY_THROW(CMMError)
double getPixelSizedxdz (const char *resolutionID) MMCORE_LEGACY_THROW(CMMError)
double getPixelSizedydz () MMCORE_LEGACY_THROW(CMMError)
double getPixelSizedydz (bool cached) MMCORE_LEGACY_THROW(CMMError)
double getPixelSizedydz (const char *resolutionID) MMCORE_LEGACY_THROW(CMMError)
double getPixelSizeOptimalZUm () MMCORE_LEGACY_THROW(CMMError)
double getPixelSizeOptimalZUm (bool cached) MMCORE_LEGACY_THROW(CMMError)
double getPixelSizeOptimalZUm (const char *resolutionID) MMCORE_LEGACY_THROW(CMMError)
double getMagnificationFactor () const
void setPixelSizeUm (const char *resolutionID, double pixSize) MMCORE_LEGACY_THROW(CMMError)
void setPixelSizeAffine (const char *resolutionID, std::vector< double > affine) MMCORE_LEGACY_THROW(CMMError)
void setPixelSizedxdz (const char *resolutionID, double dXdZ) MMCORE_LEGACY_THROW(CMMError)
void setPixelSizedydz (const char *resolutionID, double dYdZ) MMCORE_LEGACY_THROW(CMMError)
void setPixelSizeOptimalZUm (const char *resolutionID, double optimalZ) MMCORE_LEGACY_THROW(CMMError)
void definePixelSizeConfig (const char *resolutionID, const char *deviceLabel, const char *propName, const char *value) MMCORE_LEGACY_THROW(CMMError)
void definePixelSizeConfig (const char *resolutionID) MMCORE_LEGACY_THROW(CMMError)
std::vector< std::string > getAvailablePixelSizeConfigs () const
bool isPixelSizeConfigDefined (const char *resolutionID) const MMCORE_LEGACY_THROW(CMMError)
void setPixelSizeConfig (const char *resolutionID) MMCORE_LEGACY_THROW(CMMError)
void renamePixelSizeConfig (const char *oldConfigName, const char *newConfigName) MMCORE_LEGACY_THROW(CMMError)
void deletePixelSizeConfig (const char *configName) MMCORE_LEGACY_THROW(CMMError)
Configuration getPixelSizeConfigData (const char *configName) MMCORE_LEGACY_THROW(CMMError)
Image acquisition.
void setROI (int x, int y, int xSize, int ySize) MMCORE_LEGACY_THROW(CMMError)
void setROI (const char *label, int x, int y, int xSize, int ySize) MMCORE_LEGACY_THROW(CMMError)
void getROI (int &x, int &y, int &xSize, int &ySize) MMCORE_LEGACY_THROW(CMMError)
void getROI (const char *label, int &x, int &y, int &xSize, int &ySize) MMCORE_LEGACY_THROW(CMMError)
void clearROI () MMCORE_LEGACY_THROW(CMMError)
bool isMultiROISupported () MMCORE_LEGACY_THROW(CMMError)
bool isMultiROIEnabled () MMCORE_LEGACY_THROW(CMMError)
void setMultiROI (std::vector< unsigned > xs, std::vector< unsigned > ys, std::vector< unsigned > widths, std::vector< unsigned > heights) MMCORE_LEGACY_THROW(CMMError)
void getMultiROI (std::vector< unsigned > &xs, std::vector< unsigned > &ys, std::vector< unsigned > &widths, std::vector< unsigned > &heights) MMCORE_LEGACY_THROW(CMMError)
void setExposure (double exp) MMCORE_LEGACY_THROW(CMMError)
void setExposure (const char *cameraLabel, double dExp) MMCORE_LEGACY_THROW(CMMError)
double getExposure () MMCORE_LEGACY_THROW(CMMError)
double getExposure (const char *label) MMCORE_LEGACY_THROW(CMMError)
long getBinning () MMCORE_LEGACY_THROW(CMMError)
long getBinning (const char *label) MMCORE_LEGACY_THROW(CMMError)
std::vector< long > getAllowedBinningValues () MMCORE_LEGACY_THROW(CMMError)
std::vector< long > getAllowedBinningValues (const char *label) MMCORE_LEGACY_THROW(CMMError)
void setBinning (long binning) MMCORE_LEGACY_THROW(CMMError)
void setBinning (const char *label, long binning) MMCORE_LEGACY_THROW(CMMError)
void snapImage () MMCORE_LEGACY_THROW(CMMError)
void * getImage () MMCORE_LEGACY_THROW(CMMError)
void * getImage (unsigned numChannel) MMCORE_LEGACY_THROW(CMMError)
unsigned getImageWidth ()
unsigned getImageHeight ()
unsigned getBytesPerPixel ()
unsigned getImageBitDepth ()
unsigned getNumberOfComponents ()
unsigned getNumberOfCameraChannels ()
std::string getCameraChannelName (unsigned int channelNr)
long getImageBufferSize ()
void setAutoShutter (bool state)
bool getAutoShutter ()
void setShutterOpen (bool state) MMCORE_LEGACY_THROW(CMMError)
bool getShutterOpen () MMCORE_LEGACY_THROW(CMMError)
void setShutterOpen (const char *shutterLabel, bool state) MMCORE_LEGACY_THROW(CMMError)
bool getShutterOpen (const char *shutterLabel) MMCORE_LEGACY_THROW(CMMError)
void startSequenceAcquisition (long numImages, double unused, bool stopOnOverflow) MMCORE_LEGACY_THROW(CMMError)
void startSequenceAcquisition (const char *cameraLabel, long numImages, double unused, bool stopOnOverflow) MMCORE_LEGACY_THROW(CMMError)
MMCORE_DEPRECATED void prepareSequenceAcquisition (const char *cameraLabel) MMCORE_LEGACY_THROW(CMMError)
void startContinuousSequenceAcquisition (double unused) MMCORE_LEGACY_THROW(CMMError)
void stopSequenceAcquisition () MMCORE_LEGACY_THROW(CMMError)
void stopSequenceAcquisition (const char *cameraLabel) MMCORE_LEGACY_THROW(CMMError)
bool isSequenceRunning () MMCORE_NOEXCEPT
bool isSequenceRunning (const char *cameraLabel) MMCORE_LEGACY_THROW(CMMError)
void * getLastImage () MMCORE_LEGACY_THROW(CMMError)
void * popNextImage () MMCORE_LEGACY_THROW(CMMError)
void * getLastImageMD (unsigned channel, unsigned slice, Metadata &md) const MMCORE_LEGACY_THROW(CMMError)
void * popNextImageMD (unsigned channel, unsigned slice, Metadata &md) MMCORE_LEGACY_THROW(CMMError)
void * getLastImageMD (Metadata &md) const MMCORE_LEGACY_THROW(CMMError)
void * getNBeforeLastImageMD (unsigned long n, Metadata &md) const MMCORE_LEGACY_THROW(CMMError)
void * popNextImageMD (Metadata &md) MMCORE_LEGACY_THROW(CMMError)
long getRemainingImageCount ()
long getBufferTotalCapacity ()
long getBufferFreeCapacity ()
bool isBufferOverflowed () const
void setCircularBufferMemoryFootprint (unsigned sizeMB) MMCORE_LEGACY_THROW(CMMError)
unsigned getCircularBufferMemoryFootprint ()
void initializeCircularBuffer () MMCORE_LEGACY_THROW(CMMError)
void clearCircularBuffer () MMCORE_LEGACY_THROW(CMMError)
bool isExposureSequenceable (const char *cameraLabel) MMCORE_LEGACY_THROW(CMMError)
void startExposureSequence (const char *cameraLabel) MMCORE_LEGACY_THROW(CMMError)
void stopExposureSequence (const char *cameraLabel) MMCORE_LEGACY_THROW(CMMError)
long getExposureSequenceMaxLength (const char *cameraLabel) MMCORE_LEGACY_THROW(CMMError)
void loadExposureSequence (const char *cameraLabel, std::vector< double > exposureSequence_ms) MMCORE_LEGACY_THROW(CMMError)
Autofocus control.
double getLastFocusScore ()
double getCurrentFocusScore ()
void enableContinuousFocus (bool enable) MMCORE_LEGACY_THROW(CMMError)
bool isContinuousFocusEnabled () MMCORE_LEGACY_THROW(CMMError)
bool isContinuousFocusLocked () MMCORE_LEGACY_THROW(CMMError)
bool isContinuousFocusDrive (const char *stageLabel) MMCORE_LEGACY_THROW(CMMError)
void fullFocus () MMCORE_LEGACY_THROW(CMMError)
void incrementalFocus () MMCORE_LEGACY_THROW(CMMError)
void setAutoFocusOffset (double offset) MMCORE_LEGACY_THROW(CMMError)
double getAutoFocusOffset () MMCORE_LEGACY_THROW(CMMError)
State device control.
void setState (const char *stateDeviceLabel, long state) MMCORE_LEGACY_THROW(CMMError)
long getState (const char *stateDeviceLabel) MMCORE_LEGACY_THROW(CMMError)
long getNumberOfStates (const char *stateDeviceLabel)
void setStateLabel (const char *stateDeviceLabel, const char *stateLabel) MMCORE_LEGACY_THROW(CMMError)
std::string getStateLabel (const char *stateDeviceLabel) MMCORE_LEGACY_THROW(CMMError)
void defineStateLabel (const char *stateDeviceLabel, long state, const char *stateLabel) MMCORE_LEGACY_THROW(CMMError)
std::vector< std::string > getStateLabels (const char *stateDeviceLabel) MMCORE_LEGACY_THROW(CMMError)
long getStateFromLabel (const char *stateDeviceLabel, const char *stateLabel) MMCORE_LEGACY_THROW(CMMError)
Focus (Z) stage control.
void setPosition (const char *stageLabel, double position) MMCORE_LEGACY_THROW(CMMError)
void setPosition (double position) MMCORE_LEGACY_THROW(CMMError)
double getPosition (const char *stageLabel) MMCORE_LEGACY_THROW(CMMError)
double getPosition () MMCORE_LEGACY_THROW(CMMError)
void setRelativePosition (const char *stageLabel, double d) MMCORE_LEGACY_THROW(CMMError)
void setRelativePosition (double d) MMCORE_LEGACY_THROW(CMMError)
void setOrigin (const char *stageLabel) MMCORE_LEGACY_THROW(CMMError)
void setOrigin () MMCORE_LEGACY_THROW(CMMError)
void setAdapterOrigin (const char *stageLabel, double newZUm) MMCORE_LEGACY_THROW(CMMError)
void setAdapterOrigin (double newZUm) MMCORE_LEGACY_THROW(CMMError)
void setFocusDirection (const char *stageLabel, int sign)
 Set the focus direction of a stage.
int getFocusDirection (const char *stageLabel) MMCORE_LEGACY_THROW(CMMError)
 Get the focus direction of a stage.
bool isStageUsingCallbacks (const char *stageLabel) MMCORE_LEGACY_THROW(CMMError)
bool isStageSequenceable (const char *stageLabel) MMCORE_LEGACY_THROW(CMMError)
bool isStageLinearSequenceable (const char *stageLabel) MMCORE_LEGACY_THROW(CMMError)
void startStageSequence (const char *stageLabel) MMCORE_LEGACY_THROW(CMMError)
void stopStageSequence (const char *stageLabel) MMCORE_LEGACY_THROW(CMMError)
long getStageSequenceMaxLength (const char *stageLabel) MMCORE_LEGACY_THROW(CMMError)
void loadStageSequence (const char *stageLabel, std::vector< double > positionSequence) MMCORE_LEGACY_THROW(CMMError)
void setStageLinearSequence (const char *stageLabel, double dZ_um, int nSlices) MMCORE_LEGACY_THROW(CMMError)
XY stage control.
void setXYPosition (const char *xyStageLabel, double x, double y) MMCORE_LEGACY_THROW(CMMError)
void setXYPosition (double x, double y) MMCORE_LEGACY_THROW(CMMError)
void setRelativeXYPosition (const char *xyStageLabel, double dx, double dy) MMCORE_LEGACY_THROW(CMMError)
void setRelativeXYPosition (double dx, double dy) MMCORE_LEGACY_THROW(CMMError)
void getXYPosition (const char *xyStageLabel, double &x_stage, double &y_stage) MMCORE_LEGACY_THROW(CMMError)
void getXYPosition (double &x_stage, double &y_stage) MMCORE_LEGACY_THROW(CMMError)
double getXPosition (const char *xyStageLabel) MMCORE_LEGACY_THROW(CMMError)
double getYPosition (const char *xyStageLabel) MMCORE_LEGACY_THROW(CMMError)
double getXPosition () MMCORE_LEGACY_THROW(CMMError)
double getYPosition () MMCORE_LEGACY_THROW(CMMError)
void stop (const char *xyOrZStageLabel) MMCORE_LEGACY_THROW(CMMError)
void home (const char *xyOrZStageLabel) MMCORE_LEGACY_THROW(CMMError)
void setOriginXY (const char *xyStageLabel) MMCORE_LEGACY_THROW(CMMError)
void setOriginXY () MMCORE_LEGACY_THROW(CMMError)
void setOriginX (const char *xyStageLabel) MMCORE_LEGACY_THROW(CMMError)
void setOriginX () MMCORE_LEGACY_THROW(CMMError)
void setOriginY (const char *xyStageLabel) MMCORE_LEGACY_THROW(CMMError)
void setOriginY () MMCORE_LEGACY_THROW(CMMError)
void setAdapterOriginXY (const char *xyStageLabel, double newXUm, double newYUm) MMCORE_LEGACY_THROW(CMMError)
void setAdapterOriginXY (double newXUm, double newYUm) MMCORE_LEGACY_THROW(CMMError)
bool isXYStageUsingCallbacks (const char *xyStageLabel) MMCORE_LEGACY_THROW(CMMError)
bool isXYStageSequenceable (const char *xyStageLabel) MMCORE_LEGACY_THROW(CMMError)
void startXYStageSequence (const char *xyStageLabel) MMCORE_LEGACY_THROW(CMMError)
void stopXYStageSequence (const char *xyStageLabel) MMCORE_LEGACY_THROW(CMMError)
long getXYStageSequenceMaxLength (const char *xyStageLabel) MMCORE_LEGACY_THROW(CMMError)
void loadXYStageSequence (const char *xyStageLabel, std::vector< double > xSequence, std::vector< double > ySequence) MMCORE_LEGACY_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) MMCORE_LEGACY_THROW(CMMError)
void setSerialPortCommand (const char *portLabel, const char *command, const char *term) MMCORE_LEGACY_THROW(CMMError)
std::string getSerialPortAnswer (const char *portLabel, const char *term) MMCORE_LEGACY_THROW(CMMError)
void writeToSerialPort (const char *portLabel, const std::vector< char > &data) MMCORE_LEGACY_THROW(CMMError)
std::vector< char > readFromSerialPort (const char *portLabel) MMCORE_LEGACY_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) MMCORE_LEGACY_THROW(CMMError)
void setSLMImage (const char *slmLabel, imgRGB32 pixels) MMCORE_LEGACY_THROW(CMMError)
void setSLMPixelsTo (const char *slmLabel, unsigned char intensity) MMCORE_LEGACY_THROW(CMMError)
void setSLMPixelsTo (const char *slmLabel, unsigned char red, unsigned char green, unsigned char blue) MMCORE_LEGACY_THROW(CMMError)
void displaySLMImage (const char *slmLabel) MMCORE_LEGACY_THROW(CMMError)
void setSLMExposure (const char *slmLabel, double exposure_ms) MMCORE_LEGACY_THROW(CMMError)
double getSLMExposure (const char *slmLabel) MMCORE_LEGACY_THROW(CMMError)
unsigned getSLMWidth (const char *slmLabel) MMCORE_LEGACY_THROW(CMMError)
unsigned getSLMHeight (const char *slmLabel) MMCORE_LEGACY_THROW(CMMError)
unsigned getSLMNumberOfComponents (const char *slmLabel) MMCORE_LEGACY_THROW(CMMError)
unsigned getSLMBytesPerPixel (const char *slmLabel) MMCORE_LEGACY_THROW(CMMError)
long getSLMSequenceMaxLength (const char *slmLabel) MMCORE_LEGACY_THROW(CMMError)
void startSLMSequence (const char *slmLabel) MMCORE_LEGACY_THROW(CMMError)
void stopSLMSequence (const char *slmLabel) MMCORE_LEGACY_THROW(CMMError)
void loadSLMSequence (const char *slmLabel, std::vector< unsigned char * > imageSequence) MMCORE_LEGACY_THROW(CMMError)
Galvo control.

Control of beam-steering devices.

void pointGalvoAndFire (const char *galvoLabel, double x, double y, double pulseTime_us) MMCORE_LEGACY_THROW(CMMError)
void setGalvoSpotInterval (const char *galvoLabel, double pulseTime_us) MMCORE_LEGACY_THROW(CMMError)
void setGalvoPosition (const char *galvoLabel, double x, double y) MMCORE_LEGACY_THROW(CMMError)
void getGalvoPosition (const char *galvoLabel, double &x_stage, double &y_stage) MMCORE_LEGACY_THROW(CMMError)
void setGalvoIlluminationState (const char *galvoLabel, bool on) MMCORE_LEGACY_THROW(CMMError)
double getGalvoXRange (const char *galvoLabel) MMCORE_LEGACY_THROW(CMMError)
double getGalvoXMinimum (const char *galvoLabel) MMCORE_LEGACY_THROW(CMMError)
double getGalvoYRange (const char *galvoLabel) MMCORE_LEGACY_THROW(CMMError)
double getGalvoYMinimum (const char *galvoLabel) MMCORE_LEGACY_THROW(CMMError)
void addGalvoPolygonVertex (const char *galvoLabel, int polygonIndex, double x, double y) MMCORE_LEGACY_THROW(CMMError)
void deleteGalvoPolygons (const char *galvoLabel) MMCORE_LEGACY_THROW(CMMError)
void loadGalvoPolygons (const char *galvoLabel) MMCORE_LEGACY_THROW(CMMError)
void setGalvoPolygonRepetitions (const char *galvoLabel, int repetitions) MMCORE_LEGACY_THROW(CMMError)
void runGalvoPolygons (const char *galvoLabel) MMCORE_LEGACY_THROW(CMMError)
void runGalvoSequence (const char *galvoLabel) MMCORE_LEGACY_THROW(CMMError)
std::string getGalvoChannel (const char *galvoLabel) MMCORE_LEGACY_THROW(CMMError)
PressurePump control

Control of pressure pumps

void pressurePumpStop (const char *pumpLabel) MMCORE_LEGACY_THROW(CMMError)
void pressurePumpCalibrate (const char *pumpLabel) MMCORE_LEGACY_THROW(CMMError)
bool pressurePumpRequiresCalibration (const char *pumpLabel) MMCORE_LEGACY_THROW(CMMError)
void setPumpPressureKPa (const char *pumplabel, double pressure) MMCORE_LEGACY_THROW(CMMError)
double getPumpPressureKPa (const char *pumplabel) MMCORE_LEGACY_THROW(CMMError)
VolumetricPump control

Control of volumetric pumps

void volumetricPumpStop (const char *pumpLabel) MMCORE_LEGACY_THROW(CMMError)
void volumetricPumpHome (const char *pumpLabel) MMCORE_LEGACY_THROW(CMMError)
bool volumetricPumpRequiresHoming (const char *pumpLabel) MMCORE_LEGACY_THROW(CMMError)
void invertPumpDirection (const char *pumpLabel, bool invert) MMCORE_LEGACY_THROW(CMMError)
bool isPumpDirectionInverted (const char *pumpLabel) MMCORE_LEGACY_THROW(CMMError)
void setPumpVolume (const char *pumpLabel, double volume) MMCORE_LEGACY_THROW(CMMError)
double getPumpVolume (const char *pumpLabel) MMCORE_LEGACY_THROW(CMMError)
void setPumpMaxVolume (const char *pumpLabel, double volume) MMCORE_LEGACY_THROW(CMMError)
double getPumpMaxVolume (const char *pumpLabel) MMCORE_LEGACY_THROW(CMMError)
void setPumpFlowrate (const char *pumpLabel, double volume) MMCORE_LEGACY_THROW(CMMError)
double getPumpFlowrate (const char *pumpLabel) MMCORE_LEGACY_THROW(CMMError)
void pumpStart (const char *pumpLabel) MMCORE_LEGACY_THROW(CMMError)
void pumpDispenseDurationSeconds (const char *pumpLabel, double seconds) MMCORE_LEGACY_THROW(CMMError)
void pumpDispenseVolumeUl (const char *pumpLabel, double microLiter) MMCORE_LEGACY_THROW(CMMError)
Device discovery.
bool supportsDeviceDetection (const char *deviceLabel)
MM::DeviceDetectionStatus detectDevice (const char *deviceLabel)
Hub and peripheral devices.
std::string getParentLabel (const char *peripheralLabel) MMCORE_LEGACY_THROW(CMMError)
void setParentLabel (const char *deviceLabel, const char *parentHubLabel) MMCORE_LEGACY_THROW(CMMError)
std::vector< std::string > getInstalledDevices (const char *hubLabel) MMCORE_LEGACY_THROW(CMMError)
std::string getInstalledDeviceDescription (const char *hubLabel, const char *peripheralLabel) MMCORE_LEGACY_THROW(CMMError)
std::vector< std::string > getLoadedPeripheralDevices (const char *hubLabel) MMCORE_LEGACY_THROW(CMMError)
Testing
void loadMockDeviceAdapter (const char *name, MockDeviceAdapter *implementation) MMCORE_LEGACY_THROW(CMMError)
 Testing only: load a mock device adapter.

Static Public Member Functions

static void noop ()
 A static method that does nothing.
Core feature control.
static void enableFeature (const char *name, bool enable) MMCORE_LEGACY_THROW(CMMError)
static bool isFeatureEnabled (const char *name) MMCORE_LEGACY_THROW(CMMError)

Friends

class mmcore::internal::CoreCallback
class mmcore::internal::CorePropertyCollection

Initialization and setup.

void loadDevice (const char *label, const char *moduleName, const char *deviceName) MMCORE_LEGACY_THROW(CMMError)
void unloadDevice (const char *label) MMCORE_LEGACY_THROW(CMMError)
void unloadAllDevices () MMCORE_LEGACY_THROW(CMMError)
void initializeAllDevices () MMCORE_LEGACY_THROW(CMMError)
void initializeDevice (const char *label) MMCORE_LEGACY_THROW(CMMError)
DeviceInitializationState getDeviceInitializationState (const char *label) const MMCORE_LEGACY_THROW(CMMError)
void reset () MMCORE_LEGACY_THROW(CMMError)
void unloadLibrary (const char *moduleName) MMCORE_LEGACY_THROW(CMMError)
MMCORE_DEPRECATED void updateCoreProperties () MMCORE_LEGACY_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) MMCORE_LEGACY_THROW(CMMError)
Configuration getConfigGroupState (const char *group) MMCORE_LEGACY_THROW(CMMError)
void saveSystemState (const char *fileName) MMCORE_LEGACY_THROW(CMMError)
void loadSystemState (const char *fileName) MMCORE_LEGACY_THROW(CMMError)
void saveSystemConfiguration (const char *fileName) MMCORE_LEGACY_THROW(CMMError)
void loadSystemConfiguration (const char *fileName) MMCORE_LEGACY_THROW(CMMError)
void registerCallback (MMEventCallback *cb) MMCORE_LEGACY_THROW(CMMError)
static int getMMCoreVersionMajor ()
static int getMMCoreVersionMinor ()
static int getMMCoreVersionPatch ()
static int getMMDeviceModuleInterfaceVersion ()
static int getMMDeviceDeviceInterfaceVersion ()

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. However, it is strongly recommended to explicitly call reset() before destroying the CMMCore object, because errors cannot be handled in the destructor.

It is also strongly recommended to unregister any event callback (registerCallback(nullptr)) before destroying the CMMCore object.

References registerCallback(), and reset().

Member Function Documentation

◆ addGalvoPolygonVertex()

void CMMCore::addGalvoPolygonVertex ( const char * galvoLabel,
int polygonIndex,
double x,
double y )

Add a vertex to a galvo polygon.

Parameters
galvoLabelthe galvo device label
polygonIndexindex of the polygon to add the vertex to
xthe x position of the vertex, in the device's native units
ythe y position of the vertex, in the device's native units

◆ clearCircularBuffer()

void CMMCore::clearCircularBuffer ( )

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 ( )

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.

Returns true if both the primary log file and stderr log levels are at debug level or below.

◆ defineConfig() [1/2]

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

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().

◆ defineConfig() [2/2]

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

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)

Creates an empty configuration group.

References getCoreErrorText().

◆ definePixelSizeConfig() [1/2]

void CMMCore::definePixelSizeConfig ( const char * resolutionID)

Defines an empty pixel size entry.

Parameters
resolutionIDthe name of the new pixel size configuration (preset)

◆ definePixelSizeConfig() [2/2]

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

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
resolutionIDthe pixel size configuration (preset) name
deviceLabeldevice label
propNameproperty name
valueproperty value

◆ defineStateLabel()

void CMMCore::defineStateLabel ( const char * stateDeviceLabel,
long state,
const char * stateLabel )

Defines a label for the specific state.

Parameters
stateDeviceLabelthe device label
statethe state to be labeled
stateLabelthe label for the specified state

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

◆ deleteConfig() [1/2]

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

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 )

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)

Deletes an entire configuration group.

References getChannelGroup(), getCoreErrorText(), isGroupDefined(), and setChannelGroup().

◆ deleteGalvoPolygons()

void CMMCore::deleteGalvoPolygons ( const char * galvoLabel)

Remove all added polygons

Parameters
galvoLabelthe galvo device label

◆ deletePixelSizeConfig()

void CMMCore::deletePixelSizeConfig ( const char * configName)

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

Parameters
configNamethe pixel size configuration (preset) name

References getCoreErrorText().

◆ detectDevice()

MM::DeviceDetectionStatus CMMCore::detectDevice ( const char * deviceLabel)

Tries to communicate to a device through a given serial port Used to automate discovery of correct serial port. Also configures the serial port correctly.

For legacy reasons, an exception is not thrown if there is an error. Instead, MM::Unimplemented is returned if deviceLabel is not a valid device.

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

References getProperty(), and setProperty().

◆ deviceBusy()

bool CMMCore::deviceBusy ( const char * label)

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)

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 * slmLabel)

Display the waiting image on the SLM.

Parameters
slmLabelthe SLM device label

◆ enableContinuousFocus()

void CMMCore::enableContinuousFocus ( bool enable)

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.

When enabled, sets both the primary log file level and the stderr log level to trace. When disabled, sets both to info.

It is not recommended to mix use of this function with setPrimaryLogLevel() and setStderrLogLevel().

Parameters
enableif set to true, debug messages will be recorded

◆ enableFeature()

void CMMCore::enableFeature ( const char * name,
bool enable )
static

Enable or disable the given Core feature.

Core features control whether experimental functionality (which is subject to breaking changes) is exposed, or whether stricter API usage is enforced.

Currently switchable features:

  • "StrictInitializationChecks" (default: disabled) When enabled, an exception is thrown when an operation requiring an initialized device is attempted on a device that is not successfully initialized. When disabled, no exception is thrown and a warning is logged (and the operation may potentially cause incorrect behavior or a crash).
  • "ParallelDeviceInitialization" (default: enabled) When enabled, serial ports are initialized in serial order, and all other devices are in parallel, using multiple threads, one per device module. Early testing shows this to be reliable, but switch this off when issues are encountered during device initialization.

Permanently enabled features:

  • None so far.

Permanently disabled features:

  • None so far.
Parameters
namethe feature name.
enablewhether to enable or disable the feature.
Exceptions
CMMErrorif the feature name is null or unknown, or attempting to disable a permanently enabled feature, or attempting to enable a permanently disabled feature.

◆ 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 ( )

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

References getCoreErrorText(), and getDeviceName().

◆ getAllowedBinningValues() [1/2]

std::vector< long > CMMCore::getAllowedBinningValues ( )

Returns the binning values supported by the current camera.

Values are read from the camera's Binning property; a value such as "2x2" is returned as 2.

Exceptions
CMMErrorif there is no current camera, or it has no Binning property

References getAllowedBinningValues(), and getCoreErrorText().

Referenced by getAllowedBinningValues().

◆ getAllowedBinningValues() [2/2]

std::vector< long > CMMCore::getAllowedBinningValues ( const char * label)

Returns the binning values supported by the given camera.

Values are read from the camera's Binning property; a value such as "2x2" is returned as 2.

Parameters
labelthe camera device label
Exceptions
CMMErrorif the camera has no Binning property

◆ getAllowedPropertyValues()

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

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()

std::string CMMCore::getAPIVersionInfo ( ) const

Returns the module and device interface versions.

◆ getAutoFocusDevice()

std::string CMMCore::getAutoFocusDevice ( )

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

Referenced by setAutoFocusDevice().

◆ getAutoFocusOffset()

double CMMCore::getAutoFocusOffset ( )

Measures offset for the one-shot focusing device.

References getCoreErrorText(), and getDeviceName().

◆ getAutoShutter()

bool CMMCore::getAutoShutter ( )

Returns the current setting of the auto-shutter option.

◆ getAvailableConfigGroups()

std::vector< std::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()

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

Returns all defined configuration names in a given group

For legacy reasons, an exception is not thrown if there is an error. Instead, an empty vector is returned if configGroup is not a valid config group.

Returns
an array of configuration names

Referenced by defineStateLabel(), and saveSystemConfiguration().

◆ getAvailableDeviceDescriptions()

std::vector< std::string > CMMCore::getAvailableDeviceDescriptions ( const char * library)

Get descriptions for available devices from the specified library.

◆ getAvailableDevices()

std::vector< std::string > CMMCore::getAvailableDevices ( const char * library)

Get available devices from the specified device library.

◆ getAvailableDeviceTypes()

std::vector< long > CMMCore::getAvailableDeviceTypes ( const char * library)

Get type information for available devices from the specified library.

◆ getAvailablePixelSizeConfigs()

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

Returns all defined resolution preset names

Returns
an array of resolution presets

Referenced by saveSystemConfiguration().

◆ getBinning() [1/2]

long CMMCore::getBinning ( )

Returns the current binning setting of the camera. Binning values in "NxN" format (e.g., "2x2") are parsed to return the integer factor (e.g., 2). Properties of type Integer will be converted directly. Properties of type String are expected to be in "NxN" format or a single integer string.

Returns
the binning factor (1-100)

References getBinning(), and getCoreErrorText().

Referenced by getBinning().

◆ getBinning() [2/2]

long CMMCore::getBinning ( const char * label)

Returns the current binning setting of the specified camera. Binning values in "NxN" format (e.g., "2x2") are parsed to return the integer factor (e.g., 2). Properties of type Integer will be converted directly. Properties of type String are expected to be in "NxN" format or a single integer string.

Parameters
labelthe camera device label
Returns
the binning factor (1-100)

◆ 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()

std::string CMMCore::getCameraChannelName ( unsigned int channelNr)

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

◆ getCameraDevice()

std::string CMMCore::getCameraDevice ( )

Returns the label of the currently selected camera device.

Returns
camera name

Referenced by setCameraDevice().

◆ getChannelGroup()

std::string CMMCore::getChannelGroup ( )

Returns the group determining the channel selection.

Referenced by deleteConfigGroup(), and renameConfigGroup().

◆ getCircularBufferMemoryFootprint()

unsigned CMMCore::getCircularBufferMemoryFootprint ( )

Returns the size of the Circular Buffer in MB

◆ getConfigData()

Configuration CMMCore::getConfigData ( const char * configGroup,
const char * configName )

Returns the configuration object for a given group and name.

Returns
The configuration object

References getCoreErrorText().

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

◆ getConfigGroupState()

Configuration CMMCore::getConfigGroupState ( const char * group)

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.

References getConfigGroupState().

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

◆ getConfigGroupStateFromCache()

Configuration CMMCore::getConfigGroupStateFromCache ( const char * group)

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 getConfigGroupState().

◆ getConfigState()

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

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()

◆ getCurrentConfig()

std::string CMMCore::getCurrentConfig ( const char * groupName)

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()

std::string CMMCore::getCurrentConfigFromCache ( const char * groupName)

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]

std::string CMMCore::getCurrentPixelSizeConfig ( )

Get the current pixel configuration name.

Returns an empty string if no pixel size configuration matches the current state.

References getCurrentPixelSizeConfig().

Referenced by getCurrentPixelSizeConfig(), getPixelSizeAffine(), getPixelSizedxdz(), getPixelSizedydz(), getPixelSizeOptimalZUm(), and getPixelSizeUm().

◆ getCurrentPixelSizeConfig() [2/2]

std::string CMMCore::getCurrentPixelSizeConfig ( bool cached)

Get the current pixel configuration name.

Returns an empty string if no pixel size configuration matches the current state.

Parameters
cacheduse the system state cache instead of querying the devices

References Configuration::addSetting(), PropertySetting::getDeviceLabel(), CMMError::getMsg(), getProperty(), PropertySetting::getPropertyName(), Configuration::getSetting(), Configuration::isConfigurationIncluded(), Configuration::isPropertyIncluded(), and Configuration::size().

◆ getDeviceAdapterNames()

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

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)

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)

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

◆ getDeviceInitializationState()

DeviceInitializationState CMMCore::getDeviceInitializationState ( const char * label) const

Queries the initialization state of the given device.

Parameters
labelthe device label

◆ getDeviceLibrary()

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

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

◆ getDeviceName()

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

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(), startSequenceAcquisition(), and stopSequenceAcquisition().

◆ getDevicePropertyNames()

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

Returns all property names supported by the device.

Returns
property name array
Parameters
labelthe device label

◆ getDeviceTimeoutMs()

long CMMCore::getDeviceTimeoutMs ( const char * label)

Returns the effective wait/busy timeout for the specified device: the per-device override if set, otherwise the global timeout.

Parameters
labelthe device label

◆ getDeviceType()

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

Returns device type.

◆ getExposure() [1/2]

double CMMCore::getExposure ( )

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)

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)

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()

std::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)

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()

std::string CMMCore::getGalvoChannel ( const char * galvoLabel)

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

Parameters
galvoLabelthe galvo device label

◆ getGalvoDevice()

std::string CMMCore::getGalvoDevice ( )

Returns the label of the currently selected Galvo device.

Returns
galvo name

Referenced by setGalvoDevice().

◆ getGalvoPosition()

void CMMCore::getGalvoPosition ( const char * galvoLabel,
double & x_stage,
double & y_stage )

Get the Galvo x,y position

Parameters
galvoLabelthe galvo device label
x_stagereceives the x position, in the device's native units
y_stagereceives the y position, in the device's native units

◆ getGalvoXMinimum()

double CMMCore::getGalvoXMinimum ( const char * galvoLabel)

Get the Galvo x minimum

Parameters
galvoLabelthe galvo device label

◆ getGalvoXRange()

double CMMCore::getGalvoXRange ( const char * galvoLabel)

Get the Galvo x range

Parameters
galvoLabelthe galvo device label

◆ getGalvoYMinimum()

double CMMCore::getGalvoYMinimum ( const char * galvoLabel)

Get the Galvo y minimum

Parameters
galvoLabelthe galvo device label

◆ getGalvoYRange()

double CMMCore::getGalvoYRange ( const char * galvoLabel)

Get the Galvo y range

Parameters
galvoLabelthe galvo device label

◆ getImage() [1/2]

void * CMMCore::getImage ( )

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 BGRA8888 (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 numChannel)

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 numChannel argument. Designed specifically for the SWIG wrapping for Java and scripting languages.

Parameters
numChannelChannel 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 current camera's image buffer.

For a multi-channel camera, this is the size of one channel's image.

Returns
buffer size in bytes, or 0 if there is no current camera

◆ getImageHeight()

unsigned CMMCore::getImageHeight ( )

Vertical dimension of the image buffer in pixels.

Returns
the height in pixels (an integer)

◆ getImageProcessorDevice()

std::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)

◆ getInstalledDeviceDescription()

std::string CMMCore::getInstalledDeviceDescription ( const char * hubLabel,
const char * peripheralLabel )

Returns the description of a peripheral device attached to a hub.

Returns "N/A" if the device adapter provides no description.

Parameters
hubLabelthe hub device label
peripheralLabelthe peripheral's device name, as returned by getInstalledDevices()

◆ getInstalledDevices()

std::vector< std::string > CMMCore::getInstalledDevices ( const char * hubLabel)

Detects the child devices attached to a Hub device and returns their names. Load them with loadDevice(). 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
hubLabelthe 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 ( )

Gets the last image from the circular buffer.

Exceptions
CMMErrorif the circular buffer is empty

References getCoreErrorText().

◆ getLastImageMD() [1/2]

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

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 BGRA8888 (see: https://en.wikipedia.org/wiki/RGBA_color_model).

References getLastImageMD().

◆ getLastImageMD() [2/2]

void * CMMCore::getLastImageMD ( unsigned channel,
unsigned slice,
Metadata & md ) const

Returns a pointer to the pixels of the image that was last inserted into the circular buffer, and provides its metadata.

Parameters
channelnot implemented; must be 0
slicenot implemented; must be 0
mdreceives the metadata of the image
Exceptions
CMMErrorif the circular buffer is empty

References getCoreErrorText().

Referenced by getLastImageMD().

◆ getLoadedDevices()

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

Returns an array of labels for currently loaded devices.

Returns
array of labels

◆ getLoadedDevicesOfType()

std::vector< std::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().

◆ getLoadedPeripheralDevices()

std::vector< std::string > CMMCore::getLoadedPeripheralDevices ( const char * hubLabel)

Returns the labels of the loaded devices whose parent is the given hub.

Returns an empty vector if hubLabel is not a loaded hub device.

Parameters
hubLabelthe hub device label

◆ 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
product of all magnifier devices in the system or 1.0 when none is found

References getLoadedDevicesOfType().

Referenced by getPixelSizeAffine(), and getPixelSizeUm().

◆ getMMCoreVersionMajor()

int CMMCore::getMMCoreVersionMajor ( )
static

Returns the MMCore major version number.

◆ getMMCoreVersionMinor()

int CMMCore::getMMCoreVersionMinor ( )
static

Returns the MMCore minor version number.

◆ getMMCoreVersionPatch()

int CMMCore::getMMCoreVersionPatch ( )
static

Returns the MMCore patch version number.

◆ getMMDeviceDeviceInterfaceVersion()

int CMMCore::getMMDeviceDeviceInterfaceVersion ( )
static

Returns the MMDevice device interface version number.

◆ getMMDeviceModuleInterfaceVersion()

int CMMCore::getMMDeviceModuleInterfaceVersion ( )
static

Returns the MMDevice module interface version number.

◆ getMultiROI()

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

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

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 BGRA8888 (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 * stateDeviceLabel)

Returns the total number of available positions (states).

For legacy reasons, an exception is not thrown on error. Instead, -1 is returned if stateDeviceLabel is not a valid state device.

◆ getParentLabel()

std::string CMMCore::getParentLabel ( const char * peripheralLabel)

Returns parent device.

◆ getPixelSizeAffine() [1/2]

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

Returns the current affine transform that relates camera pixels to stage movement. This function returns the stored affine transform corrected for binning and known magnification devices. Returns all zeros if no pixel size configuration matches the current state.

References getPixelSizeAffine().

Referenced by getPixelSizeAffine().

◆ getPixelSizeAffine() [2/2]

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

Returns the current affine transform that relates camera pixels to stage movement. This function returns the stored affine transform corrected for binning and known magnification devices. Returns all zeros if no pixel size configuration matches the current state.

Parameters
cacheduse the system state cache to find the current pixel size configuration when true, otherwise query the hardware

References getCurrentPixelSizeConfig(), and getMagnificationFactor().

◆ getPixelSizeAffineByID()

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

Returns the affine transform that relates camera pixels to stage movement for the requested pixel size configuration. The raw affine transform without correction for binning and magnification will be returned.

Parameters
resolutionIDthe pixel size configuration (preset) name

References getCoreErrorText().

Referenced by saveSystemConfiguration().

◆ getPixelSizeConfigData()

Configuration CMMCore::getPixelSizeConfigData ( const char * configName)

Returns the configuration object for a given pixel size preset.

Parameters
configNamethe pixel size configuration (preset) name
Returns
The configuration object

References getCoreErrorText().

Referenced by saveSystemConfiguration().

◆ getPixelSizedxdz() [1/3]

double CMMCore::getPixelSizedxdz ( )

Returns the angle between the camera's x axis and the axis (direction) of the z drive. This angle is dimensionless (i.e. the ratio of the translation in x caused by a translation in z, i.e. dx / dz).
This angle can be different for different z drives (if there are multiple Z drives in the system, please add the Core-Focus device to the pixel size configuration).
See: https://github.com/micro-manager/micro-manager/issues/1984

Returns
angle (dx/dz) of the Z-stage axis with the camera axis (dimensionless)

References getPixelSizedxdz().

Referenced by getPixelSizedxdz(), and saveSystemConfiguration().

◆ getPixelSizedxdz() [2/3]

double CMMCore::getPixelSizedxdz ( bool cached)

Returns the angle between the camera's x axis and the axis (direction) of the z drive. This angle is dimensionless (i.e. the ratio of the translation in x caused by a translation in z, i.e. dx / dz).
This angle can be different for different z drives (if there are multiple Z drives in the system, please add the Core-Focus device to the pixel size configuration).
See: https://github.com/micro-manager/micro-manager/issues/1984

Parameters
cacheduse the System state cache when true, otherwise checks the hardware.
Returns
angle (dx/dz) of the Z-stage axis with the camera axis (dimensionless)

References getCurrentPixelSizeConfig().

◆ getPixelSizedxdz() [3/3]

double CMMCore::getPixelSizedxdz ( const char * resolutionID)

Returns the angle between the camera's x axis and the axis (direction) of the z drive for the given pixel size configuration.
This angle is dimensionless (i.e. the ratio of the translation in x caused by a translation in z, i.e. dx / dz).
This angle can be different for different z drives (if there are multiple Z drives in the system, please add the Core-Focus device to the pixel size configuration).
See: https://github.com/micro-manager/micro-manager/issues/1984

Parameters
resolutionIDThe pixel size configuration (preset) name
Returns
Angle (dx/dz) of the Z-stage axis with the camera axis (dimensionless)

References getCoreErrorText().

◆ getPixelSizedydz() [1/3]

double CMMCore::getPixelSizedydz ( )

Returns the angle between the camera's y axis and the axis (direction) of the z drive. This angle is dimensionless (i.e. the ratio of the translation in y caused by a translation in z, i.e. dy / dz).
This angle can be different for different z drives (if there are multiple Z drives in the system, please add the Core-Focus device to the pixel size configuration).
See: https://github.com/micro-manager/micro-manager/issues/1984

Returns
angle (dy/dz) of the Z-stage axis with the camera axis (dimensionless)

References getPixelSizedydz().

Referenced by getPixelSizedydz(), and saveSystemConfiguration().

◆ getPixelSizedydz() [2/3]

double CMMCore::getPixelSizedydz ( bool cached)

Returns the angle between the camera's y axis and the axis (direction) of the z drive optionally using the System cache. This angle is dimensionless (i.e. the ratio of the translation in y caused by a translation in z, i.e. dy / dz).
This angle can be different for different z drives (if there are multiple Z drives in the system, please add the Core-Focus device to the pixel size configuration).
See: https://github.com/micro-manager/micro-manager/issues/1984

Parameters
cachedUses System state cache to find active pixel size config when true
Returns
angle (dy/dz) of the Z-stage axis with the camera axis (dimensionless)

References getCurrentPixelSizeConfig().

◆ getPixelSizedydz() [3/3]

double CMMCore::getPixelSizedydz ( const char * resolutionID)

Returns the angle between the camera's y axis and the axis (direction) of the z drive for the given pixel size configuration.
This angle is dimensionless (i.e. the ratio of the translation in y caused by a translation in z, i.e. dy / dz).
This angle can be different for different z drives (if there are multiple Z drives in the system, please add the Core-Focus device to the pixel size configuration).
See: https://github.com/micro-manager/micro-manager/issues/1984

Parameters
resolutionIDName of Pixel Size configuration for this dy /dz angle
Returns
angle (dy/dz) of the Z-stage axis with the camera axis (dimensionless)

References getCoreErrorText().

◆ getPixelSizeOptimalZUm() [1/3]

double CMMCore::getPixelSizeOptimalZUm ( )

Returns the optimal z step size in um. There is no magic to this number, but lets the system configuration communicate to the end user what the optimal Z step size is for this pixel size configuration.

References getPixelSizeOptimalZUm().

Referenced by getPixelSizeOptimalZUm(), and saveSystemConfiguration().

◆ getPixelSizeOptimalZUm() [2/3]

double CMMCore::getPixelSizeOptimalZUm ( bool cached)

Returns the optimal z step size in um, optionally using cached pixel configuration. There is no magic to this number, but lets the system configuration communicate to the end user what the optimal Z step size is for this pixel size configuration.

Parameters
cachedUses System state cache to find active pixel size config when true

References getCurrentPixelSizeConfig().

◆ getPixelSizeOptimalZUm() [3/3]

double CMMCore::getPixelSizeOptimalZUm ( const char * resolutionID)

Returns the optimal z step size in um for the given pixel size configuration. There is no magic to this number, but lets the system configuration communicate to the end user what the optimal Z step size is for this pixel size configuration.

Parameters
resolutionIDthe pixel size configuration (preset) name

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.

References getPixelSizeUm().

Referenced by getPixelSizeUm().

◆ 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.

For legacy reasons, an exception is not thrown if there is an error. Instead, 0.0 is returned if any property values cannot be read, or if no pixel size preset matches the property values.

Parameters
cacheduse the system state cache instead of querying the devices

References getCurrentPixelSizeConfig(), and getMagnificationFactor().

◆ getPixelSizeUmByID()

double CMMCore::getPixelSizeUmByID ( const char * resolutionID)

Returns the pixel size in um for the requested pixel size configuration.

Parameters
resolutionIDthe pixel size configuration (preset) name

References getCoreErrorText().

Referenced by saveSystemConfiguration().

◆ getPosition() [1/2]

double CMMCore::getPosition ( )

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

Returns
the position in microns

References getFocusDevice(), and getPosition().

Referenced by getPosition().

◆ getPosition() [2/2]

double CMMCore::getPosition ( const char * stageLabel)

Returns the current position of the stage in microns.

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

◆ getPrimaryLogFile()

std::string CMMCore::getPrimaryLogFile ( ) const

Return the name of the primary Core log file.

◆ getPrimaryLogLevel()

mmcore::LogLevel CMMCore::getPrimaryLogLevel ( )

Return the current primary log file level.

◆ getProperty()

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

Returns the property value for the specified device.

Returns
the property value
Parameters
labelthe device label
propNamethe property name

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

◆ getPropertyFromCache()

std::string CMMCore::getPropertyFromCache ( const char * deviceLabel,
const char * propName ) const

Returns the cached property value for the specified device.

Returns
the property value
Parameters
deviceLabelthe device label
propNamethe property name

◆ getPropertyLowerLimit()

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

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

◆ getPropertySequenceMaxLength()

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

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

Parameters
labelthe device label
propNamethe property name

◆ getPropertyType()

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

Returns the intrinsic property type.

◆ getPropertyUpperLimit()

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

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

◆ getPumpFlowrate()

double CMMCore::getPumpFlowrate ( const char * pumpLabel)

Gets the flowrate of the pump in uL per second

Parameters
pumpLabelthe volumetric pump device label

◆ getPumpMaxVolume()

double CMMCore::getPumpMaxVolume ( const char * pumpLabel)

Gets the max volume of the pump in uL

Parameters
pumpLabelthe volumetric pump device label

◆ getPumpPressureKPa()

double CMMCore::getPumpPressureKPa ( const char * pumplabel)

Gets the pressure of the pump in kPa

Parameters
pumplabelthe pressure pump device label

◆ getPumpVolume()

double CMMCore::getPumpVolume ( const char * pumpLabel)

Get the fluid volume in the pump in uL

Parameters
pumpLabelthe volumetric pump device label

◆ getRemainingImageCount()

long CMMCore::getRemainingImageCount ( )

Returns the number of images available in the circular buffer.

◆ getROI() [1/2]

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

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

◆ getROI() [2/2]

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

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

◆ getSerialPortAnswer()

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

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

Parameters
portLabelthe serial port device label
termthe terminating sequence that ends the answer (must not be empty)

◆ getShutterDevice()

std::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 ( )

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

References getShutterDevice(), and getShutterOpen().

Referenced by getShutterOpen().

◆ getShutterOpen() [2/2]

bool CMMCore::getShutterOpen ( const char * shutterLabel)

Returns the state of the specified shutter.

Parameters
shutterLabelthe name of the shutter

◆ getSLMBytesPerPixel()

unsigned CMMCore::getSLMBytesPerPixel ( const char * slmLabel)

Returns the number of bytes per SLM pixel

Parameters
slmLabelname of the SLM

◆ getSLMDevice()

std::string CMMCore::getSLMDevice ( )

Returns the label of the currently selected SLM device.

Returns
slm name

Referenced by setSLMDevice().

◆ getSLMExposure()

double CMMCore::getSLMExposure ( const char * slmLabel)

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

Parameters
slmLabelthe SLM device label
Returns
the exposure time in milliseconds

◆ getSLMHeight()

unsigned CMMCore::getSLMHeight ( const char * slmLabel)

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

Parameters
slmLabelname of the SLM

◆ getSLMNumberOfComponents()

unsigned CMMCore::getSLMNumberOfComponents ( const char * slmLabel)

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
slmLabelname of the SLM

◆ getSLMSequenceMaxLength()

long CMMCore::getSLMSequenceMaxLength ( const char * slmLabel)

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

Parameters
slmLabelname of the SLM

Referenced by loadSLMSequence().

◆ getSLMWidth()

unsigned CMMCore::getSLMWidth ( const char * slmLabel)

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

Parameters
slmLabelname of the SLM

◆ getStageSequenceMaxLength()

long CMMCore::getStageSequenceMaxLength ( const char * stageLabel)

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

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

Referenced by loadStageSequence().

◆ getState()

long CMMCore::getState ( const char * stateDeviceLabel)

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
stateDeviceLabelthe device label

◆ getStateFromLabel()

long CMMCore::getStateFromLabel ( const char * stateDeviceLabel,
const char * stateLabel )

Obtain the state for a given label.

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

Referenced by setStateLabel().

◆ getStateLabel()

std::string CMMCore::getStateLabel ( const char * stateDeviceLabel)

Returns the current state as the label (string).

Returns
the current state's label
Parameters
stateDeviceLabelthe device label

◆ getStateLabels()

std::vector< std::string > CMMCore::getStateLabels ( const char * stateDeviceLabel)

Return labels for all states

Returns
an array of state labels
Parameters
stateDeviceLabelthe device label

◆ getStderrLogLevel()

mmcore::LogLevel CMMCore::getStderrLogLevel ( )

Return the current stderr log level.

◆ getSystemState()

Configuration CMMCore::getSystemState ( )

Returns the entire system state, i.e. the collection of all property values from all devices.

For legacy reasons, this function does not throw an exception if there is an error. If there is an error, properties may be missing from the return value.

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

◆ getTimeoutMs()

long CMMCore::getTimeoutMs ( )

Returns the timeout for all wait commands in milliseconds.

◆ getVersionInfo()

std::string CMMCore::getVersionInfo ( ) const

Returns the MMCore version as a string of the form "MMCore version X.Y.Z".

◆ getXPosition() [1/2]

double CMMCore::getXPosition ( )

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

Returns
the x position

References getXPosition(), and getXYStageDevice().

Referenced by getXPosition().

◆ getXPosition() [2/2]

double CMMCore::getXPosition ( const char * xyStageLabel)

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

Returns
the x position
Parameters
xyStageLabelthe stage device label

◆ getXYPosition() [1/2]

void CMMCore::getXYPosition ( const char * xyStageLabel,
double & x_stage,
double & y_stage )

Obtains the current position of the XY stage in microns.

Parameters
xyStageLabelthe stage device label
x_stagea return parameter yielding the X position in microns
y_stagea return parameter yielding the Y position in microns

Referenced by getXYPosition().

◆ getXYPosition() [2/2]

void CMMCore::getXYPosition ( double & x_stage,
double & y_stage )

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

Parameters
x_stagea return parameter yielding the X position in microns
y_stagea return parameter yielding the Y position in microns

References getXYPosition(), and getXYStageDevice().

◆ getXYStageDevice()

std::string CMMCore::getXYStageDevice ( )

◆ getXYStageSequenceMaxLength()

long CMMCore::getXYStageSequenceMaxLength ( const char * xyStageLabel)

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

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

Referenced by loadXYStageSequence().

◆ getYPosition() [1/2]

double CMMCore::getYPosition ( )

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

Returns
the y position

References getXYStageDevice(), and getYPosition().

Referenced by getYPosition().

◆ getYPosition() [2/2]

double CMMCore::getYPosition ( const char * xyStageLabel)

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

Returns
the y position
Parameters
xyStageLabelthe stage device label

◆ hasDeviceTimeout()

bool CMMCore::hasDeviceTimeout ( const char * label)

Returns true iff the specified device has a per-device timeout override.

Parameters
labelthe device label

◆ hasProperty()

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

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 )

Queries device if the specific property has limits.

Parameters
labelthe device label
propNamethe property name

◆ home()

void CMMCore::home ( const char * xyOrZStageLabel)

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
xyOrZStageLabelthe stage device label (either XY or focus/Z stage)

◆ incrementalFocus()

void CMMCore::incrementalFocus ( )

Performs incremental focus for the one-shot focusing device.

References getCoreErrorText(), and getDeviceName().

◆ initializeAllDevices()

void CMMCore::initializeAllDevices ( )

Calls Initialize() method for each loaded device.

If the ParallelDeviceInitialization feature is enabled (the default), serial ports are initialized first, then devices from different device adapters are initialized in parallel. Otherwise, devices are initialized one at a time. See enableFeature().

References isFeatureEnabled().

◆ initializeCircularBuffer()

void CMMCore::initializeCircularBuffer ( )

Initialize circular buffer based on the current camera settings.

References getCoreErrorText(), and getDeviceName().

◆ initializeDevice()

void CMMCore::initializeDevice ( const char * label)

Initializes specific device.

Parameters
labelthe device label
Parameters
labelthe device to initialize

◆ invertPumpDirection()

void CMMCore::invertPumpDirection ( const char * pumpLabel,
bool invert )

Sets whether the pump direction needs to be inverted

Parameters
pumpLabelthe volumetric pump device label
inverttrue to invert the pump direction

◆ 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 reset().

◆ isContinuousFocusDrive()

bool CMMCore::isContinuousFocusDrive ( const char * stageLabel)

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

◆ isContinuousFocusEnabled()

bool CMMCore::isContinuousFocusEnabled ( )

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

References getDeviceName().

◆ isContinuousFocusLocked()

bool CMMCore::isContinuousFocusLocked ( )

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

◆ isExposureSequenceable()

bool CMMCore::isExposureSequenceable ( const char * cameraLabel)

Queries camera if exposure can be used in a sequence

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

◆ isFeatureEnabled()

bool CMMCore::isFeatureEnabled ( const char * name)
static

Return whether the given Core feature is currently enabled.

See enableFeature() for the available features.

Parameters
namethe feature name.
Returns
whether the feature is enabled.
Exceptions
CMMErrorif the feature name is null or unknown.

Referenced by initializeAllDevices().

◆ isGroupDefined()

bool CMMCore::isGroupDefined ( const char * groupName)

Checks if the group already exists.

Returns
true if the group is already defined

Referenced by deleteConfigGroup(), and renameConfigGroup().

◆ isMultiROIEnabled()

bool CMMCore::isMultiROIEnabled ( )

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

References getCoreErrorText().

◆ isMultiROISupported()

bool CMMCore::isMultiROISupported ( )

Queries the camera to determine if it supports multiple ROIs.

References getCoreErrorText().

◆ isPixelSizeConfigDefined()

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

Checks if the Pixel Size Resolution already exists

Parameters
resolutionIDthe pixel size configuration (preset) name
Returns
true if the configuration is already defined

◆ isPropertyPreInit()

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

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 )

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 )

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

Parameters
labelthe device label
propNamethe property name

◆ isPumpDirectionInverted()

bool CMMCore::isPumpDirectionInverted ( const char * pumpLabel)

Gets whether the pump direction needs to be inverted

Parameters
pumpLabelthe volumetric pump device label

◆ isSequenceRunning() [1/2]

bool CMMCore::isSequenceRunning ( )

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

◆ isSequenceRunning() [2/2]

bool CMMCore::isSequenceRunning ( const char * cameraLabel)

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

◆ isStageLinearSequenceable()

bool CMMCore::isStageLinearSequenceable ( const char * stageLabel)

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

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

◆ isStageSequenceable()

bool CMMCore::isStageSequenceable ( const char * stageLabel)

Queries stage if it can be used in a sequence

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

◆ isStageUsingCallbacks()

bool CMMCore::isStageUsingCallbacks ( const char * stageLabel)

Queries whether this stage uses callbacks to signal position changes. When false, use polling to stay updated about the position of the stage.

◆ isXYStageSequenceable()

bool CMMCore::isXYStageSequenceable ( const char * xyStageLabel)

Queries XY stage if it can be used in a sequence

Parameters
xyStageLabelthe XY stage device label

◆ isXYStageUsingCallbacks()

bool CMMCore::isXYStageUsingCallbacks ( const char * xyStageLabel)

Queries whether this XYStage uses callbacks to signal position changes. When false, use polling to stay updated about the position of the stage.

◆ loadDevice()

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

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.

◆ loadExposureSequence()

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

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
exposureSequence_mssequence of exposure times the camera will use during a sequence acquisition

References getExposureSequenceMaxLength().

◆ loadGalvoPolygons()

void CMMCore::loadGalvoPolygons ( const char * galvoLabel)

Load a set of galvo polygons to the device

Parameters
galvoLabelthe galvo device label

◆ loadMockDeviceAdapter()

void CMMCore::loadMockDeviceAdapter ( const char * name,
MockDeviceAdapter * implementation )

Testing only: load a mock device adapter.

This function is designed for unit testing of MMCore itself, and its interface is subject to change. It is also not designed for language bindings (Java, Python) in mind (at least for now).

Do not use this in production code.

The caller is responsible for keeping implementation valid until this Core is destroyed (or until unloadLibrary(name) is called, but that is not recommended.)

◆ loadPropertySequence()

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

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
propNamethe property name
eventSequencethe sequence of events/states that the device will execute in response to external triggers

◆ loadSLMSequence()

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

Load a sequence of images into the SLM

Parameters
slmLabelname of the SLM
imageSequencepointers to the images to be used in the sequence

References getSLMSequenceMaxLength().

◆ loadStageSequence()

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

Transfer a sequence of positions to the stage. This should only be called for stages that are sequenceable.

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

References getStageSequenceMaxLength().

◆ loadSystemConfiguration()

void CMMCore::loadSystemConfiguration ( const char * fileName)

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, 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 Property - executes setProperty() 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.

This function is not thread-safe.

References CMMError::getFullMsg(), and unloadAllDevices().

◆ loadSystemState()

void CMMCore::loadSystemState ( const char * fileName)

Loads a system state file written by saveSystemState() and applies its property values.

Format specification: the same as in loadSystemConfiguration() command

References getCoreErrorText(), and setProperty().

◆ loadXYStageSequence()

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

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
xyStageLabelthe 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

References getXYStageSequenceMaxLength().

◆ log() [1/2]

void CMMCore::log ( const char * msg,
mmcore::LogLevel level )

Record text message in the log file at the specified level.

◆ log() [2/2]

void CMMCore::log ( const char * msg,
mmcore::LogLevel level,
const char * loggerName )

Record text message in the log file at the specified level, with a caller-specified logger name as the component label.

◆ logMessage() [1/2]

void CMMCore::logMessage ( const char * msg)

Record text message in the log file.

Parameters
msgthe message to log

◆ logMessage() [2/2]

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

Record text message in the log file.

Parameters
msgthe message to log
debugOnlyif true, log at debug level instead of info level

◆ noop()

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 * galvoLabel,
double x,
double y,
double pulseTime_us )

Set the Galvo to an x,y position and fire the laser for pulseTime_us microseconds.

Parameters
galvoLabelthe galvo device label
xthe x position, in the device's native units
ythe y position, in the device's native units
pulseTime_ushow long to fire the laser, in microseconds

◆ popNextImage()

void * CMMCore::popNextImage ( )

Gets and removes the next image from the circular buffer.

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 BGRA8888 (see: https://en.wikipedia.org/wiki/RGBA_color_model).

Exceptions
CMMErrorif the circular buffer is empty

References getCoreErrorText().

◆ popNextImageMD() [1/2]

void * CMMCore::popNextImageMD ( Metadata & md)

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

References popNextImageMD().

◆ popNextImageMD() [2/2]

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

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

channel has not been implemented and should always be 0. slice has not been implemented and should always be 0.

References getCoreErrorText().

Referenced by popNextImageMD().

◆ prepareSequenceAcquisition()

MMCORE_DEPRECATED void CMMCore::prepareSequenceAcquisition ( const char * cameraLabel)

Deprecated and only checks that the camera is not running a sequence acquisition.

Deprecated

References getCoreErrorText().

◆ pressurePumpCalibrate()

void CMMCore::pressurePumpCalibrate ( const char * pumpLabel)

Calibrates the pump

Parameters
pumpLabelthe pressure pump device label

◆ pressurePumpRequiresCalibration()

bool CMMCore::pressurePumpRequiresCalibration ( const char * pumpLabel)

Returns true if the pump must be calibrated (see pressurePumpCalibrate()) before use.

Parameters
pumpLabelthe pressure pump device label

◆ pressurePumpStop()

void CMMCore::pressurePumpStop ( const char * pumpLabel)

Stops the pressure pump

Parameters
pumpLabelthe pressure pump device label

◆ pumpDispenseDurationSeconds()

void CMMCore::pumpDispenseDurationSeconds ( const char * pumpLabel,
double seconds )

Dispenses for the provided duration (in seconds) at the set flowrate

Parameters
pumpLabelthe volumetric pump device label
secondshow long to dispense, in seconds

◆ pumpDispenseVolumeUl()

void CMMCore::pumpDispenseVolumeUl ( const char * pumpLabel,
double microLiter )

Dispenses the provided volume (in uL) at the set flowrate

Parameters
pumpLabelthe volumetric pump device label
microLiterthe volume to dispense, in uL

◆ pumpStart()

void CMMCore::pumpStart ( const char * pumpLabel)

Start dispensing at the set flowrate until syringe is empty, or manually stopped (whichever occurs first).

Parameters
pumpLabelthe volumetric pump device label

◆ readFromSerialPort()

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

Reads the contents of the Rx buffer.

Parameters
portLabelthe serial port device label

◆ registerCallback()

void CMMCore::registerCallback ( MMEventCallback * cb)

Register a callback (listener class).

MMCore will send notifications on internal events using this interface.

Pass nullptr to unregister.

The caller is responsible for ensuring that the object pointed to by cb remains valid until it is unregistered.

Must not be called from within a callback handler.

Referenced by ~CMMCore().

◆ renameConfig()

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

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 )

Renames a configuration group.

References getChannelGroup(), getCoreErrorText(), isGroupDefined(), and setChannelGroup().

◆ renamePixelSizeConfig()

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

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

Parameters
oldConfigNamethe current pixel size configuration (preset) name
newConfigNamethe new name

References getCoreErrorText().

◆ reset()

void CMMCore::reset ( )

Unloads all devices from the core, clears all configuration data.

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

Referenced by ~CMMCore().

◆ runGalvoPolygons()

void CMMCore::runGalvoPolygons ( const char * galvoLabel)

Run a loop of galvo polygons

Parameters
galvoLabelthe galvo device label

◆ runGalvoSequence()

void CMMCore::runGalvoSequence ( const char * galvoLabel)

Run a sequence of galvo positions

Parameters
galvoLabelthe galvo device label

◆ saveSystemConfiguration()

void CMMCore::saveSystemConfiguration ( const char * fileName)

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, pre-initialization properties, and configurations. The file format is the same as for the system state.

References getAvailableConfigGroups(), getAvailableConfigs(), getAvailablePixelSizeConfigs(), getConfigData(), getCoreErrorText(), PropertySetting::getDeviceLabel(), getFocusDirection(), getPixelSizeAffineByID(), getPixelSizeConfigData(), getPixelSizedxdz(), getPixelSizedydz(), getPixelSizeOptimalZUm(), getPixelSizeUmByID(), PropertySetting::getPropertyName(), PropertySetting::getPropertyValue(), Configuration::getSetting(), getSystemState(), and Configuration::size().

◆ saveSystemState()

void CMMCore::saveSystemState ( const char * fileName)

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 * stageLabel,
double newZUm )

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
stageLabelthe stage device label
newZUmthe new coordinate to assign to the current Z position

Referenced by setAdapterOrigin().

◆ setAdapterOrigin() [2/2]

void CMMCore::setAdapterOrigin ( double newZUm)

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 * xyStageLabel,
double newXUm,
double newYUm )

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
xyStageLabelthe 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 )

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 * focusLabel)

Sets the current auto-focus device.

References getAutoFocusDevice().

◆ setAutoFocusOffset()

void CMMCore::setAutoFocusOffset ( double offset)

Applies an offset to the one-shot focusing device.

References getCoreErrorText(), and getDeviceName().

◆ setAutoShutter()

void CMMCore::setAutoShutter ( bool state)

If this option is enabled, the shutter automatically opens and closes when an image is acquired.

Parameters
statetrue for enabled

◆ setBinning() [1/2]

void CMMCore::setBinning ( const char * label,
long binning )

Sets the binning setting of the specified camera. Automatically handles both Integer ("N") and String ("NxN" or "N") property formats.

Parameters
labelthe camera device label
binningthe binning factor (1-100)

◆ setBinning() [2/2]

void CMMCore::setBinning ( long binning)

Sets the binning setting of the camera. Automatically handles both Integer ("N") and String ("NxN" or "N") property formats.

Parameters
binningthe binning factor (1-100)

References getCoreErrorText(), and setBinning().

Referenced by setBinning().

◆ setCameraDevice()

void CMMCore::setCameraDevice ( const char * cameraLabel)

Sets the current camera device.

Parameters
cameraLabelthe camera device label

References getCameraDevice().

◆ setChannelGroup()

void CMMCore::setChannelGroup ( const char * channelGroup)

Specifies the group determining the channel selection.

Referenced by deleteConfigGroup(), renameConfigGroup(), and unloadAllDevices().

◆ setCircularBufferMemoryFootprint()

void CMMCore::setCircularBufferMemoryFootprint ( unsigned sizeMB)

Reserve memory for the circular buffer.

Parameters
sizeMBthe size of the circular buffer, in megabytes

References getCoreErrorText().

◆ setConfig()

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

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 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 )

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

Parameters
labelthe device label
delayMsthe desired delay in milliseconds

◆ setDeviceTimeoutMs()

void CMMCore::setDeviceTimeoutMs ( const char * label,
long timeoutMs )

Sets a per-device override for the wait/busy timeout.

When set, the override replaces the global timeout (see setTimeoutMs) for waitForDevice on this specific device. The override does not persist across device unload/reload.

Parameters
labelthe device label (must name a loaded non-Core device)
timeoutMsthe timeout in milliseconds (must be positive)

◆ setExposure() [1/2]

void CMMCore::setExposure ( const char * cameraLabel,
double dExp )

Sets the exposure setting of the specified camera in milliseconds.

Parameters
cameraLabelthe camera device label
dExpthe exposure in milliseconds

◆ setExposure() [2/2]

void CMMCore::setExposure ( double exp)

Sets the exposure setting of the current camera in milliseconds.

Parameters
expthe exposure in milliseconds

References getCoreErrorText(), and setExposure().

Referenced by setExposure().

◆ setFocusDevice()

void CMMCore::setFocusDevice ( const char * focusLabel)

Sets the current focus device.

Parameters
focusLabelthe 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.

For legacy reasons, an exception is not thrown if there is an error. Instead, nothing is done if stageLabel is not a valid focus stage.

◆ setGalvoDevice()

void CMMCore::setGalvoDevice ( const char * galvoLabel)

Sets the current galvo device.

References getGalvoDevice().

◆ setGalvoIlluminationState()

void CMMCore::setGalvoIlluminationState ( const char * galvoLabel,
bool on )

Set the galvo's illumination state to on or off

Parameters
galvoLabelthe galvo device label
ontrue to switch the light source on, false to switch it off

◆ setGalvoPolygonRepetitions()

void CMMCore::setGalvoPolygonRepetitions ( const char * galvoLabel,
int repetitions )

Set the number of times to loop galvo polygons

Parameters
galvoLabelthe galvo device label
repetitionsnumber of times runGalvoPolygons() draws the polygons

◆ setGalvoPosition()

void CMMCore::setGalvoPosition ( const char * galvoLabel,
double x,
double y )

Set the Galvo to an x,y position

Parameters
galvoLabelthe galvo device label
xthe x position, in the device's native units
ythe y position, in the device's native units

◆ setGalvoSpotInterval()

void CMMCore::setGalvoSpotInterval ( const char * galvoLabel,
double pulseTime_us )

Sets how long the galvo illuminates each spot.

Despite the name, this is the illumination time of a single spot, not the interval between spots.

Parameters
galvoLabelthe galvo device label
pulseTime_usthe illumination time per spot, in microseconds

◆ setImageProcessorDevice()

void CMMCore::setImageProcessorDevice ( const char * procLabel)

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 )

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 ( )

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(), and setOrigin().

Referenced by setOrigin().

◆ setOrigin() [2/2]

void CMMCore::setOrigin ( const char * stageLabel)

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
stageLabelthe stage device label

◆ setOriginX() [1/2]

void CMMCore::setOriginX ( )

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

The current position becomes the new X = 0.

References getXYStageDevice(), and setOriginX().

Referenced by setOriginX().

◆ setOriginX() [2/2]

void CMMCore::setOriginX ( const char * xyStageLabel)

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

The current position becomes the new X = 0.

Parameters
xyStageLabelthe xy stage device label

◆ setOriginXY() [1/2]

void CMMCore::setOriginXY ( )

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(), and setOriginXY().

Referenced by setOriginXY().

◆ setOriginXY() [2/2]

void CMMCore::setOriginXY ( const char * xyStageLabel)

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
xyStageLabelthe stage device label

◆ setOriginY() [1/2]

void CMMCore::setOriginY ( )

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

The current position becomes the new Y = 0.

References getXYStageDevice(), and setOriginY().

Referenced by setOriginY().

◆ setOriginY() [2/2]

void CMMCore::setOriginY ( const char * xyStageLabel)

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

The current position becomes the new Y = 0.

Parameters
xyStageLabelthe xy stage device label

◆ setParentLabel()

void CMMCore::setParentLabel ( const char * deviceLabel,
const char * parentHubLabel )

Sets parent device label

◆ setPixelSizeAffine()

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

Sets the raw affine transform for the specific pixel size configuration. The affine transform consists of the first two rows of a 3x3 matrix, the third row is always 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 getMagnificationFactor() function). Order: row[0]col[0] row[0]col[1] row[0]col[2] row[1]col[0] row[1]col[1] row[1]col[2].

Parameters
resolutionIDthe pixel size configuration (preset) name
affinethe 6 values of the affine transform
Exceptions
CMMErrorif affine does not have exactly 6 values

References getCoreErrorText().

◆ setPixelSizeConfig()

void CMMCore::setPixelSizeConfig ( const char * resolutionID)

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

Parameters
resolutionIDthe pixel size configuration (preset) name

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

◆ setPixelSizedxdz()

void CMMCore::setPixelSizedxdz ( const char * resolutionID,
double dXdZ )

Sets the angle between the camera's x axis and the axis (direction) of the z drive. This angle is dimensionless (i.e. the ratio of the translation in x caused by a translation in z, i.e. dx / dz).
This angle can be different for different z drives (if there are multiple Z drives in the system, please add the Core-Focus device to the pixel size configuration).
See: https://github.com/micro-manager/micro-manager/issues/1984

Parameters
resolutionIDThe pixel size configuration (preset) name
dXdZAngle of the Z-stage axis with the camera axis (dimensionless)

References getCoreErrorText().

◆ setPixelSizedydz()

void CMMCore::setPixelSizedydz ( const char * resolutionID,
double dYdZ )

Sets the angle between the camera's y axis and the axis (direction) of the z drive. This angle is dimensionless (i.e. the ratio of the translation in y caused by a translation in z, i.e. dy / dz).
This angle can be different for different z drives (if there are multiple Z drives in the system, please add the Core-Focus device to the pixel size configuration).
See: https://github.com/micro-manager/micro-manager/issues/1984

Parameters
resolutionIDThe pixel size configuration (preset) name
dYdZAngle of the Z-stage axis with the camera axis (dimensionless)

References getCoreErrorText().

◆ setPixelSizeOptimalZUm()

void CMMCore::setPixelSizeOptimalZUm ( const char * resolutionID,
double optimalZ )

Sets the optimal Z step size (in microns). There is no magic here, this number is provided by the person configuring the microscope, to be used by the person using the microscope.

Parameters
resolutionIDThe pixel size configuration (preset) name
optimalZOptimal z step in microns

References getCoreErrorText().

◆ setPixelSizeUm()

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

Sets the pixel size in microns for the specified pixel size configuration.

Parameters
resolutionIDthe pixel size configuration (preset) name
pixSizethe pixel size in microns, at binning 1 and with no magnification (see getMagnificationFactor())

References getCoreErrorText().

◆ setPosition() [1/2]

void CMMCore::setPosition ( const char * stageLabel,
double position )

Sets the position of the stage in microns.

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

Referenced by setPosition().

◆ setPosition() [2/2]

void CMMCore::setPosition ( double position)

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 )

Set the primary Core log file.

Parameters
filenameThe log filename. If empty or null, the primary log file is disabled.
truncateWhether to truncate the log file if it already exists.

◆ setPrimaryLogFileRotation()

void CMMCore::setPrimaryLogFileRotation ( long long maxFileSize,
int maxBackupCount )

Set log rotation for the primary Core log file.

Parameters
maxFileSizeMaximum file size in bytes before rotation. 0 disables rotation.
maxBackupCountMaximum number of rotated files to keep. 0 means unlimited. Oldest files are deleted first.

◆ setPrimaryLogLevel()

void CMMCore::setPrimaryLogLevel ( mmcore::LogLevel level)

Set the log level for the primary log file.

Messages below this level will not be recorded in the primary log file.

It is not recommended to mix use of this function with enableDebugLog() and debugLogEnabled().

◆ setProperty() [1/5]

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

Changes the value of the device property.

Parameters
labelthe device label
propNameproperty name
propValuethe new property value

References setProperty().

◆ setProperty() [2/5]

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

Changes the value of the device property.

Parameters
labelthe device label
propNamethe property name
propValuethe new property value

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

◆ setProperty() [3/5]

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

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 )

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 long propValue )

Changes the value of the device property.

Parameters
labelthe device label
propNamethe property name
propValuethe new property value

References setProperty().

◆ setPumpFlowrate()

void CMMCore::setPumpFlowrate ( const char * pumpLabel,
double volume )

Sets the flowrate of the pump in uL per second

Parameters
pumpLabelthe volumetric pump device label
volumethe flow rate in uL per second

◆ setPumpMaxVolume()

void CMMCore::setPumpMaxVolume ( const char * pumpLabel,
double volume )

Sets the max volume of the pump in uL

Parameters
pumpLabelthe volumetric pump device label
volumethe maximum volume of the pump, in uL

◆ setPumpPressureKPa()

void CMMCore::setPumpPressureKPa ( const char * pumplabel,
double pressure )

Sets the pressure of the pump in kPa

Parameters
pumplabelthe pressure pump device label
pressurethe pressure in kPa

◆ setPumpVolume()

void CMMCore::setPumpVolume ( const char * pumpLabel,
double volume )

Sets the volume of fluid in the pump in uL. Note it does not withdraw up to this amount. It is merely to inform MM of the volume in a prefilled pump.

Parameters
pumpLabelthe volumetric pump device label
volumethe volume of fluid in the pump, in uL

◆ setRelativePosition() [1/2]

void CMMCore::setRelativePosition ( const char * stageLabel,
double d )

Sets the relative position of the stage in microns.

Parameters
stageLabelthe 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)

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 * xyStageLabel,
double dx,
double dy )

Sets the relative position of the XY stage in microns.

Parameters
xyStageLabelthe 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 )

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 ( const char * label,
int x,
int y,
int xSize,
int ySize )

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
xx coordinate of the top left corner
yy coordinate of the top left corner
xSizenumber of horizontal pixels
ySizenumber of vertical pixels

References getCoreErrorText().

◆ setROI() [2/2]

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

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
xx coordinate of the top left corner
yy coordinate of the top left corner
xSizenumber of horizontal pixels
ySizenumber of vertical pixels

References getCoreErrorText().

◆ setSerialPortCommand()

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

Sends a command, followed by a terminator, to the serial port. Use getSerialPortAnswer() to read the reply.

Parameters
portLabelthe serial port device label
commandthe command to send
termthe terminator to send after the command

◆ 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 )

Sets all com port properties in a single call.

Each value is passed to setProperty() for the corresponding property of the port device.

Parameters
portNamethe serial port device label
answerTimeoutAnswerTimeout, in milliseconds
baudRateBaudRate, e.g. "9600"
delayBetweenCharsMsDelayBetweenCharsMs, in milliseconds
handshakingHandshaking, e.g. "Off"
parityParity, e.g. "None"
stopBitsStopBits, e.g. "1"

References setProperty().

◆ setShutterDevice()

void CMMCore::setShutterDevice ( const char * shutterLabel)

Sets the current shutter device.

Parameters
shutterLabelthe shutter device label

References getShutterDevice().

◆ setShutterOpen() [1/2]

void CMMCore::setShutterOpen ( bool state)

Opens or closes the currently selected (default) shutter.

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

References getShutterDevice(), and setShutterOpen().

Referenced by setShutterOpen().

◆ setShutterOpen() [2/2]

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

Opens or closes the specified shutter.

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

◆ setSLMDevice()

void CMMCore::setSLMDevice ( const char * slmLabel)

Sets the current SLM device.

References getSLMDevice().

◆ setSLMExposure()

void CMMCore::setSLMExposure ( const char * slmLabel,
double exposure_ms )

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

Parameters
slmLabelthe SLM device label
exposure_msthe exposure time in milliseconds

◆ setSLMImage() [1/2]

void CMMCore::setSLMImage ( const char * slmLabel,
imgRGB32 pixels )

Write a 32-bit color image to the SLM.

Parameters
slmLabelthe SLM device label
pixels32-bit RGB image of getSLMWidth() x getSLMHeight() pixels

◆ setSLMImage() [2/2]

void CMMCore::setSLMImage ( const char * slmLabel,
unsigned char * pixels )

Write an 8-bit monochrome image to the SLM.

Parameters
slmLabelthe SLM device label
pixels8-bit image of getSLMWidth() x getSLMHeight() pixels

◆ setSLMPixelsTo() [1/2]

void CMMCore::setSLMPixelsTo ( const char * slmLabel,
unsigned char intensity )

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

Parameters
slmLabelthe SLM device label
intensitythe 8-bit intensity to set all pixels to

◆ setSLMPixelsTo() [2/2]

void CMMCore::setSLMPixelsTo ( const char * slmLabel,
unsigned char red,
unsigned char green,
unsigned char blue )

Set all SLM pixels to an RGB color.

Parameters
slmLabelthe SLM device label
redthe red intensity (0-255)
greenthe green intensity (0-255)
bluethe blue intensity (0-255)

◆ setStageLinearSequence()

void CMMCore::setStageLinearSequence ( const char * stageLabel,
double dZ_um,
int nSlices )

Loads a linear sequence (defined by step size and number of steps) into the stage.

Parameters
stageLabelthe stage device label
dZ_umstep size between slices in microns
nSlicesnumber of slices in the sequence

◆ setState()

void CMMCore::setState ( const char * stateDeviceLabel,
long state )

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

Parameters
stateDeviceLabelthe device label
statethe new state

◆ setStateLabel()

void CMMCore::setStateLabel ( const char * stateDeviceLabel,
const char * stateLabel )

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

Parameters
stateDeviceLabelthe device label
stateLabelthe state label

References getStateFromLabel().

◆ setStderrLogLevel()

void CMMCore::setStderrLogLevel ( mmcore::LogLevel level)

Set the stderr log level.

Messages below this level will not be displayed on stderr.

It is not recommended to mix use of this function with enableDebugLog() and debugLogEnabled().

◆ 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().

◆ setTimeoutMs()

void CMMCore::setTimeoutMs ( long timeoutMs)

Sets the timeout for all wait commands.

Parameters
timeoutMsthe timeout in milliseconds; values of 0 or less are ignored

◆ setXYPosition() [1/2]

void CMMCore::setXYPosition ( const char * xyStageLabel,
double x,
double y )

Sets the position of the XY stage in microns.

Parameters
xyStageLabelthe 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 )

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 * xyStageLabel)

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

◆ snapImage()

void CMMCore::snapImage ( )

Acquires a single image with current settings.

Exceptions
CMMErrorif the camera is running a sequence acquisition

References getCoreErrorText(), and waitForDevice().

◆ startContinuousSequenceAcquisition()

void CMMCore::startContinuousSequenceAcquisition ( double unused)

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

Parameters
unusedHas no effect. Pass 0.0. See startSequenceAcquisition for the history of this parameter.

References getCoreErrorText(), and getDeviceName().

◆ startExposureSequence()

void CMMCore::startExposureSequence ( const char * cameraLabel)

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 )

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

◆ startSecondaryLogFile()

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

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 ( const char * cameraLabel,
long numImages,
double unused,
bool stopOnOverflow )

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.

Parameters
cameraLabelLabel of the camera device.
numImagesNumber of images requested from the camera.
unusedHas no effect. Pass 0.0. See the default-camera overload for details.
stopOnOverflowWhether the camera stops acquiring when the circular buffer is full. If false, frames may be skipped.

References getCoreErrorText(), and getDeviceName().

◆ startSequenceAcquisition() [2/2]

void CMMCore::startSequenceAcquisition ( long numImages,
double unused,
bool stopOnOverflow )

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.
unusedHas no effect. Pass 0.0. This parameter was previously named intervalMs but was never reliably implemented across camera adapters. Cameras that support a configurable frame rate typically expose it as a device property.
stopOnOverflowWhether the camera stops acquiring when the circular buffer is full. If false, frames may be skipped.

References getCoreErrorText(), and getDeviceName().

◆ startSLMSequence()

void CMMCore::startSLMSequence ( const char * slmLabel)

Starts the sequence previously uploaded to the SLM

Parameters
slmLabelname of the SLM

◆ startStageSequence()

void CMMCore::startStageSequence ( const char * stageLabel)

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

Parameters
stageLabelthe stage device label

◆ startXYStageSequence()

void CMMCore::startXYStageSequence ( const char * xyStageLabel)

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

Parameters
xyStageLabelthe XY stage device label

◆ stderrLogEnabled()

bool CMMCore::stderrLogEnabled ( )

Indicates whether logging output goes to stdErr

◆ stop()

void CMMCore::stop ( const char * xyOrZStageLabel)

Stop the XY or focus/Z stage motors

Not all stages support this operation; check before use.

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

◆ stopExposureSequence()

void CMMCore::stopExposureSequence ( const char * cameraLabel)

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 )

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)

Stop capturing logging output into an additional file.

Parameters
handleThe secondary log handle returned by startSecondaryLogFile().

◆ stopSequenceAcquisition() [1/2]

void CMMCore::stopSequenceAcquisition ( )

Stops streaming camera sequence acquisition.

References getCoreErrorText(), and getDeviceName().

◆ stopSequenceAcquisition() [2/2]

void CMMCore::stopSequenceAcquisition ( const char * cameraLabel)

Stops streaming camera sequence acquisition for a specified camera.

Parameters
cameraLabelThe camera name

◆ stopSLMSequence()

void CMMCore::stopSLMSequence ( const char * slmLabel)

Stops the SLM sequence if previously started

Parameters
slmLabelname of the SLM

◆ stopStageSequence()

void CMMCore::stopStageSequence ( const char * stageLabel)

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

Parameters
stageLabelthe stage device label

◆ stopXYStageSequence()

void CMMCore::stopXYStageSequence ( const char * xyStageLabel)

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

Parameters
xyStageLabelthe XY stage device label

◆ supportsDeviceDetection()

bool CMMCore::supportsDeviceDetection ( const char * deviceLabel)

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

For legacy reasons, an exception is not thrown if there is an error. Instead, false is returned if deviceLabel is not a valid device.

◆ systemBusy()

bool CMMCore::systemBusy ( )

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 ( )

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

This function is not thread safe.

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

Referenced by loadSystemConfiguration(), and reset().

◆ unloadDevice()

void CMMCore::unloadDevice ( const char * label)

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)

Unload a device adapter.

We do not currently have support for unloading regular device adapters that are loaded from libraries (DLLs).

Only mock device adapters can be unloaded.

Any devices from the adapter will be unloaded first. Do not call this function when devices from other adapters (e.g. Utilities) may be depending on them.

References unloadDevice().

◆ unsetDeviceTimeout()

void CMMCore::unsetDeviceTimeout ( const char * label)

Clears the per-device wait/busy timeout override, falling back to the global timeout. No-op if no override is set.

Parameters
labelthe device label (must name a loaded non-Core device)

◆ updateCoreProperties()

MMCORE_DEPRECATED void CMMCore::updateCoreProperties ( )

Update the allowed values for the Core device role properties.

Deprecated
This is now a no-op (role property allowed values are always up to date)

◆ updateSystemStateCache()

void CMMCore::updateSystemStateCache ( )

Updates the system state cache by reading all property values from all devices.

References getSystemState().

Referenced by setSystemState().

◆ usesDeviceDelay()

bool CMMCore::usesDeviceDelay ( const char * label)

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

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

◆ volumetricPumpHome()

void CMMCore::volumetricPumpHome ( const char * pumpLabel)

Homes the pump

Parameters
pumpLabelthe volumetric pump device label

◆ volumetricPumpRequiresHoming()

bool CMMCore::volumetricPumpRequiresHoming ( const char * pumpLabel)

Returns true if the pump must be homed (see volumetricPumpHome()) before use.

Parameters
pumpLabelthe volumetric pump device label

◆ volumetricPumpStop()

void CMMCore::volumetricPumpStop ( const char * pumpLabel)

Stops the volumetric pump

Parameters
pumpLabelthe volumetric pump device label

◆ waitForConfig()

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

Blocks until all devices included in the configuration become ready.

Parameters
groupthe configuration group
configNamethe configuration preset

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

◆ waitForDevice()

void CMMCore::waitForDevice ( const char * label)

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

Parameters
labelthe device label

References waitForDevice().

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

◆ waitForDeviceType()

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

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

Parameters
devTypea constant specifying the device type

References waitForDevice().

Referenced by waitForSystem().

◆ waitForSystem()

void CMMCore::waitForSystem ( )

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

References waitForDeviceType().

Referenced by reset().

◆ writeToSerialPort()

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

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

Parameters
portLabelthe serial port device label
datathe bytes to send

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