Microscope Commands Documentation

Leica logo

Microscope Control Software version 2.2.0.2

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 camera.
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
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
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
TimeLapseController
ContinueFromPausecommandContinue from pause.
response
NoPauseAfterPositioncommandDisable pause after every position has been acquired.
response
PauseAfterPositioncommandAsk time-lapse to pause after each position has been acquired.
response
StartcommandStart a time-lapse.
response
StopcommandStop time-lapse.
response
WaitForPausecommandWait until time-lapse controller is paused.
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