> For the complete documentation index, see [llms.txt](https://bakingtray.mouse.vision/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bakingtray.mouse.vision/readme.md).

# BakingTray Documentation

BakingTray is a complete open source software platform for serial section 2-photon tomography from the [Sainsbury Wellcome Centre Advanced Microscopy Facility](https://swcmicroscopy.com/). It is based around [ScanImage](https://www.mbfbioscience.com/products/scanimage/) and runs within [MATLAB](http://www.mathworks.com/). BakingTray was inspired by the [TeraVoxel](https://github.com/TeravoxelTwoPhotonTomography) ([Economo, et al](https://elifesciences.org/articles/10566)) and [MouseLight](https://github.com/MouseLightPipeline) ([Winnubst, et al](https://www.sciencedirect.com/science/article/pii/S0092867419308426?via%3Dihub)) projects.

![](/files/eTZDFGgxZlUM01xUVCqs)

## Who is it for?

This software is aimed at technically-minded people who want to set up serial section 2-photon tomography in their lab or imaging facility. It has run in production environments for about a decade and provides full control over all aspects of the process. Setting it up requires good technical skills, experience with ScanImage, and the ability to run a 2-photon microscope. BakingTray will run on any microscope hardware supported by ScanImage.

## Current features

* Easy sample set up: take a fast preview image of the sample then draw a box around the area to be imaged. An Auto-ROI feature is available for adaptively imaging only the tissue.
* Acquisition of up to four channels using resonant or linear scanning.
* A low-resolution preview image of the current section is assembled in real time.
* Graceful acquisition abort (either immediately or at the end of the current section) and pausing.
* Automatically halts if the laser drops out of modelock.
* PMTs and laser automatically switch off at the end of the acquisition.
* Support for multiple lasers via Scanimage.
* Easy control of illumination as a function of depth via ScanImage.
* Integrates with our [StitchIt](https://github.com/SWC-Advanced-Microscopy/StitchIt) software for assembling the stitched images from raw tiles.
* Easily resume a previously halted acquisition.
* Imaging of multiple samples at once.
* Modular API allows developers to easily extend the software or adapt it to different hardware.
* Slack messages on acquisition completion.

## What do the results look like?

See the [Gallery](/developers/gallery.md) for images.

![Detail from an sst/tdTomato transgenic line showing Purkinje cell axons in the cerebellar white matter](/files/va8D2Kq8UCXBJA9V5eAl)

## How to get it?

Find the project [on GitHub](https://github.com/SWC-Advanced-Microscopy/BakingTray).
