BakingTray
Search…
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.

Starting

1
BakingTray('dummyMode',true) % Start simulated mode
2
3
% Load and attach a preview stack:
4
load('/Path/To/Stack/CA_123_ApreviewStack.mat')
5
hBT.scanner.attachPreviewStack(pStack) % Attach it to the scanner
Copied!
For details on the preview stack format see: https://github.com/raacampbell/autofinder 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:
1
hBT.disabledAxisReadyCheckDuringAcq=true; % Skips some methods we don't care about
2
3
% Reduce the number of screen updates for speed reasons
4
hBT.scanner.displayAcquiredImages=false;
5
hBTview.view_acquire.updatePreviewEveryNTiles=50;
6
7
%Reduce the number of log messages
8
hBT.logMessageThreshScreen=6;
9
hBT.logMessageThreshFile=6;
10
hBT.yAxis.logMessageThreshScreen=7;
11
hBT.yAxis.logMessageThreshFile=7;
12
hBT.xAxis.logMessageThreshScreen=7;
13
hBT.xAxis.logMessageThreshFile=7;
14
hBT.zAxis.logMessageThreshScreen=7;
15
hBT.zAxis.logMessageThreshFile=7;
Copied!

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:
1
doDrop=0
2
tileRotate=2
3
tileFlipLR=0
Copied!
You should now get acceptable stitching.