Simulated mode

BakingTray has a simulated or "dummy" mode which allows it to run on any OS with no hardware connected. Not all features are supported. The simulated mode was initially used only to assist in basic GUI development. More recently (April 2020 on dev) it was extended to allow preview and baking by loading correctly formatted and downsampled past data. There are some restrictions still: it's only been tested with one optical plane and channel. Nonetheless, quite a lot is possible and simulated mode can easily be extended to encompass more features.


BakingTray('dummyMode',true) % Start simulated mode

% Load and attach a preview stack:
hBT.scanner.attachPreviewStack(pStack) % Attach it to the scanner

For details on the preview stack format see: Everything below is tested with stacks downsampled to 20 µm per pixel.

Interacting with the dummy scanner

The main window has a "Scanner" menu. Go there and select "Open dummy scanner": a new window opens. Here you can select "Scanner > Acquire Tile" to see the current physical section (top) and the current tile (bottom). The position of the virtual stage in the stack is indicated by the red cross.

You can open the Prepare GUI (at the command line: hBTview.startPrepareGUI), edit the stage position and acquire a new tile. You can select "Scanner > Start Focus" to pan around the sample with the on-screen arrows or WASD whilst seeing the current tile update. When you are finished you can "Scanner > Stop Focus".

Preview and Bake

Use the GUI to set a path to save the data to or at the command line do: hBT.sampleSavePath='~/Desktop/TEMP'; or similar. Open the prepare GUI (at the command line": hBTview.startPreviewSampleGUI). Press "Preview Scan" and you will see the the image appear tile-wise whilst the dummyScanner window updates. For more advanced testing, you might want the GUI to update faster. In this case you can disable updates of the dummyScanner window: hBT.disabledAxisReadyCheckDuringAcq=true; You can also control how many tiles must be acquired before the preview window updates. For example compare hBTview.view_acquire.updatePreviewEveryNTiles=2; to hBTview.view_acquire.updatePreviewEveryNTiles=20;

Bake also works. You can slightly speed up longer acquisitions by setting the following:

hBT.disabledAxisReadyCheckDuringAcq=true; % Skips some methods we don't care about

% Reduce the number of screen updates for speed reasons

%Reduce the number of log messages

Stitching simulated data

The easiest way is to name you simulated rig something like "TEST" then make a stitchitConf_TEST.ini file. In that file under [tile] set:


You should now get acceptable stitching.

Last updated