Microscope Commands Documentation

Leica logo

Microscope Control Software version 3.0.1.65

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
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
PingcommandPing to check that component is able to receive commands.
response
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
AcquisitionController
AcquirecommandGenerate acquisition controller signals.
IlluminationSettingsstringName of the illumination settings to use.Yes
ExposureSettingsstringName of the exposure settings to use.Yes
response
GetTiltFactorscommandGet the tilt factors associated with the current objective block.
response
Illumin1TiltFactordoubleThe factor of scanner 1 to tilt the scan plane for illumination 1.Yes
Illumin2TiltFactordoubleThe factor of scanner 1 to tilt the scan plane for illumination 2.Yes
SaveTiltFactorscommandSave the tilt factors associated with the current objective block to persistent storage.
response
SetTiltFactorscommandSet the tilt factors associated with the current objective block.
Illumin1TiltFactordouble?The new factor of scanner 1 to tilt the scan plane for illumination 1 or null to keep the current value.Nonull
Illumin2TiltFactordouble?The new factor of scanner 1 to tilt the scan plane for illumination 2 or null to keep the current value.Nonull
response
Camera
DisplayedViewSetcommandSet the displayed view in image viewer.
ViewintThe index of the view to display, one based.Yes
response
GetSensorInfocommandGet sensor information.
response
WidthintWidth of the sensor in pixels.Yes
HeightintHeight of the sensor in pixels.Yes
Temperaturedouble?Current temperature of the sensor in degree Celsius if available.Nonull
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
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
FilterWheel
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
IlluminationModule
CurrentIlluminationGetcommandGet values currently applied on the hardware.
response
NamestringName of illumination settings.Yes
TranslationXdoubleThe translation along X-axis in um.Yes
RotationXdoubleThe rotation along X-axis in degrees.Yes
TranslationZdoubleThe translation along Z-axis in um.Yes
RotationZdoubleThe rotation along Z-axis in degrees.Yes
GetIlluminationListcommandGet the list of illumination settings.
response
Nameslist of stringThe names of the illumination settings.Yes
GetObjectiveBlockAlignmentcommandGet the objective block alignment associated with the current immersion medium.
NamestringName of the illumination settings to get.Yes
response
NamestringName of illumination settings.Yes
ImmersionMediumstringThe name of the immersion medium.Yes
TranslationXdoubleThe translation along X-axis in um.Yes
RotationXdoubleThe rotation along X-axis in degrees.Yes
TranslationZdoubleThe translation along Z-axis in um.Yes
RotationZdoubleThe rotation along Z-axis in degrees.Yes
IlluminationGetcommandGet current illumination settings.
NamestringName of the illumination settings to get.Yes
response
NamestringName of illumination settings.Yes
TranslationXdoubleThe translation along X-axis in um.Yes
RotationXdoubleThe rotation along X-axis in degrees.Yes
TranslationZdoubleThe translation along Z-axis in um.Yes
RotationZdoubleThe rotation along Z-axis in degrees.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
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
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
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
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
SetObjectiveBlockAlignmentcommandSet the objective block alignment associated with the current immersion medium. The modified alignment are not persistent, unless the update command is also sent.
NamestringName of the illumination settings to set.Yes
TranslationXdouble?The translation in X in um to apply. If null, keep the current value.Nonull
RotationXdouble?The rotation in X in degrees to apply. If null, keep the current value.Nonull
TranslationZdouble?The translation in Z in um to apply. If null, keep the current value.Nonull
RotationZdouble?The rotation in Z in degrees to apply. If null, keep the current value.Nonull
response
UpdateObjectiveBlockAlignmentcommandUpdate the objective block alignment associated with the current immersion medium based on the current alignment of the given illumination. The updated alignment are persistent.
IlluminationNamestringName of the illumination settings to update, if null, update all illuminations.Nonull
response
System
AuthenticatecommandAuthenticate to the system with a secret key to start a session.
AuthenticationSecretKeystringThe authentication secret key. Software must have been started once to generate this key.Yes
response
GetComponentListcommandGet a list of names and types of components connected to the microscope.
response
ComponentNameslist of stringList of component names.Yes
ComponentTypeslist of stringList of component types.Yes
GetComponentTypecommandGet the type of a component.
QueryComponentNamestringThe name of the component to get the type for.Yes
response
ComponentTypestringType of the component.Yes
ObjectiveBlock
GetObjectiveBlockInfocommandGet the current information about the objective block.
response
ObjectiveBlockstringThe name of the objective block currently used.Yes
ObjectivestringThe name of the objective used.Yes
IsMultiImmersionboolWhether the objective supports multiple immersion media.Yes
ViewsenumThe available views for the current objective.
Possible values listed below.
Yes
View1stringView 1-
View2stringView 2-
View1And2stringView 1 and 2-
IlluminationMagnificationdoubleThe effective magnification of the illumination objective, taking into account the current immersion medium refractive index.Yes
DetectionMagnificationdoubleThe effective magnification of the detection objective, taking into account the current immersion medium refractive index.Yes
DetectionNumericalAperturedoubleThe effective numerical aperture of the detection objective, taking into account the current immersion medium refractive index.Yes
ImmersionMediumstringThe current immersion medium.Yes
RefractiveIndexdoubleThe refractive index of the current immersion medium.Yes
SetShadingcommandSet the shading information for the current immersion medium.
ShadingCorrectionFactorslist of dictThe shading correction factors for each view. The factors allow the reconstruction of a polynomial function that maps the measured intensity to the corrected intensity.
Keys of dict listed below.
Yes
CdoubleThe constant term.Yes
HLdoubleThe horizontal linear coefficient.Yes
VLdoubleThe vertical linear coefficient.Yes
TQdoubleThe tilted quadratic coefficient.Yes
HQdoubleThe horizontal quadratic coefficient.Yes
VQdoubleThe vertical quadratic coefficient.Yes
response
Photomanipulation
OffsetsBaseGetcommandGet base offset values from photomanipulation laser.
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 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
StageXYZ
ForgetCurrentPositioncommandMake stage forget position name on which it's located.
response
GetCoordinatescommandGet current coordinates of the stage.
response
Coordinateslist of 3 doublesThe current coordinates of the stage.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 3 doubles?List of relative X, Y, Z offsets to add to the position.Nonull
response
MoveTocommandMove stage to specified position.
Coordinateslist of 3 doublesThe target coordinates to move to.Yes
MoveOrderstringThe order in which to move the axes (e.g., "XYZ", "XZY").No"XYZ"
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
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
TimeLapseController
ContinueFromPausecommandContinue from pause after a position.
response
NoPauseAfterPositioncommandDisable pause after every position has been acquired.
response
PauseAfterPositioncommandAsk time-lapse to pause after each position has been acquired.
response
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
ExposureTimeint?If not null override user settings and set the exposure time in milliseconds.Nonull
ScanRangeint?If not null override user settings and set the scan range in micrometers.Nonull
ScanFullFOVbool?If not null override user settings and set whether to scan the full field of view.Nonull
Viewsenum?If not null override user settings and set the view(s) to acquire.
Possible values listed below.
Nonull
View1stringView 1-
View2stringView 2-
View1And2stringView 1 and 2-
SettableDeviceSettingsdict (string => string)If not null override user settings and set the defined settable device.Nonull
FastboolWhether to bypass setting of settable devices (for example filter wheels will not move to defined settings).Nofalse
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