MMCore
10.1.1
|
The Micro-Manager Core. More...
#include <MMCore.h>
Public Member Functions | |
CMMCore () | |
~CMMCore () | |
Initialization and setup. | |
void | loadDevice (const char *label, const char *moduleName, const char *deviceName) throw (CMMError) |
void | unloadDevice (const char *label) throw (CMMError) |
void | unloadAllDevices () throw (CMMError) |
void | initializeAllDevices () throw (CMMError) |
void | initializeDevice (const char *label) throw (CMMError) |
DeviceInitializationState | getDeviceInitializationState (const char *label) const throw (CMMError) |
void | reset () throw (CMMError) |
void | unloadLibrary (const char *moduleName) throw (CMMError) |
void | updateCoreProperties () throw (CMMError) |
std::string | getCoreErrorText (int code) const |
std::string | getVersionInfo () const |
std::string | getAPIVersionInfo () const |
Configuration | getSystemState () |
void | setSystemState (const Configuration &conf) |
Configuration | getConfigState (const char *group, const char *config) throw (CMMError) |
Configuration | getConfigGroupState (const char *group) throw (CMMError) |
void | saveSystemState (const char *fileName) throw (CMMError) |
void | loadSystemState (const char *fileName) throw (CMMError) |
void | saveSystemConfiguration (const char *fileName) throw (CMMError) |
void | loadSystemConfiguration (const char *fileName) throw (CMMError) |
void | registerCallback (MMEventCallback *cb) |
Logging and log management. | |
void | setPrimaryLogFile (const char *filename, bool truncate=false) throw (CMMError) |
std::string | getPrimaryLogFile () const |
void | logMessage (const char *msg) |
void | logMessage (const char *msg, bool debugOnly) |
void | enableDebugLog (bool enable) |
bool | debugLogEnabled () |
void | enableStderrLog (bool enable) |
bool | stderrLogEnabled () |
int | startSecondaryLogFile (const char *filename, bool enableDebug, bool truncate=true, bool synchronous=false) throw (CMMError) |
void | stopSecondaryLogFile (int handle) throw (CMMError) |
Device listing. | |
std::vector< std::string > | getDeviceAdapterSearchPaths () |
void | setDeviceAdapterSearchPaths (const std::vector< std::string > &paths) |
std::vector< std::string > | getDeviceAdapterNames () throw (CMMError) |
std::vector< std::string > | getAvailableDevices (const char *library) throw (CMMError) |
std::vector< std::string > | getAvailableDeviceDescriptions (const char *library) throw (CMMError) |
std::vector< long > | getAvailableDeviceTypes (const char *library) throw (CMMError) |
Generic device control. | |
Functionality supported by all devices. | |
std::vector< std::string > | getLoadedDevices () const |
std::vector< std::string > | getLoadedDevicesOfType (MM::DeviceType devType) const |
MM::DeviceType | getDeviceType (const char *label) throw (CMMError) |
std::string | getDeviceLibrary (const char *label) throw (CMMError) |
std::string | getDeviceName (const char *label) throw (CMMError) |
std::string | getDeviceDescription (const char *label) throw (CMMError) |
std::vector< std::string > | getDevicePropertyNames (const char *label) throw (CMMError) |
bool | hasProperty (const char *label, const char *propName) throw (CMMError) |
std::string | getProperty (const char *label, const char *propName) throw (CMMError) |
void | setProperty (const char *label, const char *propName, const char *propValue) throw (CMMError) |
void | setProperty (const char *label, const char *propName, const bool propValue) throw (CMMError) |
void | setProperty (const char *label, const char *propName, const long propValue) throw (CMMError) |
void | setProperty (const char *label, const char *propName, const float propValue) throw (CMMError) |
void | setProperty (const char *label, const char *propName, const double propValue) throw (CMMError) |
std::vector< std::string > | getAllowedPropertyValues (const char *label, const char *propName) throw (CMMError) |
bool | isPropertyReadOnly (const char *label, const char *propName) throw (CMMError) |
bool | isPropertyPreInit (const char *label, const char *propName) throw (CMMError) |
bool | isPropertySequenceable (const char *label, const char *propName) throw (CMMError) |
bool | hasPropertyLimits (const char *label, const char *propName) throw (CMMError) |
double | getPropertyLowerLimit (const char *label, const char *propName) throw (CMMError) |
double | getPropertyUpperLimit (const char *label, const char *propName) throw (CMMError) |
MM::PropertyType | getPropertyType (const char *label, const char *propName) throw (CMMError) |
void | startPropertySequence (const char *label, const char *propName) throw (CMMError) |
void | stopPropertySequence (const char *label, const char *propName) throw (CMMError) |
long | getPropertySequenceMaxLength (const char *label, const char *propName) throw (CMMError) |
void | loadPropertySequence (const char *label, const char *propName, std::vector< std::string > eventSequence) throw (CMMError) |
bool | deviceBusy (const char *label) throw (CMMError) |
void | waitForDevice (const char *label) throw (CMMError) |
void | waitForConfig (const char *group, const char *configName) throw (CMMError) |
bool | systemBusy () throw (CMMError) |
void | waitForSystem () throw (CMMError) |
bool | deviceTypeBusy (MM::DeviceType devType) throw (CMMError) |
void | waitForDeviceType (MM::DeviceType devType) throw (CMMError) |
double | getDeviceDelayMs (const char *label) throw (CMMError) |
void | setDeviceDelayMs (const char *label, double delayMs) throw (CMMError) |
bool | usesDeviceDelay (const char *label) throw (CMMError) |
void | setTimeoutMs (long timeoutMs) |
long | getTimeoutMs () |
void | sleep (double intervalMs) const |
Management of 'current' device for specific roles. | |
std::string | getCameraDevice () |
std::string | getShutterDevice () |
std::string | getFocusDevice () |
std::string | getXYStageDevice () |
std::string | getAutoFocusDevice () |
std::string | getImageProcessorDevice () |
std::string | getSLMDevice () |
std::string | getGalvoDevice () |
std::string | getChannelGroup () |
void | setCameraDevice (const char *cameraLabel) throw (CMMError) |
void | setShutterDevice (const char *shutterLabel) throw (CMMError) |
void | setFocusDevice (const char *focusLabel) throw (CMMError) |
void | setXYStageDevice (const char *xyStageLabel) throw (CMMError) |
void | setAutoFocusDevice (const char *focusLabel) throw (CMMError) |
void | setImageProcessorDevice (const char *procLabel) throw (CMMError) |
void | setSLMDevice (const char *slmLabel) throw (CMMError) |
void | setGalvoDevice (const char *galvoLabel) throw (CMMError) |
void | setChannelGroup (const char *channelGroup) throw (CMMError) |
System state cache. | |
The system state cache retains the last-set or last-read value of each device property. | |
Configuration | getSystemStateCache () const |
void | updateSystemStateCache () |
std::string | getPropertyFromCache (const char *deviceLabel, const char *propName) const throw (CMMError) |
std::string | getCurrentConfigFromCache (const char *groupName) throw (CMMError) |
Configuration | getConfigGroupStateFromCache (const char *group) throw (CMMError) |
Configuration groups. | |
void | defineConfig (const char *groupName, const char *configName) throw (CMMError) |
void | defineConfig (const char *groupName, const char *configName, const char *deviceLabel, const char *propName, const char *value) throw (CMMError) |
void | defineConfigGroup (const char *groupName) throw (CMMError) |
void | deleteConfigGroup (const char *groupName) throw (CMMError) |
void | renameConfigGroup (const char *oldGroupName, const char *newGroupName) throw (CMMError) |
bool | isGroupDefined (const char *groupName) |
bool | isConfigDefined (const char *groupName, const char *configName) |
void | setConfig (const char *groupName, const char *configName) throw (CMMError) |
void | deleteConfig (const char *groupName, const char *configName) throw (CMMError) |
void | deleteConfig (const char *groupName, const char *configName, const char *deviceLabel, const char *propName) throw (CMMError) |
void | renameConfig (const char *groupName, const char *oldConfigName, const char *newConfigName) throw (CMMError) |
std::vector< std::string > | getAvailableConfigGroups () const |
std::vector< std::string > | getAvailableConfigs (const char *configGroup) const |
std::string | getCurrentConfig (const char *groupName) throw (CMMError) |
Configuration | getConfigData (const char *configGroup, const char *configName) throw (CMMError) |
The pixel size configuration group. | |
std::string | getCurrentPixelSizeConfig () throw (CMMError) |
std::string | getCurrentPixelSizeConfig (bool cached) throw (CMMError) |
double | getPixelSizeUm () |
double | getPixelSizeUm (bool cached) |
double | getPixelSizeUmByID (const char *resolutionID) throw (CMMError) |
std::vector< double > | getPixelSizeAffine () throw (CMMError) |
std::vector< double > | getPixelSizeAffine (bool cached) throw (CMMError) |
std::vector< double > | getPixelSizeAffineByID (const char *resolutionID) throw (CMMError) |
double | getMagnificationFactor () const |
void | setPixelSizeUm (const char *resolutionID, double pixSize) throw (CMMError) |
void | setPixelSizeAffine (const char *resolutionID, std::vector< double > affine) throw (CMMError) |
void | definePixelSizeConfig (const char *resolutionID, const char *deviceLabel, const char *propName, const char *value) throw (CMMError) |
void | definePixelSizeConfig (const char *resolutionID) throw (CMMError) |
std::vector< std::string > | getAvailablePixelSizeConfigs () const |
bool | isPixelSizeConfigDefined (const char *resolutionID) const throw (CMMError) |
void | setPixelSizeConfig (const char *resolutionID) throw (CMMError) |
void | renamePixelSizeConfig (const char *oldConfigName, const char *newConfigName) throw (CMMError) |
void | deletePixelSizeConfig (const char *configName) throw (CMMError) |
Configuration | getPixelSizeConfigData (const char *configName) throw (CMMError) |
Image acquisition. | |
void | setROI (int x, int y, int xSize, int ySize) throw (CMMError) |
void | setROI (const char *label, int x, int y, int xSize, int ySize) throw (CMMError) |
void | getROI (int &x, int &y, int &xSize, int &ySize) throw (CMMError) |
void | getROI (const char *label, int &x, int &y, int &xSize, int &ySize) throw (CMMError) |
void | clearROI () throw (CMMError) |
bool | isMultiROISupported () throw (CMMError) |
bool | isMultiROIEnabled () throw (CMMError) |
void | setMultiROI (std::vector< unsigned > xs, std::vector< unsigned > ys, std::vector< unsigned > widths, std::vector< unsigned > heights) throw (CMMError) |
void | getMultiROI (std::vector< unsigned > &xs, std::vector< unsigned > &ys, std::vector< unsigned > &widths, std::vector< unsigned > &heights) throw (CMMError) |
void | setExposure (double exp) throw (CMMError) |
void | setExposure (const char *cameraLabel, double dExp) throw (CMMError) |
double | getExposure () throw (CMMError) |
double | getExposure (const char *label) throw (CMMError) |
void | snapImage () throw (CMMError) |
void * | getImage () throw (CMMError) |
void * | getImage (unsigned numChannel) throw (CMMError) |
unsigned | getImageWidth () |
unsigned | getImageHeight () |
unsigned | getBytesPerPixel () |
unsigned | getImageBitDepth () |
unsigned | getNumberOfComponents () |
unsigned | getNumberOfCameraChannels () |
std::string | getCameraChannelName (unsigned int channelNr) |
long | getImageBufferSize () |
void | setAutoShutter (bool state) |
bool | getAutoShutter () |
void | setShutterOpen (bool state) throw (CMMError) |
bool | getShutterOpen () throw (CMMError) |
void | setShutterOpen (const char *shutterLabel, bool state) throw (CMMError) |
bool | getShutterOpen (const char *shutterLabel) throw (CMMError) |
void | startSequenceAcquisition (long numImages, double intervalMs, bool stopOnOverflow) throw (CMMError) |
void | startSequenceAcquisition (const char *cameraLabel, long numImages, double intervalMs, bool stopOnOverflow) throw (CMMError) |
void | prepareSequenceAcquisition (const char *cameraLabel) throw (CMMError) |
void | startContinuousSequenceAcquisition (double intervalMs) throw (CMMError) |
void | stopSequenceAcquisition () throw (CMMError) |
void | stopSequenceAcquisition (const char *cameraLabel) throw (CMMError) |
bool | isSequenceRunning () throw () |
bool | isSequenceRunning (const char *cameraLabel) throw (CMMError) |
void * | getLastImage () throw (CMMError) |
void * | popNextImage () throw (CMMError) |
void * | getLastImageMD (unsigned channel, unsigned slice, Metadata &md) const throw (CMMError) |
void * | popNextImageMD (unsigned channel, unsigned slice, Metadata &md) throw (CMMError) |
void * | getLastImageMD (Metadata &md) const throw (CMMError) |
void * | getNBeforeLastImageMD (unsigned long n, Metadata &md) const throw (CMMError) |
void * | popNextImageMD (Metadata &md) throw (CMMError) |
long | getRemainingImageCount () |
long | getBufferTotalCapacity () |
long | getBufferFreeCapacity () |
bool | isBufferOverflowed () const |
void | setCircularBufferMemoryFootprint (unsigned sizeMB) throw (CMMError) |
unsigned | getCircularBufferMemoryFootprint () |
void | initializeCircularBuffer () throw (CMMError) |
void | clearCircularBuffer () throw (CMMError) |
bool | isExposureSequenceable (const char *cameraLabel) throw (CMMError) |
void | startExposureSequence (const char *cameraLabel) throw (CMMError) |
void | stopExposureSequence (const char *cameraLabel) throw (CMMError) |
long | getExposureSequenceMaxLength (const char *cameraLabel) throw (CMMError) |
void | loadExposureSequence (const char *cameraLabel, std::vector< double > exposureSequence_ms) throw (CMMError) |
Autofocus control. | |
double | getLastFocusScore () |
double | getCurrentFocusScore () |
void | enableContinuousFocus (bool enable) throw (CMMError) |
bool | isContinuousFocusEnabled () throw (CMMError) |
bool | isContinuousFocusLocked () throw (CMMError) |
bool | isContinuousFocusDrive (const char *stageLabel) throw (CMMError) |
void | fullFocus () throw (CMMError) |
void | incrementalFocus () throw (CMMError) |
void | setAutoFocusOffset (double offset) throw (CMMError) |
double | getAutoFocusOffset () throw (CMMError) |
State device control. | |
void | setState (const char *stateDeviceLabel, long state) throw (CMMError) |
long | getState (const char *stateDeviceLabel) throw (CMMError) |
long | getNumberOfStates (const char *stateDeviceLabel) |
void | setStateLabel (const char *stateDeviceLabel, const char *stateLabel) throw (CMMError) |
std::string | getStateLabel (const char *stateDeviceLabel) throw (CMMError) |
void | defineStateLabel (const char *stateDeviceLabel, long state, const char *stateLabel) throw (CMMError) |
std::vector< std::string > | getStateLabels (const char *stateDeviceLabel) throw (CMMError) |
long | getStateFromLabel (const char *stateDeviceLabel, const char *stateLabel) throw (CMMError) |
Focus (Z) stage control. | |
void | setPosition (const char *stageLabel, double position) throw (CMMError) |
void | setPosition (double position) throw (CMMError) |
double | getPosition (const char *stageLabel) throw (CMMError) |
double | getPosition () throw (CMMError) |
void | setRelativePosition (const char *stageLabel, double d) throw (CMMError) |
void | setRelativePosition (double d) throw (CMMError) |
void | setOrigin (const char *stageLabel) throw (CMMError) |
void | setOrigin () throw (CMMError) |
void | setAdapterOrigin (const char *stageLabel, double newZUm) throw (CMMError) |
void | setAdapterOrigin (double newZUm) throw (CMMError) |
void | setFocusDirection (const char *stageLabel, int sign) |
Set the focus direction of a stage. More... | |
int | getFocusDirection (const char *stageLabel) throw (CMMError) |
Get the focus direction of a stage. More... | |
bool | isStageSequenceable (const char *stageLabel) throw (CMMError) |
bool | isStageLinearSequenceable (const char *stageLabel) throw (CMMError) |
void | startStageSequence (const char *stageLabel) throw (CMMError) |
void | stopStageSequence (const char *stageLabel) throw (CMMError) |
long | getStageSequenceMaxLength (const char *stageLabel) throw (CMMError) |
void | loadStageSequence (const char *stageLabel, std::vector< double > positionSequence) throw (CMMError) |
void | setStageLinearSequence (const char *stageLabel, double dZ_um, int nSlices) throw (CMMError) |
XY stage control. | |
void | setXYPosition (const char *xyStageLabel, double x, double y) throw (CMMError) |
void | setXYPosition (double x, double y) throw (CMMError) |
void | setRelativeXYPosition (const char *xyStageLabel, double dx, double dy) throw (CMMError) |
void | setRelativeXYPosition (double dx, double dy) throw (CMMError) |
void | getXYPosition (const char *xyStageLabel, double &x_stage, double &y_stage) throw (CMMError) |
void | getXYPosition (double &x_stage, double &y_stage) throw (CMMError) |
double | getXPosition (const char *xyStageLabel) throw (CMMError) |
double | getYPosition (const char *xyStageLabel) throw (CMMError) |
double | getXPosition () throw (CMMError) |
double | getYPosition () throw (CMMError) |
void | stop (const char *xyOrZStageLabel) throw (CMMError) |
void | home (const char *xyOrZStageLabel) throw (CMMError) |
void | setOriginXY (const char *xyStageLabel) throw (CMMError) |
void | setOriginXY () throw (CMMError) |
void | setOriginX (const char *xyStageLabel) throw (CMMError) |
void | setOriginX () throw (CMMError) |
void | setOriginY (const char *xyStageLabel) throw (CMMError) |
void | setOriginY () throw (CMMError) |
void | setAdapterOriginXY (const char *xyStageLabel, double newXUm, double newYUm) throw (CMMError) |
void | setAdapterOriginXY (double newXUm, double newYUm) throw (CMMError) |
bool | isXYStageSequenceable (const char *xyStageLabel) throw (CMMError) |
void | startXYStageSequence (const char *xyStageLabel) throw (CMMError) |
void | stopXYStageSequence (const char *xyStageLabel) throw (CMMError) |
long | getXYStageSequenceMaxLength (const char *xyStageLabel) throw (CMMError) |
void | loadXYStageSequence (const char *xyStageLabel, std::vector< double > xSequence, std::vector< double > ySequence) throw (CMMError) |
Serial port control. | |
void | setSerialProperties (const char *portName, const char *answerTimeout, const char *baudRate, const char *delayBetweenCharsMs, const char *handshaking, const char *parity, const char *stopBits) throw (CMMError) |
void | setSerialPortCommand (const char *portLabel, const char *command, const char *term) throw (CMMError) |
std::string | getSerialPortAnswer (const char *portLabel, const char *term) throw (CMMError) |
void | writeToSerialPort (const char *portLabel, const std::vector< char > &data) throw (CMMError) |
std::vector< char > | readFromSerialPort (const char *portLabel) throw (CMMError) |
SLM control. | |
Control of spatial light modulators such as liquid crystal on silicon (LCoS), digital micromirror devices (DMD), or multimedia projectors. | |
void | setSLMImage (const char *slmLabel, unsigned char *pixels) throw (CMMError) |
void | setSLMImage (const char *slmLabel, imgRGB32 pixels) throw (CMMError) |
void | setSLMPixelsTo (const char *slmLabel, unsigned char intensity) throw (CMMError) |
void | setSLMPixelsTo (const char *slmLabel, unsigned char red, unsigned char green, unsigned char blue) throw (CMMError) |
void | displaySLMImage (const char *slmLabel) throw (CMMError) |
void | setSLMExposure (const char *slmLabel, double exposure_ms) throw (CMMError) |
double | getSLMExposure (const char *slmLabel) throw (CMMError) |
unsigned | getSLMWidth (const char *slmLabel) throw (CMMError) |
unsigned | getSLMHeight (const char *slmLabel) throw (CMMError) |
unsigned | getSLMNumberOfComponents (const char *slmLabel) throw (CMMError) |
unsigned | getSLMBytesPerPixel (const char *slmLabel) throw (CMMError) |
long | getSLMSequenceMaxLength (const char *slmLabel) throw (CMMError) |
void | startSLMSequence (const char *slmLabel) throw (CMMError) |
void | stopSLMSequence (const char *slmLabel) throw (CMMError) |
void | loadSLMSequence (const char *slmLabel, std::vector< unsigned char * > imageSequence) throw (CMMError) |
Galvo control. | |
Control of beam-steering devices. | |
void | pointGalvoAndFire (const char *galvoLabel, double x, double y, double pulseTime_us) throw (CMMError) |
void | setGalvoSpotInterval (const char *galvoLabel, double pulseTime_us) throw (CMMError) |
void | setGalvoPosition (const char *galvoLabel, double x, double y) throw (CMMError) |
void | getGalvoPosition (const char *galvoLabel, double &x_stage, double &y_stage) throw (CMMError) |
void | setGalvoIlluminationState (const char *galvoLabel, bool on) throw (CMMError) |
double | getGalvoXRange (const char *galvoLabel) throw (CMMError) |
double | getGalvoXMinimum (const char *galvoLabel) throw (CMMError) |
double | getGalvoYRange (const char *galvoLabel) throw (CMMError) |
double | getGalvoYMinimum (const char *galvoLabel) throw (CMMError) |
void | addGalvoPolygonVertex (const char *galvoLabel, int polygonIndex, double x, double y) throw (CMMError) |
void | deleteGalvoPolygons (const char *galvoLabel) throw (CMMError) |
void | loadGalvoPolygons (const char *galvoLabel) throw (CMMError) |
void | setGalvoPolygonRepetitions (const char *galvoLabel, int repetitions) throw (CMMError) |
void | runGalvoPolygons (const char *galvoLabel) throw (CMMError) |
void | runGalvoSequence (const char *galvoLabel) throw (CMMError) |
std::string | getGalvoChannel (const char *galvoLabel) throw (CMMError) |
Device discovery. | |
bool | supportsDeviceDetection (const char *deviceLabel) |
MM::DeviceDetectionStatus | detectDevice (const char *deviceLabel) |
Hub and peripheral devices. | |
std::string | getParentLabel (const char *peripheralLabel) throw (CMMError) |
void | setParentLabel (const char *deviceLabel, const char *parentHubLabel) throw (CMMError) |
std::vector< std::string > | getInstalledDevices (const char *hubLabel) throw (CMMError) |
std::string | getInstalledDeviceDescription (const char *hubLabel, const char *peripheralLabel) throw (CMMError) |
std::vector< std::string > | getLoadedPeripheralDevices (const char *hubLabel) throw (CMMError) |
Static Public Member Functions | |
static void | noop () |
A static method that does nothing. More... | |
Core feature control. | |
static void | enableFeature (const char *name, bool enable) throw (CMMError) |
static bool | isFeatureEnabled (const char *name) throw (CMMError) |
Friends | |
class | CoreCallback |
class | CorePropertyCollection |
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.
CMMCore::CMMCore | ( | ) |
Constructor. Initializes buffers and error message text. It does not load any hardware devices at this point.
CMMCore::~CMMCore | ( | ) |
Destructor. Cleans-up and unloads all devices.
References reset().
void CMMCore::addGalvoPolygonVertex | ( | const char * | deviceLabel, |
int | polygonIndex, | ||
double | x, | ||
double | y | ||
) | |||
throw | ( | CMMError | |
) |
Add a vertex to a galvo polygon.
void CMMCore::clearCircularBuffer | ( | ) | ||
throw | ( | CMMError | ||
) |
Removes all images from the circular buffer.
It is rarely necessary to call this directly since starting a sequence acquisition or changing the ROI will always clear the buffer.
void CMMCore::clearROI | ( | ) | ||
throw | ( | CMMError | ||
) |
Set the region of interest of the current camera to the full frame.
A successful call to this method will clear any images in the sequence buffer, even if the ROI does not change.
bool CMMCore::debugLogEnabled | ( | ) |
Indicates if logging of debug messages is enabled
void CMMCore::defineConfig | ( | const char * | groupName, |
const char * | configName | ||
) | |||
throw | ( | CMMError | |
) |
Defines a configuration. If the configuration group/name was not previously defined a new configuration will be automatically created; otherwise nothing happens.
groupName | the configuration group name |
configName | the configuration preset name |
void CMMCore::defineConfig | ( | const char * | groupName, |
const char * | configName, | ||
const char * | deviceLabel, | ||
const char * | propName, | ||
const char * | value | ||
) | |||
throw | ( | CMMError | |
) |
Defines a single configuration entry (setting). If the configuration group/name was not previously defined a new configuration will be automatically created. If the name was previously defined the new setting will be added to its list of property settings. The new setting will override previously defined ones if it refers to the same property name.
groupName | the group name |
configName | the configuration name |
deviceLabel | the device label |
propName | the property name |
value | the property value |
void CMMCore::defineConfigGroup | ( | const char * | groupName | ) | |
throw | ( | CMMError | |||
) |
Creates an empty configuration group.
void CMMCore::definePixelSizeConfig | ( | const char * | resolutionID | ) | |
throw | ( | CMMError | |||
) |
Defines an empty pixel size entry.
void CMMCore::definePixelSizeConfig | ( | const char * | resolutionID, |
const char * | deviceLabel, | ||
const char * | propName, | ||
const char * | value | ||
) | |||
throw | ( | CMMError | |
) |
Defines a single pixel size entry (setting). The system will treat pixel size configurations very similar to configuration presets, i.e. it will try to detect if any of the pixel size presets matches the current state of the system. If the pixel size was previously defined the new setting will be added to its list of property settings. The new setting will override previously defined ones if it refers to the same property name.
resolutionID | identifier for one unique property setting |
deviceLabel | device label |
propName | property name |
value | property value |
void CMMCore::defineStateLabel | ( | const char * | deviceLabel, |
long | state, | ||
const char * | label | ||
) | |||
throw | ( | CMMError | |
) |
Defines a label for the specific state/
deviceLabel | the device label |
state | the state to be labeled |
label | the label for the specified state |
References Configuration::isPropertyIncluded(), and Configuration::isSettingIncluded().
void CMMCore::deleteConfig | ( | const char * | groupName, |
const char * | configName | ||
) | |||
throw | ( | CMMError | |
) |
Deletes a configuration from a group. The command will fail if the configuration was not previously defined.
void CMMCore::deleteConfig | ( | const char * | groupName, |
const char * | configName, | ||
const char * | deviceLabel, | ||
const char * | propName | ||
) | |||
throw | ( | CMMError | |
) |
Deletes a property from a configuration in the specified group. The command will fail if the configuration was not previously defined.
void CMMCore::deleteConfigGroup | ( | const char * | groupName | ) | |
throw | ( | CMMError | |||
) |
Deletes an entire configuration group.
void CMMCore::deleteGalvoPolygons | ( | const char * | deviceLabel | ) | |
throw | ( | CMMError | |||
) |
Remove all added polygons
void CMMCore::deletePixelSizeConfig | ( | const char * | configName | ) | |
throw | ( | CMMError | |||
) |
Deletes a pixel size configuration. The command will fail if the configuration was not previously defined.
MM::DeviceDetectionStatus CMMCore::detectDevice | ( | const char * | label | ) |
Tries to communicate to a device through a given serial port Used to automate discovery of correct serial port Also configures the serial port correctly
For legacy reasons, an exception is not thrown if there is an error. Instead, MM::Unimplemented is returned if label is not a valid device.
label | the label of the device for which the serial port should be found |
References getProperty(), and setProperty().
bool CMMCore::deviceBusy | ( | const char * | label | ) | |
throw | ( | CMMError | |||
) |
Checks the busy status of the specific device.
label | the device label |
bool CMMCore::deviceTypeBusy | ( | MM::DeviceType | devType | ) | |
throw | ( | CMMError | |||
) |
Checks the busy status for all devices of the specific type. The system will report busy if any of the devices of the specified type are busy.
devType | a constant specifying the device type |
Referenced by systemBusy().
void CMMCore::displaySLMImage | ( | const char * | deviceLabel | ) | |
throw | ( | CMMError | |||
) |
Display the waiting image on the SLM.
void CMMCore::enableContinuousFocus | ( | bool | enable | ) | |
throw | ( | CMMError | |||
) |
Enables or disables the operation of the continuous focusing hardware device.
void CMMCore::enableDebugLog | ( | bool | enable | ) |
Enable or disable logging of debug messages.
enable | if set to true, debug messages will be recorded in the log file |
|
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:
Permanently enabled features:
Permanently disabled features:
name | the feature name. |
enable | whether to enable or disable the feature. |
CMMError | if the feature name is null or unknown, or attempting to disable a permanently enabled feature, or attempting to enable a permanently disabled feature. |
void CMMCore::enableStderrLog | ( | bool | enable | ) |
Enables or disables log message display on the standard console.
enable | if set to true, log file messages will be echoed on the stderr. |
void CMMCore::fullFocus | ( | ) | ||
throw | ( | CMMError | ||
) |
Performs focus acquisition and lock for the one-shot focusing device.
References getCoreErrorText(), and getDeviceName().
std::vector< std::string > CMMCore::getAllowedPropertyValues | ( | const char * | label, |
const char * | propName | ||
) | |||
throw | ( | CMMError | |
) |
Returns all valid values for the specified property. If the array is empty it means that there are no restrictions for values. However, even if all values are allowed it is not guaranteed that all of them will be actually accepted by the device at run time.
label | the device label |
propName | the property name |
std::string CMMCore::getAPIVersionInfo | ( | ) | const |
Returns the module and device interface versions.
std::string CMMCore::getAutoFocusDevice | ( | ) |
Returns the label of the currently selected auto-focus device.
double CMMCore::getAutoFocusOffset | ( | ) | ||
throw | ( | CMMError | ||
) |
Measures offset for the one-shot focusing device.
References getCoreErrorText(), and getDeviceName().
bool CMMCore::getAutoShutter | ( | ) |
Returns the current setting of the auto-shutter option.
std::vector< std::string > CMMCore::getAvailableConfigGroups | ( | ) | const |
Returns the names of all defined configuration groups
References ConfigGroupCollection::GetAvailableGroups().
Referenced by CoreCallback::OnPropertyChanged().
std::vector< std::string > CMMCore::getAvailableConfigs | ( | const char * | group | ) | 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 group is not a valid config group.
References ConfigGroupCollection::GetAvailableConfigs().
Referenced by CoreCallback::OnPropertyChanged().
std::vector< std::string > CMMCore::getAvailableDeviceDescriptions | ( | const char * | moduleName | ) | |
throw | ( | CMMError | |||
) |
Get descriptions for available devices from the specified library.
std::vector< std::string > CMMCore::getAvailableDevices | ( | const char * | moduleName | ) | |
throw | ( | CMMError | |||
) |
Get available devices from the specified device library.
std::vector< long > CMMCore::getAvailableDeviceTypes | ( | const char * | moduleName | ) | |
throw | ( | CMMError | |||
) |
Get type information for available devices from the specified library.
std::vector< std::string > CMMCore::getAvailablePixelSizeConfigs | ( | ) | const |
Returns all defined resolution preset names
References ConfigGroupBase< T >::GetAvailable().
Referenced by CoreCallback::OnPropertyChanged().
long CMMCore::getBufferFreeCapacity | ( | ) |
Returns the number of images that can be added to the buffer without overflowing
long CMMCore::getBufferTotalCapacity | ( | ) |
Returns the total number of images that can be stored in the buffer
unsigned CMMCore::getBytesPerPixel | ( | ) |
How many bytes for each pixel. This value does not necessarily reflect the capabilities of the particular camera A/D converter.
std::string CMMCore::getCameraChannelName | ( | unsigned int | channelNr | ) |
Returns the name of the requested channel as known by the default camera
std::string CMMCore::getCameraDevice | ( | ) |
Returns the label of the currently selected camera device.
std::string CMMCore::getChannelGroup | ( | ) |
Returns the group determining the channel selection.
unsigned CMMCore::getCircularBufferMemoryFootprint | ( | ) |
Returns the size of the Circular Buffer in MB
Configuration CMMCore::getConfigData | ( | const char * | groupName, |
const char * | configName | ||
) | |||
throw | ( | CMMError | |
) |
Returns the configuration object for a given group and name.
Referenced by CoreCallback::OnPropertyChanged().
Configuration CMMCore::getConfigGroupState | ( | const char * | group | ) | |
throw | ( | CMMError | |||
) |
Returns the partial state of the system, only for the devices included in the specified group. It will create a union of all devices referenced in a group.
Configuration CMMCore::getConfigGroupStateFromCache | ( | const char * | group | ) | |
throw | ( | CMMError | |||
) |
Returns the partial state of the system cache, only for the devices included in the specified group. It will create a union of all devices referenced in a group.
Configuration CMMCore::getConfigState | ( | const char * | group, |
const char * | config | ||
) | |||
throw | ( | CMMError | |
) |
Returns a partial state of the system, only for devices included in the specified configuration.
References Configuration::addSetting(), PropertySetting::getDeviceLabel(), PropertySetting::getPropertyName(), Configuration::getSetting(), and Configuration::size().
std::string CMMCore::getCoreErrorText | ( | int | code | ) | const |
Returns a pre-defined error test with the given error code
Referenced by fullFocus(), getAutoFocusOffset(), getImage(), getLastImage(), incrementalFocus(), initializeCircularBuffer(), isMultiROIEnabled(), isMultiROISupported(), popNextImage(), snapImage(), and stopSequenceAcquisition().
std::string CMMCore::getCurrentConfig | ( | const char * | groupName | ) | |
throw | ( | CMMError | |||
) |
Returns the current configuration for a given group. An empty string is a valid return value, since the system state will not always correspond to any of the defined configurations. Also, in general it is possible that the system state fits multiple configurations. This method will return only the first matching configuration, if any.
References Configuration::isConfigurationIncluded().
std::string CMMCore::getCurrentConfigFromCache | ( | const char * | groupName | ) | |
throw | ( | CMMError | |||
) |
Returns the configuration for a given group based on the data in the cache. An empty string is a valid return value, since the system state will not always correspond to any of the defined configurations. Also, in general it is possible that the system state fits multiple configurations. This method will return only the first matching configuration, if any.
References Configuration::isConfigurationIncluded().
Referenced by CoreCallback::OnPropertyChanged().
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.
std::string CMMCore::getCurrentPixelSizeConfig | ( | ) | ||
throw | ( | CMMError | ||
) |
Get the current pixel configuration name
Referenced by getPixelSizeUm().
std::string CMMCore::getCurrentPixelSizeConfig | ( | bool | cached | ) | |
throw | ( | CMMError | |||
) |
Get the current pixel configuration name
References Configuration::addSetting(), PropertySetting::getDeviceLabel(), CMMError::getMsg(), PropertySetting::getPropertyName(), Configuration::getSetting(), Configuration::isConfigurationIncluded(), Configuration::isPropertyIncluded(), and Configuration::size().
std::vector< std::string > CMMCore::getDeviceAdapterNames | ( | ) | ||
throw | ( | CMMError | ||
) |
Return the names of discoverable device adapters.
Note that this list is constructed based on filename matching in the current search paths. This method does not check whether the files are valid and compatible device adapters.
std::vector< std::string > CMMCore::getDeviceAdapterSearchPaths | ( | ) |
Return the current device adapter search paths.
double CMMCore::getDeviceDelayMs | ( | const char * | label | ) | |
throw | ( | CMMError | |||
) |
Reports action delay in milliseconds for the specific device. The delay is used in the synchronization process to ensure that the action is performed, without polling. Value of "0" means that action is either blocking or that polling of device status is required. Some devices ignore this setting.
label | the device label |
std::string CMMCore::getDeviceDescription | ( | const char * | label | ) | |
throw | ( | CMMError | |||
) |
Returns description text for a given device label. "Description" is determined by the library and is immutable.
DeviceInitializationState CMMCore::getDeviceInitializationState | ( | const char * | label | ) | const |
throw | ( | CMMError | |||
) |
Queries the initialization state of the given device.
label | the device label |
std::string CMMCore::getDeviceLibrary | ( | const char * | label | ) | |
throw | ( | CMMError | |||
) |
Returns device library (aka module, device adapter) name.
std::string CMMCore::getDeviceName | ( | const char * | label | ) | |
throw | ( | CMMError | |||
) |
Returns device name for a given device label. "Name" is determined by the library and is immutable, while "label" is user assigned and represents a high-level handle to a device.
Referenced by fullFocus(), getAutoFocusOffset(), incrementalFocus(), initializeCircularBuffer(), isContinuousFocusEnabled(), and stopSequenceAcquisition().
std::vector< std::string > CMMCore::getDevicePropertyNames | ( | const char * | label | ) | |
throw | ( | CMMError | |||
) |
Returns all property names supported by the device.
label | the device label |
MM::DeviceType CMMCore::getDeviceType | ( | const char * | label | ) | |
throw | ( | CMMError | |||
) |
Returns device type.
double CMMCore::getExposure | ( | ) | ||
throw | ( | CMMError | ||
) |
Returns the current exposure setting of the camera in milliseconds.
double CMMCore::getExposure | ( | const char * | label | ) | |
throw | ( | CMMError | |||
) |
Returns the current exposure setting of the specified camera in milliseconds.
label | the camera device label |
long CMMCore::getExposureSequenceMaxLength | ( | const char * | cameraLabel | ) | |
throw | ( | CMMError | |||
) |
Gets the maximum length of a camera's exposure sequence. This should only be called for cameras where exposure time is sequenceable
cameraLabel | the camera device label |
std::string CMMCore::getFocusDevice | ( | ) |
Returns the label of the currently selected focus device.
Referenced by getPosition(), and setOrigin().
int CMMCore::getFocusDirection | ( | const char * | stageLabel | ) | |
throw | ( | CMMError | |||
) |
Get the focus direction of a stage.
Returns +1 if increasing position brings objective closer to sample, -1 if increasing position moves objective away from sample, or 0 if unknown. (Make sure to check for zero!)
The returned value is determined by the most recent call to setFocusDirection() for the stage, or defaults to what the stage device adapter declares (often 0, for unknown).
An exception is thrown if the direction has not been set and the device encounters an error when determining the default direction.
std::string CMMCore::getGalvoChannel | ( | const char * | deviceLabel | ) | |
throw | ( | CMMError | |||
) |
Get the name of the active galvo channel (for a multi-laser galvo device).
std::string CMMCore::getGalvoDevice | ( | ) |
Returns the label of the currently selected Galvo device.
void CMMCore::getGalvoPosition | ( | const char * | deviceLabel, |
double & | x, | ||
double & | y | ||
) | |||
throw | ( | CMMError | |
) |
Get the Galvo x,y position
double CMMCore::getGalvoXMinimum | ( | const char * | deviceLabel | ) | |
throw | ( | CMMError | |||
) |
Get the Galvo x minimum
double CMMCore::getGalvoXRange | ( | const char * | deviceLabel | ) | |
throw | ( | CMMError | |||
) |
Get the Galvo x range
double CMMCore::getGalvoYMinimum | ( | const char * | deviceLabel | ) | |
throw | ( | CMMError | |||
) |
Get the Galvo y minimum
double CMMCore::getGalvoYRange | ( | const char * | deviceLabel | ) | |
throw | ( | CMMError | |||
) |
Get the Galvo y range
void * CMMCore::getImage | ( | ) | ||
throw | ( | CMMError | ||
) |
Exposes the internal image buffer.
Use to get the image acquired by snapImage
Multi-Channel cameras will return the content of the first channel in this function
Designed specifically for the SWIG wrapping for Java and scripting languages.
Supported data types are byte (8 bits per pixel, 1 component), short (16 bits per pixel, 1 component), float (32 bits per pixel, 1 component, not supported by the UI yet), RGB_32 (8 bits per component, 4 components), RGB_64 (16 bits per component, 4 components, not supported by UI yet).
RGB buffers are expected to be in big endian ARGB format (ARGB8888), which means that on little endian the format is BGRA888 (see: https://en.wikipedia.org/wiki/RGBA_color_model).
CMMError | when the camera returns no data |
References getCoreErrorText().
void * CMMCore::getImage | ( | unsigned | channelNr | ) | |
throw | ( | CMMError | |||
) |
Returns the internal image buffer for a given Camera Channel
Use to get the image acquired by snapImage
Single channel cameras will return the content of their image buffer irrespective of the channelNr argument Designed specifically for the SWIG wrapping for Java and scripting languages.
channelNr | Channel number for which the image buffer is requested |
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.
long CMMCore::getImageBufferSize | ( | ) |
Returns the size of the internal image buffer.
unsigned CMMCore::getImageHeight | ( | ) |
Vertical dimension of the image buffer in pixels.
std::string CMMCore::getImageProcessorDevice | ( | ) |
Returns the label of the currently selected image processor device.
unsigned CMMCore::getImageWidth | ( | ) |
Horizontal dimension of the image buffer in pixels.
std::vector< std::string > CMMCore::getInstalledDevices | ( | const char * | hubDeviceLabel | ) | |
throw | ( | CMMError | |||
) |
Performs auto-detection and loading of child devices that are attached to a Hub device. For example, if a motorized microscope is represented by a Hub device, it is capable of discovering what specific child devices are currently attached. In that case this call might report that Z-stage, filter changer and objective turret are currently installed and return three device names in the string list.
Currently, this method can only be called once, right after loading the hub device. Doing otherwise results in undefined behavior. This function was intended for use during initial configuration, not routine loading of devices. These restrictions may be relaxed in the future if possible.
hubDeviceLabel | the label for the device of type Hub |
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.
void * CMMCore::getLastImage | ( | ) | ||
throw | ( | CMMError | ||
) |
Gets the last image from the circular buffer. Returns 0 if the buffer is empty.
References getCoreErrorText().
void * CMMCore::getLastImageMD | ( | Metadata & | md | ) | const |
throw | ( | CMMError | |||
) |
Returns a pointer to the pixels of the image that was last inserted into the circular buffer Also provides all metadata associated with that image
Supported data types are byte (8 bits per pixel, 1 component), short (16 bits per pixel, 1 component), float (32 bits per pixel, 1 component, not supported by the UI yet), RGB_32 (8 bits per component, 4 components), RGB_64 (16 bits per component, 4 components, not supported by UI yet).
RGB buffers are expected to be in big endian ARGB format (ARGB8888), which means that on little endian the format is BGRA888 (see: https://en.wikipedia.org/wiki/RGBA_color_model).
std::vector< std::string > CMMCore::getLoadedDevices | ( | ) | const |
Returns an array of labels for currently loaded devices.
std::vector< std::string > CMMCore::getLoadedDevicesOfType | ( | MM::DeviceType | devType | ) | const |
Returns an array of labels for currently loaded devices of specific type.
devType | the device type identifier |
Referenced by 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
References getLoadedDevicesOfType().
Referenced by getPixelSizeUm().
void CMMCore::getMultiROI | ( | std::vector< unsigned > & | xs, |
std::vector< unsigned > & | ys, | ||
std::vector< unsigned > & | widths, | ||
std::vector< unsigned > & | heights | ||
) | |||
throw | ( | CMMError | |
) |
Get multiple ROIs from the current camera device. Will fail if the camera does not support multiple ROIs. Will return empty vectors if multiple ROIs are not currently being used.
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. |
void * CMMCore::getNBeforeLastImageMD | ( | unsigned long | n, |
Metadata & | md | ||
) | const | ||
throw | ( | CMMError | |
) |
Returns a pointer to the pixels of the image that was inserted n images ago Also provides all metadata associated with that image
Supported data types are byte (8 bits per pixel, 1 component), short (16 bits per pixel, 1 component), float (32 bits per pixel, 1 component, not supported by the UI yet), RGB_32 (8 bits per component, 4 components), RGB_64 (16 bits per component, 4 components, not supported by UI yet).
RGB buffers are expected to be in big endian ARGB format (ARGB8888), which means that on little endian the format is BGRA888 (see: https://en.wikipedia.org/wiki/RGBA_color_model).
unsigned CMMCore::getNumberOfCameraChannels | ( | ) |
Returns the number of simultaneous channels the default camera is returning.
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.
long CMMCore::getNumberOfStates | ( | const char * | deviceLabel | ) |
Returns the total number of available positions (states).
For legacy reasons, an exception is not thrown on error. Instead, -1 is returned if deviceLabel is not a valid state device.
std::string CMMCore::getParentLabel | ( | const char * | label | ) | |
throw | ( | CMMError | |||
) |
Returns parent device.
std::vector< double > CMMCore::getPixelSizeAffine | ( | ) | ||
throw | ( | CMMError | ||
) |
Returns the current Affine Transform to related camera pixels with stage movement.. This function returns the stored affine transform corrected for binning
Referenced by CoreCallback::OnMagnifierChanged(), and CoreCallback::OnPropertyChanged().
std::vector< double > CMMCore::getPixelSizeAffine | ( | bool | cached | ) | |
throw | ( | CMMError | |||
) |
Returns the current Affine Transform to related camera pixels with stage movement.. This function returns the stored affine transform corrected for binning and known magnification devices
std::vector< double > CMMCore::getPixelSizeAffineByID | ( | const char * | resolutionID | ) | |
throw | ( | CMMError | |||
) |
Returns the Affine Transform to related camera pixels with stage movement for the requested pixel size group The raw affine transform without correction for binning and magnification will be returned.
Configuration CMMCore::getPixelSizeConfigData | ( | const char * | configName | ) | |
throw | ( | CMMError | |||
) |
Returns the configuration object for a give pixel size preset.
Referenced by CoreCallback::OnPropertyChanged().
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.
Referenced by CoreCallback::OnMagnifierChanged(), and CoreCallback::OnPropertyChanged().
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.
References ConfigGroupBase< T >::Find(), getCurrentPixelSizeConfig(), and getMagnificationFactor().
double CMMCore::getPixelSizeUmByID | ( | const char * | resolutionID | ) | |
throw | ( | CMMError | |||
) |
Returns the pixel size in um for the requested pixel size group
double CMMCore::getPosition | ( | ) | ||
throw | ( | CMMError | ||
) |
Returns the current position of the stage in microns. Uses the current Z positioner (focus) device.
References getFocusDevice().
double CMMCore::getPosition | ( | const char * | label | ) | |
throw | ( | CMMError | |||
) |
Returns the current position of the stage in microns.
label | the single-axis drive device label |
std::string CMMCore::getPrimaryLogFile | ( | ) | const |
Return the name of the primary Core log file.
std::string CMMCore::getProperty | ( | const char * | label, |
const char * | propName | ||
) | |||
throw | ( | CMMError | |
) |
Returns the property value for the specified device.
label | the device label |
propName | the property name |
Referenced by detectDevice().
std::string CMMCore::getPropertyFromCache | ( | const char * | label, |
const char * | propName | ||
) | const | ||
throw | ( | CMMError | |
) |
Returns the cached property value for the specified device.
label | the device label |
propName | the property name |
References PropertySetting::getPropertyValue().
double CMMCore::getPropertyLowerLimit | ( | const char * | label, |
const char * | propName | ||
) | |||
throw | ( | CMMError | |
) |
Returns the property lower limit value, if the property has limits - 0 otherwise.
long CMMCore::getPropertySequenceMaxLength | ( | const char * | label, |
const char * | propName | ||
) | |||
throw | ( | CMMError | |
) |
Queries device property for the maximum number of events that can be put in a sequence
label | the device name |
propName | the property label |
MM::PropertyType CMMCore::getPropertyType | ( | const char * | label, |
const char * | propName | ||
) | |||
throw | ( | CMMError | |
) |
Returns the intrinsic property type.
double CMMCore::getPropertyUpperLimit | ( | const char * | label, |
const char * | propName | ||
) | |||
throw | ( | CMMError | |
) |
Returns the property upper limit value, if the property has limits - 0 otherwise.
long CMMCore::getRemainingImageCount | ( | ) |
Returns number ofimages available in the Circular Buffer
void CMMCore::getROI | ( | const char * | label, |
int & | x, | ||
int & | y, | ||
int & | xSize, | ||
int & | ySize | ||
) | |||
throw | ( | CMMError | |
) |
Return the current hardware region of interest for a camera. If multiple ROIs are set, this method instead returns a rectangle that describes the image that the camera will generate.
label | camera label |
x | coordinate of the top left corner |
y | coordinate of the top left corner |
xSize | number of horizontal pixels |
ySize | number of vertical pixels |
void CMMCore::getROI | ( | int & | x, |
int & | y, | ||
int & | xSize, | ||
int & | ySize | ||
) | |||
throw | ( | CMMError | |
) |
Return the current hardware region of interest for a camera. If multiple ROIs are set, this method instead returns a rectangle that describes the image that the camera will generate.
The coordinates are in units of binned pixels. That is, conceptually, binning is applied before the ROI.
x | coordinate of the top left corner |
y | coordinate of the top left corner |
xSize | number of horizontal pixels |
ySize | number of horizontal pixels |
std::string CMMCore::getSerialPortAnswer | ( | const char * | portLabel, |
const char * | term | ||
) | |||
throw | ( | CMMError | |
) |
Continuously read from the serial port until the terminating sequence is encountered.
Referenced by CoreCallback::GetSerialAnswer().
std::string CMMCore::getShutterDevice | ( | ) |
Returns the label of the currently selected shutter device.
Referenced by getShutterOpen().
bool CMMCore::getShutterOpen | ( | ) | ||
throw | ( | CMMError | ||
) |
Returns the state of the currently selected (default) shutter.
References getShutterDevice().
bool CMMCore::getShutterOpen | ( | const char * | shutterLabel | ) | |
throw | ( | CMMError | |||
) |
Returns the state of the specified shutter.
shutterLabel | the name of the shutter |
unsigned CMMCore::getSLMBytesPerPixel | ( | const char * | deviceLabel | ) | |
throw | ( | CMMError | |||
) |
Returns the number of bytes per SLM pixel
deviceLabel | name of the SLM |
std::string CMMCore::getSLMDevice | ( | ) |
Returns the label of the currently selected SLM device.
double CMMCore::getSLMExposure | ( | const char * | deviceLabel | ) | |
throw | ( | CMMError | |||
) |
Returns the exposure time that will be used by the SLM for illumination
unsigned CMMCore::getSLMHeight | ( | const char * | deviceLabel | ) | |
throw | ( | CMMError | |||
) |
Returns the height (in "pixels") of the SLM
deviceLabel | name of the SLM |
unsigned CMMCore::getSLMNumberOfComponents | ( | const char * | deviceLabel | ) | |
throw | ( | CMMError | |||
) |
Returns the number of components (usually these depict colors) of the SLM For instance, an RGB projector will return 3, but a grey scale SLM returns 1
deviceLabel | name of the SLM |
long CMMCore::getSLMSequenceMaxLength | ( | const char * | deviceLabel | ) | |
throw | ( | CMMError | |||
) |
For SLMs that support sequences, returns the maximum length of the sequence that can be uploaded to the device
deviceLabel | name of the SLM |
unsigned CMMCore::getSLMWidth | ( | const char * | deviceLabel | ) | |
throw | ( | CMMError | |||
) |
Returns the width (in "pixels") of the SLM
deviceLabel | name of the SLM |
long CMMCore::getStageSequenceMaxLength | ( | const char * | label | ) | |
throw | ( | CMMError | |||
) |
Gets the maximum length of a stage's position sequence. This should only be called for stages that are sequenceable
label | the stage device label |
long CMMCore::getState | ( | const char * | deviceLabel | ) | |
throw | ( | CMMError | |||
) |
Returns the current state (position) on the specific device. The command will fail if the device does not support states.
deviceLabel | the device label |
long CMMCore::getStateFromLabel | ( | const char * | deviceLabel, |
const char * | stateLabel | ||
) | |||
throw | ( | CMMError | |
) |
Obtain the state for a given label.
deviceLabel | the device label |
stateLabel | the label for which the state is being queried |
std::string CMMCore::getStateLabel | ( | const char * | deviceLabel | ) | |
throw | ( | CMMError | |||
) |
Returns the current state as the label (string).
deviceLabel | the device label |
std::vector< std::string > CMMCore::getStateLabels | ( | const char * | deviceLabel | ) | |
throw | ( | CMMError | |||
) |
Return labels for all states
deviceLabel | the device label |
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.
References Configuration::addSetting().
Referenced by updateSystemStateCache().
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
std::string CMMCore::getVersionInfo | ( | ) | const |
Displays core version.
double CMMCore::getXPosition | ( | ) | ||
throw | ( | CMMError | ||
) |
Obtains the current position of the X axis of the XY stage in microns. Uses the current XY stage device.
label | the stage device label |
References getXYStageDevice().
double CMMCore::getXPosition | ( | const char * | label | ) | |
throw | ( | CMMError | |||
) |
Obtains the current position of the X axis of the XY stage in microns.
label | the stage device label |
void CMMCore::getXYPosition | ( | const char * | label, |
double & | x, | ||
double & | y | ||
) | |||
throw | ( | CMMError | |
) |
Obtains the current position of the XY stage in microns.
label | the stage device label |
x | a return parameter yielding the X position in microns |
y | a return parameter yielding the Y position in microns |
void CMMCore::getXYPosition | ( | double & | x, |
double & | y | ||
) | |||
throw | ( | CMMError | |
) |
Obtains the current position of the XY stage in microns. Uses the current XY stage device.
x | a return parameter yielding the X position in microns |
y | a return parameter yielding the Y position in microns |
std::string CMMCore::getXYStageDevice | ( | ) |
Returns the label of the currently selected XYStage device.
Referenced by getXPosition(), getYPosition(), setOriginX(), setOriginXY(), and setOriginY().
long CMMCore::getXYStageSequenceMaxLength | ( | const char * | label | ) | |
throw | ( | CMMError | |||
) |
Gets the maximum length of an XY stage's position sequence. This should only be called for XY stages that are sequenceable
label | the XY stage device label |
double CMMCore::getYPosition | ( | ) | ||
throw | ( | CMMError | ||
) |
Obtains the current position of the Y axis of the XY stage in microns. Uses the current XY stage device.
label | the stage device label |
References getXYStageDevice().
double CMMCore::getYPosition | ( | const char * | label | ) | |
throw | ( | CMMError | |||
) |
Obtains the current position of the Y axis of the XY stage in microns.
label | the stage device label |
bool CMMCore::hasProperty | ( | const char * | label, |
const char * | propName | ||
) | |||
throw | ( | CMMError | |
) |
Checks if device has a property with a specified name. The exception will be thrown in case device label is not defined.
bool CMMCore::hasPropertyLimits | ( | const char * | label, |
const char * | propName | ||
) | |||
throw | ( | CMMError | |
) |
Queries device if the specific property has limits.
label | the device name |
propName | the property label |
void CMMCore::home | ( | const char * | label | ) | |
throw | ( | CMMError | |||
) |
Perform a hardware homing operation for an XY or focus/Z stage.
Not all stages support this operation. The user should be warned before calling this method, as it can cause large stage movements, potentially resulting in collision (e.g. with an expensive objective lens).
label | the stage device label (either XY or focus/Z stage) |
void CMMCore::incrementalFocus | ( | ) | ||
throw | ( | CMMError | ||
) |
Performs incremental focus for the one-shot focusing device.
References getCoreErrorText(), and getDeviceName().
void CMMCore::initializeAllDevices | ( | ) | ||
throw | ( | CMMError | ||
) |
Calls Initialize() method for each loaded device. Parallel implemnetation should be faster
References isFeatureEnabled().
void CMMCore::initializeCircularBuffer | ( | ) | ||
throw | ( | CMMError | ||
) |
Initialize circular buffer based on the current camera settings.
References getCoreErrorText(), and getDeviceName().
void CMMCore::initializeDevice | ( | const char * | label | ) | |
throw | ( | CMMError | |||
) |
Initializes specific device.
label | the device label |
label | the device to initialize |
bool CMMCore::isBufferOverflowed | ( | ) | const |
Indicates whether the circular buffer is overflowed
bool CMMCore::isConfigDefined | ( | const char * | groupName, |
const char * | configName | ||
) |
Checks if the configuration already exists within a group.
References ConfigGroupCollection::Find().
Referenced by reset().
bool CMMCore::isContinuousFocusDrive | ( | const char * | stageLabel | ) | |
throw | ( | CMMError | |||
) |
Check if a stage has continuous focusing capability (positions can be set while continuous focus runs).
bool CMMCore::isContinuousFocusEnabled | ( | ) | ||
throw | ( | CMMError | ||
) |
Checks if the continuous focusing hardware device is ON or OFF.
References getDeviceName().
bool CMMCore::isContinuousFocusLocked | ( | ) | ||
throw | ( | CMMError | ||
) |
Returns the lock-in status of the continuous focusing device.
bool CMMCore::isExposureSequenceable | ( | const char * | cameraLabel | ) | |
throw | ( | CMMError | |||
) |
Queries camera if exposure can be used in a sequence
cameraLabel | the camera device label |
|
static |
Return whether the given Core feature is currently enabled.
See enableFeature() for the available features.
name | the feature name. |
CMMError | if the feature name is null or unknown. |
Referenced by initializeAllDevices().
bool CMMCore::isGroupDefined | ( | const char * | groupName | ) |
Checks if the group already exists.
References ConfigGroupCollection::isDefined().
bool CMMCore::isMultiROIEnabled | ( | ) | ||
throw | ( | CMMError | ||
) |
Queries the camera to determine if multiple ROIs are currently set.
References getCoreErrorText().
bool CMMCore::isMultiROISupported | ( | ) | ||
throw | ( | CMMError | ||
) |
Queries the camera to determine if it supports multiple ROIs.
References getCoreErrorText().
bool CMMCore::isPixelSizeConfigDefined | ( | const char * | resolutionID | ) | const |
throw | ( | CMMError | |||
) |
Checks if the Pixel Size Resolution already exists
bool CMMCore::isPropertyPreInit | ( | const char * | label, |
const char * | propName | ||
) | |||
throw | ( | CMMError | |
) |
Tells us whether the property must be defined prior to initialization.
label | the device label |
propName | the property name |
bool CMMCore::isPropertyReadOnly | ( | const char * | label, |
const char * | propName | ||
) | |||
throw | ( | CMMError | |
) |
Tells us whether the property can be modified.
label | the device label |
propName | the property name |
bool CMMCore::isPropertySequenceable | ( | const char * | label, |
const char * | propName | ||
) | |||
throw | ( | CMMError | |
) |
Queries device if the specified property can be used in a sequence
label | the device name |
propName | the property label |
bool CMMCore::isSequenceRunning | ( | ) | ||
throw | ( | |||
) |
Check if the current camera is acquiring the sequence Returns false when the sequence is done
bool CMMCore::isSequenceRunning | ( | const char * | label | ) | |
throw | ( | CMMError | |||
) |
Check if the specified camera is acquiring the sequence Returns false when the sequence is done
bool CMMCore::isStageLinearSequenceable | ( | const char * | label | ) | |
throw | ( | CMMError | |||
) |
Queries if the stage can be used in a linear sequence A linear sequence is defined by a stepsize and number of slices
label | the stage device label |
bool CMMCore::isStageSequenceable | ( | const char * | label | ) | |
throw | ( | CMMError | |||
) |
Queries stage if it can be used in a sequence
label | the stage device label |
bool CMMCore::isXYStageSequenceable | ( | const char * | label | ) | |
throw | ( | CMMError | |||
) |
Queries XY stage if it can be used in a sequence
label | the XY stage device label |
void CMMCore::loadDevice | ( | const char * | label, |
const char * | moduleName, | ||
const char * | deviceName | ||
) | |||
throw | ( | CMMError | |
) |
Loads a device from the plugin library.
label | assigned name for the device during the core session |
moduleName | the name of the device adapter module (short name, not full file name) |
deviceName | the name of the device. The name must correspond to one of the names recognized by the specific plugin library. |
void CMMCore::loadExposureSequence | ( | const char * | cameraLabel, |
std::vector< double > | exposureTime_ms | ||
) | |||
throw | ( | CMMError | |
) |
Transfer a sequence of exposure times to the camera. This should only be called for cameras where exposure time is sequenceable
cameraLabel | the camera device label |
exposureTime_ms | sequence of exposure times the camera will use during a sequence acquisition |
void CMMCore::loadGalvoPolygons | ( | const char * | deviceLabel | ) | |
throw | ( | CMMError | |||
) |
Load a set of galvo polygons to the device
void CMMCore::loadPropertySequence | ( | const char * | label, |
const char * | propName, | ||
std::vector< std::string > | eventSequence | ||
) | |||
throw | ( | CMMError | |
) |
Transfer a sequence of events/states/whatever to the device This should only be called for device-properties that are sequenceable
label | the device name |
propName | the property label |
eventSequence | the sequence of events/states that the device will execute in response to external triggers |
void CMMCore::loadSLMSequence | ( | const char * | deviceLabel, |
std::vector< unsigned char * > | imageSequence | ||
) | |||
throw | ( | CMMError | |
) |
Load a sequence of images into the SLM
deviceLabel | name of the SLM |
imagesequence | pointers to the images to be used in the sequence |
void CMMCore::loadStageSequence | ( | const char * | label, |
std::vector< double > | positionSequence | ||
) | |||
throw | ( | CMMError | |
) |
Transfer a sequence of events/states/whatever to the device This should only be called for device-properties that are sequenceable
label | the device label |
positionSequence | a sequence of positions that the stage will execute in response to external triggers |
void CMMCore::loadSystemConfiguration | ( | const char * | fileName | ) | |
throw | ( | CMMError | |||
) |
Loads the system configuration from the text file conforming to the MM specific format. The configuration contains a list of commands to build the desired system state: devices, labels, 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 setPropertyCommand() Configuration - ignored for backward compatibility
The remaining fields in the line will be used for corresponding command parameters. The number of parameters depends on the actual command used.
References CMMError::getFullMsg().
void CMMCore::loadSystemState | ( | const char * | fileName | ) | |
throw | ( | CMMError | |||
) |
Loads the system configuration from the text file conforming to the MM specific format. The configuration contains a list of commands to build the desired system state from read-write properties.
Format specification: the same as in loadSystemConfiguration() command
void CMMCore::loadXYStageSequence | ( | const char * | label, |
std::vector< double > | xSequence, | ||
std::vector< double > | ySequence | ||
) | |||
throw | ( | CMMError | |
) |
Transfer a sequence of stage positions to the xy stage. xSequence and ySequence must have the same length. This should only be called for XY stages that are sequenceable
label | the XY stage device label |
xSequence | the sequence of x positions that the stage will execute in response to external triggers |
ySequence | the sequence of y positions that the stage will execute in response to external triggers |
void CMMCore::logMessage | ( | const char * | msg | ) |
Record text message in the log file.
void CMMCore::logMessage | ( | const char * | msg, |
bool | debugOnly | ||
) |
Record text message in the log file.
|
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).
void CMMCore::pointGalvoAndFire | ( | const char * | deviceLabel, |
double | x, | ||
double | y, | ||
double | pulseTime_us | ||
) | |||
throw | ( | CMMError | |
) |
Set the Galvo to an x,y position and fire the laser for a predetermined duration.
void * CMMCore::popNextImage | ( | ) | ||
throw | ( | CMMError | ||
) |
Gets and removes the next image from the circular buffer. Returns 0 if the buffer is empty.
Supported data types are byte (8 bits per pixel, 1 component), short (16 bits per pixel, 1 component), float (32 bits per pixel, 1 component, not supported by the UI yet), RGB_32 (8 bits per component, 4 components), RGB_64 (16 bits per component, 4 components, not supported by UI yet).
RGB buffers are expected to be in big endian ARGB format (ARGB8888), which means that on little endian the format is BGRA888 (see: https://en.wikipedia.org/wiki/RGBA_color_model).
References getCoreErrorText().
void * CMMCore::popNextImageMD | ( | Metadata & | md | ) | |
throw | ( | CMMError | |||
) |
Gets and removes the next image (and metadata) from the circular buffer
void * CMMCore::popNextImageMD | ( | unsigned | channel, |
unsigned | slice, | ||
Metadata & | md | ||
) | |||
throw | ( | CMMError | |
) |
Gets and removes the next image (and metadata) from the circular buffer channel indicates which cameraChannel image should be retrieved. slice has not been implement and should always be 0
void CMMCore::prepareSequenceAcquisition | ( | const char * | label | ) | |
throw | ( | CMMError | |||
) |
Prepare the camera for the sequence acquisition to save the time in the StartSequenceAcqusition() call which is supposed to come next.
std::vector< char > CMMCore::readFromSerialPort | ( | const char * | portLabel | ) | |
throw | ( | CMMError | |||
) |
Reads the contents of the Rx buffer.
void CMMCore::registerCallback | ( | MMEventCallback * | cb | ) |
Register a callback (listener class). MMCore will send notifications on internal events using this interface
void CMMCore::renameConfig | ( | const char * | groupName, |
const char * | oldConfigName, | ||
const char * | newConfigName | ||
) | |||
throw | ( | CMMError | |
) |
Renames a configuration within a specified group. The command will fail if the configuration was not previously defined.
void CMMCore::renameConfigGroup | ( | const char * | oldGroupName, |
const char * | newGroupName | ||
) | |||
throw | ( | CMMError | |
) |
Renames a configuration group.
void CMMCore::renamePixelSizeConfig | ( | const char * | oldConfigName, |
const char * | newConfigName | ||
) | |||
throw | ( | CMMError | |
) |
Renames a pixel size configuration. The command will fail if the configuration was not previously defined.
void CMMCore::reset | ( | ) | ||
throw | ( | CMMError | ||
) |
Unloads all devices from the core, clears all configuration data.
References isConfigDefined(), setConfig(), unloadAllDevices(), and waitForSystem().
Referenced by ~CMMCore().
void CMMCore::runGalvoPolygons | ( | const char * | deviceLabel | ) | |
throw | ( | CMMError | |||
) |
Run a loop of galvo polygons
void CMMCore::runGalvoSequence | ( | const char * | deviceLabel | ) | |
throw | ( | CMMError | |||
) |
Run a sequence of galvo positions
void CMMCore::saveSystemConfiguration | ( | const char * | fileName | ) | |
throw | ( | CMMError | |||
) |
Saves the current system configuration to a text file of the MM specific format. The configuration file records only the information essential to the hardware setup: devices, labels, pre-initialization properties, and configurations. The file format is the same as for the system state.
References PropertySetting::getDeviceLabel(), PropertySetting::getPropertyName(), PropertySetting::getPropertyValue(), Configuration::getSetting(), and Configuration::size().
void CMMCore::saveSystemState | ( | const char * | fileName | ) | |
throw | ( | CMMError | |||
) |
Saves the current system state to a text file of the MM specific format. The file records only read-write properties. The file format is directly readable by the complementary loadSystemState() command.
References PropertySetting::getDeviceLabel(), PropertySetting::getPropertyName(), PropertySetting::getPropertyValue(), Configuration::getSetting(), and Configuration::size().
void CMMCore::setAdapterOrigin | ( | const char * | label, |
double | newZUm | ||
) | |||
throw | ( | CMMError | |
) |
Enable software translation of coordinates for the given focus/Z stage.
The current position of the stage becomes Z = newZUm. Only some stages support this functionality; it is recommended that setOrigin() be used instead where available.
label | the stage device label |
newZUm | the new coordinate to assign to the current Z position |
void CMMCore::setAdapterOrigin | ( | double | newZUm | ) | |
throw | ( | CMMError | |||
) |
Enable software translation of coordinates for the current focus/Z stage.
The current position of the stage becomes Z = newZUm. Only some stages support this functionality; it is recommended that setOrigin() be used instead where available.
newZUm | the new coordinate to assign to the current Z position |
void CMMCore::setAdapterOriginXY | ( | const char * | label, |
double | newXUm, | ||
double | newYUm | ||
) | |||
throw | ( | CMMError | |
) |
Enable software translation of coordinates for the given XY stage.
The current position of the stage becomes (newXUm, newYUm). It is recommended that setOriginXY() be used instead where available.
label | the XY stage device label |
newXUm | the new coordinate to assign to the current X position |
newYUm | the new coordinate to assign to the current Y position |
void CMMCore::setAdapterOriginXY | ( | double | newXUm, |
double | newYUm | ||
) | |||
throw | ( | CMMError | |
) |
Enable software translation of coordinates for the current XY stage.
The current position of the stage becomes (newXUm, newYUm). It is recommended that setOriginXY() be used instead where available.
newXUm | the new coordinate to assign to the current X position |
newYUm | the new coordinate to assign to the current Y position |
void CMMCore::setAutoFocusDevice | ( | const char * | autofocusLabel | ) | |
throw | ( | CMMError | |||
) |
Sets the current auto-focus device.
void CMMCore::setAutoFocusOffset | ( | double | offset | ) | |
throw | ( | CMMError | |||
) |
Applies offset the one-shot focusing device.
void CMMCore::setAutoShutter | ( | bool | state | ) |
If this option is enabled Shutter automatically opens and closes when the image is acquired.
state | true for enabled |
References Configuration::addSetting().
void CMMCore::setCameraDevice | ( | const char * | cameraLabel | ) | |
throw | ( | CMMError | |||
) |
Sets the current camera device.
camera | the camera device label |
void CMMCore::setChannelGroup | ( | const char * | chGroup | ) | |
throw | ( | CMMError | |||
) |
Specifies the group determining the channel selection.
void CMMCore::setCircularBufferMemoryFootprint | ( | unsigned | sizeMB | ) | |
throw | ( | CMMError | |||
) |
Reserve memory for the circular buffer.
sizeMB | n megabytes |
void CMMCore::setConfig | ( | const char * | groupName, |
const char * | configName | ||
) | |||
throw | ( | CMMError | |
) |
Applies a configuration to a group. The command will fail if the configuration was not previously defined.
groupName | the configuration group name |
configName | the configuration preset name |
Referenced by reset().
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().
paths | the device adapter search paths |
void CMMCore::setDeviceDelayMs | ( | const char * | label, |
double | delayMs | ||
) | |||
throw | ( | CMMError | |
) |
Overrides the built-in value for the action delay. Some devices ignore this setting.
label | the device label |
delayMs | the desired delay in milliseconds |
void CMMCore::setExposure | ( | const char * | label, |
double | dExp | ||
) | |||
throw | ( | CMMError | |
) |
Sets the exposure setting of the specified camera in milliseconds.
label | the camera device label |
dExp | the exposure in milliseconds |
void CMMCore::setExposure | ( | double | dExp | ) | |
throw | ( | CMMError | |||
) |
Sets the exposure setting of the current camera in milliseconds.
dExp | the exposure in milliseconds |
void CMMCore::setFocusDevice | ( | const char * | focusLabel | ) | |
throw | ( | CMMError | |||
) |
Sets the current focus device.
focus | the focus stage device label |
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.
void CMMCore::setGalvoDevice | ( | const char * | galvoLabel | ) | |
throw | ( | CMMError | |||
) |
Sets the current galvo device.
void CMMCore::setGalvoIlluminationState | ( | const char * | deviceLabel, |
bool | on | ||
) | |||
throw | ( | CMMError | |
) |
Set the galvo's illumination state to on or off
void CMMCore::setGalvoPolygonRepetitions | ( | const char * | deviceLabel, |
int | repetitions | ||
) | |||
throw | ( | CMMError | |
) |
Set the number of times to loop galvo polygons
void CMMCore::setGalvoPosition | ( | const char * | deviceLabel, |
double | x, | ||
double | y | ||
) | |||
throw | ( | CMMError | |
) |
Set the Galvo to an x,y position
void CMMCore::setImageProcessorDevice | ( | const char * | procLabel | ) | |
throw | ( | CMMError | |||
) |
Sets the current image processor device.
void CMMCore::setMultiROI | ( | std::vector< unsigned > | xs, |
std::vector< unsigned > | ys, | ||
std::vector< unsigned > | widths, | ||
std::vector< unsigned > | heights | ||
) | |||
throw | ( | CMMError | |
) |
Set multiple ROIs for the current camera device. Will fail if the camera does not support multiple ROIs, any widths or heights are non-positive, or if the vectors do not all have the same length.
xs | X indices for the upper-left corners of each ROI. |
ys | Y indices for the upper-left corners of each ROI. |
widths | Width in pixels for each ROI. |
heights | Height in pixels for each ROI. |
void CMMCore::setOrigin | ( | ) | ||
throw | ( | CMMError | ||
) |
Zero the current focus/Z stage's coordinates at the current position.
The current position becomes the new origin (Z = 0). Not to be confused with setAdapterOrigin().
References getFocusDevice().
void CMMCore::setOrigin | ( | const char * | label | ) | |
throw | ( | CMMError | |||
) |
Zero the given focus/Z stage's coordinates at the current position.
The current position becomes the new origin (Z = 0). Not to be confused with setAdapterOrigin().
label | the stage device label |
void CMMCore::setOriginX | ( | ) | ||
throw | ( | CMMError | ||
) |
Zero the given XY stage's X coordinate at the current position.
The current position becomes the new X = 0.
References getXYStageDevice().
void CMMCore::setOriginX | ( | const char * | label | ) | |
throw | ( | CMMError | |||
) |
Zero the given XY stage's X coordinate at the current position.
The current position becomes the new X = 0.
label | the xy stage device label |
void CMMCore::setOriginXY | ( | ) | ||
throw | ( | CMMError | ||
) |
Zero the current XY stage's coordinates at the current position.
The current position becomes the new origin. Not to be confused with setAdapterOriginXY().
References getXYStageDevice().
void CMMCore::setOriginXY | ( | const char * | label | ) | |
throw | ( | CMMError | |||
) |
Zero the given XY stage's coordinates at the current position.
The current position becomes the new origin. Not to be confused with setAdapterOriginXY().
label | the stage device label |
void CMMCore::setOriginY | ( | ) | ||
throw | ( | CMMError | ||
) |
Zero the given XY stage's Y coordinate at the current position.
The current position becomes the new Y = 0.
References getXYStageDevice().
void CMMCore::setOriginY | ( | const char * | label | ) | |
throw | ( | CMMError | |||
) |
Zero the given XY stage's Y coordinate at the current position.
The current position becomes the new Y = 0.
label | the xy stage device label |
void CMMCore::setParentLabel | ( | const char * | label, |
const char * | parentLabel | ||
) | |||
throw | ( | CMMError | |
) |
Sets parent device label
void CMMCore::setPixelSizeAffine | ( | const char * | resolutionID, |
std::vector< double > | affine | ||
) | |||
throw | ( | CMMError | |
) |
Sets the raw affine transform for the specific pixel size configuration The affine transform consists of the first two rows of a 3x3 matrix, the third row is alsways assumed to be 0.0 0.0 1.0. The transform should be valid for binning 1 and no magnification device (as given by the getMagnification() function). Order: row[0]col[0] row[0]c[1] row[0]c[2] row[1]c[0] row[1]c[1] row[1]c[2] The given vector has to have 6 doubles, or bad stuff will happen
void CMMCore::setPixelSizeConfig | ( | const char * | resolutionID | ) | |
throw | ( | CMMError | |||
) |
Applies a Pixel Size Configuration. The command will fail if the configuration was not previously defined.
groupName | the configuration group name |
configName | the configuration preset name |
References CMMError::getCode().
void CMMCore::setPixelSizeUm | ( | const char * | resolutionID, |
double | pixSize | ||
) | |||
throw | ( | CMMError | |
) |
Sets pixel size in microns for the specified resolution sensing configuration preset.
void CMMCore::setPosition | ( | const char * | label, |
double | position | ||
) | |||
throw | ( | CMMError | |
) |
Sets the position of the stage in microns.
label | the stage device label |
position | the desired stage position, in microns |
void CMMCore::setPosition | ( | double | position | ) | |
throw | ( | CMMError | |||
) |
Sets the position of the stage in microns. Uses the current Z positioner (focus) device.
position | the desired stage position, in microns |
void CMMCore::setPrimaryLogFile | ( | const char * | filename, |
bool | truncate = false |
||
) | |||
throw | ( | CMMError | |
) |
Set the primary Core log file.
filename | The log filename. If empty or null, the primary log file is disabled. |
void CMMCore::setProperty | ( | const char * | label, |
const char * | propName, | ||
const bool | propValue | ||
) | |||
throw | ( | CMMError | |
) |
Changes the value of the device property.
label | the device label |
propName | property name |
propValue | the new property value |
void CMMCore::setProperty | ( | const char * | label, |
const char * | propName, | ||
const char * | propValue | ||
) | |||
throw | ( | CMMError | |
) |
Changes the value of the device property.
label | the device label |
propName | the property name |
propValue | the new property value |
Referenced by detectDevice(), and setSystemState().
void CMMCore::setProperty | ( | const char * | label, |
const char * | propName, | ||
const double | propValue | ||
) | |||
throw | ( | CMMError | |
) |
Changes the value of the device property.
label | the device label |
propName | the property name |
propValue | the new property value |
void CMMCore::setProperty | ( | const char * | label, |
const char * | propName, | ||
const float | propValue | ||
) | |||
throw | ( | CMMError | |
) |
Changes the value of the device property.
label | the device label |
propName | the property name |
propValue | the new property value |
void CMMCore::setProperty | ( | const char * | label, |
const char * | propName, | ||
const long | propValue | ||
) | |||
throw | ( | CMMError | |
) |
Changes the value of the device property.
label | the device label |
propName | the property name |
propValue | the new property value |
void CMMCore::setRelativePosition | ( | const char * | label, |
double | d | ||
) | |||
throw | ( | CMMError | |
) |
Sets the relative position of the stage in microns.
label | the single-axis drive device label |
d | the amount to move the stage, in microns (positive or negative) |
void CMMCore::setRelativePosition | ( | double | d | ) | |
throw | ( | CMMError | |||
) |
Sets the relative position of the stage in microns. Uses the current Z positioner (focus) device.
d | the amount to move the stage, in microns (positive or negative) |
void CMMCore::setRelativeXYPosition | ( | const char * | label, |
double | dx, | ||
double | dy | ||
) | |||
throw | ( | CMMError | |
) |
Sets the relative position of the XY stage in microns.
label | the xy stage device label |
dx | the distance to move in X (positive or negative) |
dy | the distance to move in Y (positive or negative) |
void CMMCore::setRelativeXYPosition | ( | double | dx, |
double | dy | ||
) | |||
throw | ( | CMMError | |
) |
Sets the relative position of the XY stage in microns. Uses the current XY stage device.
dx | the distance to move in X (positive or negative) |
dy | the distance to move in Y (positive or negative) |
void CMMCore::setROI | ( | const char * | label, |
int | x, | ||
int | y, | ||
int | xSize, | ||
int | ySize | ||
) | |||
throw | ( | CMMError | |
) |
Set the hardware region of interest for a specified camera.
A successful call to this method will clear any images in the sequence buffer, even if the ROI does not change.
Warning: the clearing of the sequence buffer will interfere with any sequence acquisitions currently being performed on other cameras.
If multiple ROIs are set prior to this call, they will be replaced by the new single ROI.
The coordinates are in units of binned pixels. That is, conceptually, binning is applied before the ROI.
label | camera label |
x | coordinate of the top left corner |
y | coordinate of the top left corner |
xSize | number of horizontal pixels |
ySize | number of horizontal pixels |
void CMMCore::setROI | ( | int | x, |
int | y, | ||
int | xSize, | ||
int | ySize | ||
) | |||
throw | ( | CMMError | |
) |
Set the hardware region of interest for the current camera.
A successful call to this method will clear any images in the sequence buffer, even if the ROI does not change.
If multiple ROIs are set prior to this call, they will be replaced by the new single ROI.
The coordinates are in units of binned pixels. That is, conceptually, binning is applied before the ROI.
x | coordinate of the top left corner |
y | coordinate of the top left corner |
xSize | number of horizontal pixels |
ySize | number of horizontal pixels |
void CMMCore::setSerialPortCommand | ( | const char * | portLabel, |
const char * | command, | ||
const char * | term | ||
) | |||
throw | ( | CMMError | |
) |
Send string to the serial device and return an answer. This command blocks until it receives an answer from the device terminated by the specified sequence.
Referenced by CoreCallback::SetSerialCommand().
void CMMCore::setSerialProperties | ( | const char * | portName, |
const char * | answerTimeout, | ||
const char * | baudRate, | ||
const char * | delayBetweenCharsMs, | ||
const char * | handshaking, | ||
const char * | parity, | ||
const char * | stopBits | ||
) | |||
throw | ( | CMMError | |
) |
Sets all com port properties in a single call
void CMMCore::setShutterDevice | ( | const char * | shutterLabel | ) | |
throw | ( | CMMError | |||
) |
Sets the current shutter device.
shutter | the shutter device label |
void CMMCore::setShutterOpen | ( | bool | state | ) | |
throw | ( | CMMError | |||
) |
Opens or closes the currently selected (default) shutter.
state | the desired state of the shutter (true for open) |
void CMMCore::setShutterOpen | ( | const char * | shutterLabel, |
bool | state | ||
) | |||
throw | ( | CMMError | |
) |
Opens or closes the specified shutter.
state | the desired state of the shutter (true for open) |
void CMMCore::setSLMDevice | ( | const char * | slmLabel | ) | |
throw | ( | CMMError | |||
) |
Sets the current slm device.
void CMMCore::setSLMExposure | ( | const char * | deviceLabel, |
double | exposure_ms | ||
) | |||
throw | ( | CMMError | |
) |
For SLM devices with build-in light source (such as projectors) this will set the exposure time, but not (yet) start the illumination
void CMMCore::setSLMImage | ( | const char * | deviceLabel, |
imgRGB32 | pixels | ||
) | |||
throw | ( | CMMError | |
) |
Write a 32-bit color image to the SLM.
void CMMCore::setSLMImage | ( | const char * | deviceLabel, |
unsigned char * | pixels | ||
) | |||
throw | ( | CMMError | |
) |
Write an 8-bit monochrome image to the SLM.
void CMMCore::setSLMPixelsTo | ( | const char * | deviceLabel, |
unsigned char | intensity | ||
) | |||
throw | ( | CMMError | |
) |
Set all SLM pixels to a single 8-bit intensity.
void CMMCore::setSLMPixelsTo | ( | const char * | deviceLabel, |
unsigned char | red, | ||
unsigned char | green, | ||
unsigned char | blue | ||
) | |||
throw | ( | CMMError | |
) |
Set all SLM pixels to an RGB color.
void CMMCore::setStageLinearSequence | ( | const char * | label, |
double | dZ_um, | ||
int | nSlices | ||
) | |||
throw | ( | CMMError | |
) |
Loads a linear sequence (defined by stepsize and nr. of steps) into the device. Why was it not called loadStageLinearSequence???
label | Name of the stage device |
dZ_um | Step size between slices in microns |
nSlices | Number of slices fo ethis sequence Presumably the sequence will repeat after this number of TTLs was received |
void CMMCore::setState | ( | const char * | deviceLabel, |
long | state | ||
) | |||
throw | ( | CMMError | |
) |
Sets the state (position) on the specific device. The command will fail if the device does not support states.
deviceLabel | the device label |
state | the new state |
void CMMCore::setStateLabel | ( | const char * | deviceLabel, |
const char * | stateLabel | ||
) | |||
throw | ( | CMMError | |
) |
Sets device state using the previously assigned label (string).
deviceLabel | the device label |
stateLabel | the state label |
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.
conf | the configuration object representing the desired system state |
References PropertySetting::getDeviceLabel(), PropertySetting::getPropertyName(), PropertySetting::getPropertyValue(), PropertySetting::getReadOnly(), Configuration::getSetting(), setProperty(), Configuration::size(), and updateSystemStateCache().
void CMMCore::setXYPosition | ( | const char * | label, |
double | x, | ||
double | y | ||
) | |||
throw | ( | CMMError | |
) |
Sets the position of the XY stage in microns.
label | the XY stage device label |
x | the X axis position in microns |
y | the Y axis position in microns |
void CMMCore::setXYPosition | ( | double | x, |
double | y | ||
) | |||
throw | ( | CMMError | |
) |
Sets the position of the XY stage in microns. Uses the current XY stage device.
x | the X axis position in microns |
y | the Y axis position in microns |
void CMMCore::setXYStageDevice | ( | const char * | xyDeviceLabel | ) | |
throw | ( | CMMError | |||
) |
Sets the current XY device.
void CMMCore::sleep | ( | double | intervalMs | ) | const |
Waits (blocks the calling thread) for specified time in milliseconds.
intervalMs | the time to sleep in milliseconds |
void CMMCore::snapImage | ( | ) | ||
throw | ( | CMMError | ||
) |
Acquires a single image with current settings. Snap is not allowed while the acquisition thread is run
References getCoreErrorText(), and waitForDevice().
void CMMCore::startContinuousSequenceAcquisition | ( | double | intervalMs | ) | |
throw | ( | CMMError | |||
) |
Starts the continuous camera sequence acquisition. This command does not block the calling thread for the duration of the acquisition.
void CMMCore::startExposureSequence | ( | const char * | cameraLabel | ) | |
throw | ( | CMMError | |||
) |
Starts an ongoing sequence of triggered exposures in a camera This should only be called for cameras where exposure time is sequenceable
cameraLabel | the camera device label |
void CMMCore::startPropertySequence | ( | const char * | label, |
const char * | propName | ||
) | |||
throw | ( | CMMError | |
) |
Starts an ongoing sequence of triggered events in a property of a device This should only be called for device-properties that are sequenceable
label | the device name |
propName | the property label |
int CMMCore::startSecondaryLogFile | ( | const char * | filename, |
bool | enableDebug, | ||
bool | truncate = true , |
||
bool | synchronous = false |
||
) | |||
throw | ( | CMMError | |
) |
Start capturing logging output into an additional file.
filename | The filename to which the log will be captured |
enableDebug | Whether to include debug logging (regardless of whether debug logging is enabled for the primary log). |
truncate | If false, append to the file. |
synchronous | If 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). |
void CMMCore::startSequenceAcquisition | ( | const char * | label, |
long | numImages, | ||
double | intervalMs, | ||
bool | stopOnOverflow | ||
) | |||
throw | ( | CMMError | |
) |
Starts streaming camera sequence acquisition for a specified camera. This command does not block the calling thread for the duration of the acquisition. The difference between this method and the one with the same name but operating on the "default" camera is that it does not automatically initialize the circular buffer.
void CMMCore::startSequenceAcquisition | ( | long | numImages, |
double | intervalMs, | ||
bool | stopOnOverflow | ||
) | |||
throw | ( | CMMError | |
) |
Starts streaming camera sequence acquisition. This command does not block the calling thread for the duration of the acquisition.
numImages | Number of images requested from the camera |
intervalMs | The interval between images, currently only supported by Andor cameras |
stopOnOverflow | whether or not the camera stops acquiring when the circular buffer is full |
void CMMCore::startSLMSequence | ( | const char * | deviceLabel | ) | |
throw | ( | CMMError | |||
) |
Starts the sequence previously uploaded to the SLM
deviceLabel | name of the SLM |
void CMMCore::startStageSequence | ( | const char * | label | ) | |
throw | ( | CMMError | |||
) |
Starts an ongoing sequence of triggered events in a stage This should only be called for stages
label | the stage device label |
void CMMCore::startXYStageSequence | ( | const char * | label | ) | |
throw | ( | CMMError | |||
) |
Starts an ongoing sequence of triggered events in an XY stage This should only be called for stages
label | the XY stage device label |
bool CMMCore::stderrLogEnabled | ( | ) |
Indicates whether logging output goes to stdErr
void CMMCore::stop | ( | const char * | label | ) | |
throw | ( | CMMError | |||
) |
Stop the XY or focus/Z stage motors
Not all stages support this operation; check before use.
label | the stage device label (either XY or focus/Z stage) |
void CMMCore::stopExposureSequence | ( | const char * | cameraLabel | ) | |
throw | ( | CMMError | |||
) |
Stops an ongoing sequence of triggered exposures in a camera This should only be called for cameras where exposure time is sequenceable
cameraLabel | the camera device label |
void CMMCore::stopPropertySequence | ( | const char * | label, |
const char * | propName | ||
) | |||
throw | ( | CMMError | |
) |
Stops an ongoing sequence of triggered events in a property of a device This should only be called for device-properties that are sequenceable
label | the device label |
propName | the property name |
void CMMCore::stopSecondaryLogFile | ( | int | handle | ) | |
throw | ( | CMMError | |||
) |
Stop capturing logging output into an additional file.
handle | The secondary log handle returned by startSecondaryLogFile(). |
void CMMCore::stopSequenceAcquisition | ( | ) | ||
throw | ( | CMMError | ||
) |
Stops streaming camera sequence acquisition.
References getCoreErrorText(), and getDeviceName().
void CMMCore::stopSequenceAcquisition | ( | const char * | label | ) | |
throw | ( | CMMError | |||
) |
Stops streaming camera sequence acquisition for a specified camera.
label | The camera name |
void CMMCore::stopSLMSequence | ( | const char * | deviceLabel | ) | |
throw | ( | CMMError | |||
) |
Stops the SLM sequence if previously started
deviceLabel | name of the SLM |
void CMMCore::stopStageSequence | ( | const char * | label | ) | |
throw | ( | CMMError | |||
) |
Stops an ongoing sequence of triggered events in a stage This should only be called for stages that are sequenceable
label | the stage device label |
void CMMCore::stopXYStageSequence | ( | const char * | label | ) | |
throw | ( | CMMError | |||
) |
Stops an ongoing sequence of triggered events in an XY stage This should only be called for stages that are sequenceable
label | the XY stage device label |
bool CMMCore::supportsDeviceDetection | ( | const char * | label | ) |
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 label is not a valid device.
bool CMMCore::systemBusy | ( | ) | ||
throw | ( | CMMError | ||
) |
Checks the busy status of the entire system. The system will report busy if any of the devices is busy.
References deviceTypeBusy().
void CMMCore::unloadAllDevices | ( | ) | ||
throw | ( | CMMError | ||
) |
Unloads all devices from the core and resets all configuration data.
References ConfigGroupBase< T >::Delete(), ConfigGroupBase< T >::GetAvailable(), and CMMError::getMsg().
Referenced by reset().
void CMMCore::unloadDevice | ( | const char * | label | ) | |
throw | ( | CMMError | |||
) |
Unloads the device from the core and adjusts all configuration data.
label | the name of the device to unload |
References CMMError::getMsg().
void CMMCore::unloadLibrary | ( | const char * | moduleName | ) | |
throw | ( | CMMError | |||
) |
Forcefully unload a library. Experimental. Don't use.
void CMMCore::updateCoreProperties | ( | ) | ||
throw | ( | CMMError | ||
) |
Updates CoreProperties (currently all Core properties are devices types) with the loaded hardware. After this call, each of the Core-Device properties will be populated with the currently loaded devices of that type
void CMMCore::updateSystemStateCache | ( | ) |
Updates the state of the entire hardware.
References getSystemState().
Referenced by setSystemState().
bool CMMCore::usesDeviceDelay | ( | const char * | label | ) | |
throw | ( | CMMError | |||
) |
Signals if the device will use the delay setting or not.
label | the device label |
void CMMCore::waitForConfig | ( | const char * | group, |
const char * | configName | ||
) | |||
throw | ( | CMMError | |
) |
Blocks until all devices included in the configuration become ready.
group | the configuration group |
config | the configuration preset |
References PropertySetting::getDeviceLabel(), CMMError::getMsg(), Configuration::getSetting(), and Configuration::size().
void CMMCore::waitForDevice | ( | const char * | label | ) | |
throw | ( | CMMError | |||
) |
Waits (blocks the calling thread) until the specified device becomes non-busy.
label | the device label |
Referenced by snapImage().
void CMMCore::waitForDeviceType | ( | MM::DeviceType | devType | ) | |
throw | ( | CMMError | |||
) |
Blocks until all devices of the specific type become ready (not-busy).
devType | a constant specifying the device type |
Referenced by waitForSystem().
void CMMCore::waitForSystem | ( | ) | ||
throw | ( | CMMError | ||
) |
Blocks until all devices in the system become ready (not-busy).
References waitForDeviceType().
Referenced by reset().
void CMMCore::writeToSerialPort | ( | const char * | portLabel, |
const std::vector< char > & | data | ||
) | |||
throw | ( | CMMError | |
) |
Sends an array of characters to the serial port and returns immediately.