Starting a worker instance from the command line

Worker instances can be started from the command line. We need to specify the port on which the master listens for workers using the -p option. This is listed in the Output window when a master instance is opened that is configured to start the worker server:



If the line is not shown, then the worker server is not started, it can be started by starting a worker through perClass Mira, or by changing the value of the startWorkerServer key in mira.ini to true and restarting perClass Mira.


The following command will create a new worker instance connected to our master:


perClass_Mira_gpu.exe -p 51315


Note that this instance will then use the mira.ini file as configuration file, this not recommended since the master is using it as well. The extra -i option can be specified to define the filename (or complete path) to an .ini file to use. If the file does not yet exist, then it is copied from the original mira.ini file. To use the same .ini file that would be used when starting a worker through the master instance the following command can be used:


perClass_Mira_gpu.exe -i mira_worker.ini -p 51315

Starting a worker on a different computer

Worker instances may be started on a different computer than the master. The use-case is that we may have a specific machine already configured for acquisition from a given camera (for example using a Camera Link PCI card needed for a SWIR system).


We may start the worker on any machine, using the -h option to specify the IP address of the computer running the perClass Mira master instance:


perClass_Mira_gpu.exe -p 51315 -h 192.168.10.128

Changing worker background color

In order to change the worker's background color, the worker's .ini file file should be modified, this is the file provided by the -i option or mira_worker.ini when started through the master instance. These files are created automatically the first time the user starts a worker instance.


For example, we can adjust the workerColorR, G, and B options in the .ini file as follows:

workerColorR=1.8

workerColorG=1.2

workerColorB=0.1


Then we can start a perClass Mira worker instance from a command line:


perClass_Mira_gui.exe -i mira_worker.ini -p 51315


And now our worker window will have a distinct light-brown color: