Microscope Commands Documentation

Leica logo

Microscope Control Software version 2.2.2.0

JSON command protocol
TCP/IP port: 16951
Message format: message length (4 bytes, int32) followed by JSON message

Field Type/Value Description Required Default
Common for all components
PingcommandPing to check that component is able to receive commands.
response
CommoncommandRepresent a command that can be executed on a source.
ComponentNamestringName of the component to which command is addressed.Yes
CommandNamestringName of the command.Yes
response
SuccessboolIndicates if command was successful.Yes
ErrorMessagestringError message describing command error.Yes
Timedouble?Time in ms it took to execute command or null if unknown.Yes
Common for all devices
ConnectcommandConnect microscope to the device.
response
DisconnectcommandDisconnect microscope from device.
response
PingcommandPing to check that component is able to receive commands.
response
WaitReadycommandWait for a device to be ready.
response
AcquisitionControllerDevice
LaserAblateUVcommandTrigger a series of pulses of UV ablation laser.
PulseCountintNumber of pulses to trigger.Yes
response
AcquirecommandGenerate acquisition controller signals.
IlluminationSettingsstringName of the illumination settings to use.Yes
ExposureSettingsstringName of the exposure settings to use.Yes
response
CameraDevice
DisplayedViewSetcommandSet the displayed view in image viewer.
ViewintThe index of the view to display, one based.Yes
response
ImageInfoGetcommandGet info on imaging setup.
response
WidthintWidth of the image in pixels.Yes
HeightintHeight of the image in pixels.Yes
PlanesintNumber of planes.Yes
ChannelsintNumber of channels.Yes
ViewsintNumber of views.Yes
PositionstringName of position (or null if not known).Yes
SettingsstringName of settings.Yes
TimePointint?Time point starting at 1.Yes
VoxelXdouble?Size of Voxel X in um.Yes
VoxelYdouble?Size of Voxel Y in um.Yes
VoxelZdouble?Size of Voxel Z in um (or null if no stack).Yes
NumericalAperturedoubleNumerical aperture of objective.Yes
OffsetGetcommandGet offset between camera views.
response
OffsetXintThe offset between views along X-axis.Yes
OffsetYintThe offset between views along Y-axis.Yes
OffsetSetcommandSet the offset between camera views.
OffsetXintThe offset between views along X-axis.Yes
OffsetYintThe offset between views along Y-axis.Yes
response
ImageGetcommandGet image from the camera buffer.
PlaneintPlane to get (1 based).No1
ChannelIndexintIndex of channel to get (1 based).No1
ViewIndexintIndex of View to get (1 based).No1
Topint?Index of top most pixel to get (0 based), null to center.Nonull
Leftint?Index of left most pixel to get (0 based), null to center.Nonull
Widthint?Width of the image in pixels or null to get full width.Nonull
Heightint?Height of the image in pixels or null to get full height.Nonull
response
WidthintWidth of the image.Yes
HeightintHeight of the image.Yes
ImageDatastringImage data represented in base64 encoding.Yes
FilterWheelDevice
MovecommandMove filter wheel to specified filter.
FilterNamestringName of the filter settings to move device to.Yes
ForceboolWhether to force the filter wheel to move (even if already at correct position).Nofalse
response
MoveTocommandMove filter wheel to specified position.
PositionintPosition to move the device to.Yes
ForceboolWhether to force the filter wheel to move (even if already at correct position).Nofalse
response
IlluminationModuleDevice
CurrentIlluminationGetcommandGet values currently applied on the hardware.
response
NamestringName of illumination settings.Yes
TranslationXdoubleThe translation along X-axis.Yes
RotationXdoubleThe rotation along X-axis.Yes
TranslationYdoubleThe translation along Y-axis.Yes
TranslationZdoubleThe translation along Z-axis.Yes
RotationZdoubleThe rotation along Z-axis.Yes
IlluminationSetcommandSet the illumination settings.
NamestringName of the illumination settings to set.Yes
TranslationXdouble?The translation along X-axis or null to keep original value.Nonull
RotationXdouble?The rotation along X-axis or null to keep original value.Nonull
TranslationYdouble?The translation along Y-axis or null to keep original value.Nonull
TranslationZdouble?The translation along Z-axis or null to keep original value.Nonull
RotationZdouble?The rotation along Z-axis or null to keep original value.Nonull
SetDeviceboolWhether to apply the new settings on device.Nofalse
response
OffsetBaseGetcommandGet base offset values.
response
PositionAlignmentSetcommandSet position specific Z-alignment and enable the position.
NamestringName of the position alignment settings to set.Yes
TranslationZdouble?Translation along Z-axis to set or null to keep original value.Nonull
Enablebool?Enable to set or null to keep original value.Nonull
response
PositionAlignmentGetcommandGet position specific Z-alignment.
NamestringName of the position alignment settings to get.Yes
response
NamestringName of the position.Yes
TranslationZdoubleTranslation along Z-axis.Yes
EnableboolWhether the alignment is applied.Yes
OffsetsBaseSetcommandSet base offsets, all current settings are overwritten.
OffsetsBaselist of dictThe list of base offsets.
Keys of dict listed below.
Yes
BranchintUnique number of illumination branch (value 1, 2 or 3).Yes
Scanner1OffsetdoubleVoltage on scanner 1.Yes
Scanner2OffsetdoubleVoltage on scanner 2.Yes
Scanner3OffsetdoubleVoltage on scanner 3.Yes
Scanner4OffsetdoubleVoltage on scanner 4.Yes
response
IlluminationGetcommandGet current illumination settings.
NamestringName of the illumination settings to get.Yes
response
NamestringName of illumination settings.Yes
TranslationXdoubleThe translation along X-axis.Yes
RotationXdoubleThe rotation along X-axis.Yes
TranslationYdoubleThe translation along Y-axis.Yes
TranslationZdoubleThe translation along Z-axis.Yes
RotationZdoubleThe rotation along Z-axis.Yes
System
GetDeviceListcommandGet a list of names and types of devices connected to the microscope.
response
DeviceNameslist of stringList of device names.Yes
DeviceTypeslist of stringList of device types.Yes
GetDeviceTypecommandGet the type of a device.
QueryDeviceNamestringThe name of the device to get the type for.Yes
response
DeviceTypestringType of the device.Yes
PhotomanipulationComponent
OffsetsBaseGetcommandGet base offset values from internal or external photomanipulation laser.
OffsetsInternalboolWhether offsets are from internal or external photomanipulation laser.Notrue
response
OffsetsBasedictThe base offsets.
Keys of dict listed below.
Yes
Scanner1OffsetdoubleVoltage on scanner 1 (closest to scan lens).Yes
Scanner2OffsetdoubleVoltage on scanner 2.Yes
Scanner3OffsetdoubleVoltage on scanner 3.Yes
Scanner4OffsetdoubleVoltage on scanner 4 (furthest from scan lens).Yes
OffsetsBaseSetcommandSet base offsets for internal or external photomanipulation laser, all current settings are overwritten.
OffsetsBasedictThe baser offsets.
Keys of dict listed below.
Yes
Scanner1OffsetdoubleVoltage on scanner 1 (closest to scan lens).Yes
Scanner2OffsetdoubleVoltage on scanner 2.Yes
Scanner3OffsetdoubleVoltage on scanner 3.Yes
Scanner4OffsetdoubleVoltage on scanner 4 (furthest from scan lens).Yes
response
StageXYZDevice
ForgetCurrentPositioncommandMake stage forget position name on which it's located.
response
GetZStackcommandGet Z-Stack settings.
NamestringName of the Z-Stack settings.Yes
response
NamestringName of the Z-Stack settings.Yes
StepdoubleThe step size in micrometer between each plane.Yes
PlanesintThe number of planes of the stack.Yes
GetZStackNamescommandGet a list of Z-Stack settings names.
response
Nameslist of stringList of Z-Stack names.Yes
MovecommandMove stage to a position.
NamestringName of the position settings.Yes
ZStackNamestringName of the Z-stack settings to use or null to move to center.Nonull
Planeint?Plane of the Z-stack to move to or null to move to center.Nonull
Offsetlist of doubleList of relative X, Y, Z offsets to add to the position.Nonull
response
PositionNamesGetcommandGet a list of position names.
response
Nameslist of stringList of position names.Yes
PositionSetcommandSet position settings.
NamestringName of the position settings to set.Yes
NewNamestringThe new name of the position settings or null to keep original value.Nonull
PositionXdouble?Position on X-axis to set or null to keep original value.Nonull
PositionYdouble?Position on Y-axis to set or null to keep original value.Nonull
PositionZdouble?Position on Z-axis to set or null to keep original value.Nonull
SkipPositionbool?Whether to skip the position or null to keep original value.Nonull
response
PositionGetcommandGet position settings.
NamestringName of the position settings.Yes
response
NamestringName of the position.Yes
PositionXdoublePosition on X-axis.Yes
PositionYdoublePosition on Y-axis.Yes
PositionZdoublePosition on Z-axis.Yes
SkipPositionboolWhether the position is skipped.Yes
SetZStackcommandSet Z-Stack settings.
NamestringName of the Z-stack settings to set.Yes
NewNamestringThe new name of the Z-stack settings or null to keep original value.Nonull
Stepdouble?The step size in micrometer between each plane to set or null to keep original value.Nonull
Planesint?The number of planes of the stack to set or null to keep original value.Nonull
response
TimeLapseController
ContinueFromPausecommandContinue from pause after a position.
response
GetAcquisitionSettingscommandGet acquisition settings.
response
TimeIntervaldoubleThe time interval in seconds between two time points.Yes
RepetitionsintThe number of time points to acquire.Yes
ExperimentNamestringThe name of the experiment.Yes
GetChannelSettingscommandGet the channel settings in a settings profile.
SettingsProfilestringThe name of the settings profile to get the channel settings from.Yes
NamestringThe name of the channel settings to get.Yes
response
NamestringThe name of the channel settings.Yes
EnabledboolWhether the channel should be acquired.Yes
AcquireNthTimePointintInterval at which the channel should be acquired. It is acquired at every specified number of time points.Yes
ColorenumThe channel default color.
Possible values listed below.
Yes
RedstringRed color.-
GreenstringGreen color.-
BluestringBlue color.-
CyanstringCyan color.-
MagentastringMagenta color.-
YellowstringYellow color.-
WhitestringWhite color.-
IlluminationstringThe name of the illumination settings to apply on acquisition controller device.Yes
ExposurestringThe name of the exposure settings to apply on acquisition controller device.Yes
GetChannelSettingsNamescommandGet the list of channel settings names in a settings profile.
SettingsProfilestringThe name of the settings profile to get the channel settings names from.Yes
response
Nameslist of stringList of channel settings names.Yes
GetSettingsProfilecommandGet a settings profile.
NamestringThe name of the settings profile to get.Yes
response
NamestringThe name of the settings profile.Yes
EnabledboolWhether the settings profile should be acquired.Yes
ZStackstringThe name of the Z-Stack settings to apply, single plane if null.Yes
Positionslist of stringThe list of positions to acquire. If null, all positions are acquired. If empty, no positions are acquired.Yes
ViewsenumThe view(s) to acquire.
Possible values listed below.
Yes
View1stringView 1-
View2stringView 2-
View1and2stringView 1 and 2-
GetSettingsProfileNamescommandGet the list of settings profile names.
response
Nameslist of stringList of settings profile names.Yes
NoPauseAfterPositioncommandDisable pause after every position has been acquired.
response
PauseAfterPositioncommandAsk time-lapse to pause after each position has been acquired.
response
SetAcquisitionSettingscommandSet acquisition settings.
TimeIntervaldouble?The time interval in seconds between two time points to set or null to keep original value.Nonull
Repetitionsint?The number of time points to acquire to set or null to keep original value.Nonull
ExperimentNamestringThe name of the experiment to set or null to keep original value.Nonull
response
SetChannelSettingscommandSet the channel settings in a settings profile.
SettingsProfilestringThe name of the settings profile to set the channel settings in.Yes
NamestringName of the channel settings to set.Yes
NewNamestringThe new name of the settings profile or null to keep original value.Nonull
Enabledbool?Whether the channel settings should be acquired or null to keep original value.Nonull
AcquireNthTimePointint?Interval at which the channel should be acquired or null to keep original value.Nonull
Colorenum?The channel default color or null to keep original value.
Possible values listed below.
Nonull
RedstringRed color.-
GreenstringGreen color.-
BluestringBlue color.-
CyanstringCyan color.-
MagentastringMagenta color.-
YellowstringYellow color.-
WhitestringWhite color.-
IlluminationstringThe name of the illumination settings to apply or null to keep original value.Nonull
ExposurestringThe name of the exposure settings to apply or null to keep original value.Nonull
response
SetSettingsProfilecommandSet a settings profile.
NamestringName of the settings profile to set.Yes
NewNamestringThe new name of the settings profile or null to keep original value.Nonull
Enabledbool?Whether the settings profile should be acquired or null to keep original value.Nonull
ZStackstringThe name of the Z-Stack settings to apply or null to keep original value.Nonull
IsSinglePlanebool?Whether the settings profile should be acquired in single plane or null to keep original value. If false, must be defined. If true, must be null.Nonull
Positionslist of stringThe list of positions to acquire or null to keep original value.Nonull
PositionsAllbool?Whether all positions should be acquired or null to keep original value. If true, must be null. If false, must be defined.Nonull
Viewsenum?The view(s) to acquire or null to keep original value.
Possible values listed below.
Nonull
View1stringView 1-
View2stringView 2-
View1and2stringView 1 and 2-
response
StartcommandStart a time-lapse.
response
StopcommandStop time-lapse.
response
WaitForPausecommandWait until time-lapse controller is paused after a position.
TimeoutintWaiting timeout in ms, -1 to wait indefinitely.No-1
response
PositionstringPosition which was paused.Yes
TimePointintTime point which was paused.Yes
TimeoutboolTrue if timeout, if paused falseYes
SnapcommandSnap an image.
Illumination1bool?If not null override user settings and enable or disable illumination 1.Nonull
Illumination2bool?If not null override user settings and enable or disable illumination 2.Nonull
FastboolWhether to bypass setting of settable devices (for example filter wheels will not move to defined settings).Nofalse
response