Image acquisition software for mesoSPIM light-sheet microscopes. A mesoSPIM (mesoscale selective plane illumination microscope) is optimized for fast imaging of large (many cm³) cleared tissue samples at near-isotropic resolution. Currently, more than 10 mesoSPIM setups are operational around the world.
Parts lists, drawings, and instructions for building a mesoSPIM can be found in the mesoSPIM wiki.
The mesoSPIM is a versatile light-sheet microscope for imaging cleared tissue samples. It is compatible with all major clearing approaches - including CLARITY - and optimized for quickly creating large-field-of-view overview datasets of whole mouse brains.
If you are updating
mesoSPIM-control from a previous version:
please add new sections from the demo config file
to your old configuration file in order to unlock all new features.
- Windows 7 or Windows 10
- Python >=3.6
- Hamamatsu DCAM API when using Hamamatsu Orca Flash 4.0 V2 or V3 sCMOS cameras. To test camera functionality, HCImage can be used.
- PVCAM and PVCAM-SDK when using Photometrics cameras (under development). In addition, the
PyVCAMPython package is necessary (Link).
- Software for Physik Instrumente stages if a PI stage is used. To test the stages, PI MicroMove can be used.
- Software for Steinmeyer Mechatronics / Feinmess stages using Galil drivers if such a stage is used. To test the stages, GalilTools can be used.
- Robotis DynamixelSDK for Dynamixel Zoom servos. Make sure you download version 3.5.4 of the SDK.
mesoSPIM-control is usually running with Anaconda using a >=3.6 Python.
(optional) Create and activate a Python 3.6 environment from Anaconda prompt (you can use any name instead of
conda create -n py36 python=3.6 conda activate py36
The step above is optional because the latest Python 3.8 is backward compatible with Python 3.6 code.
Many libraries are already included in Anaconda. Install mesoSPIM-specific libraries:
pip install -r requirements-anaconda.txt
For a clean (non-Anaconda) python interpreter, install all required libraries:
pip install -r requirements-clean-python.txt
Camera libraries are not hosted on PyPi and need to be installed manually:
- PyVCAM when using a Photometrics camera
- pco (
python -m pip install pco) when using a PCO camera (Link). A Version ≥0.1.3 is recommended.
Preparing python bindings for device drivers
- For PI stages, copy
C:\ProgramData\PI\GCSTranslator\PI_GCS2_DLL_x64.dllin the main mesoSPIM folder:
- For zoom control via dynamixel servos, copy the dynamixel Python file
mesoSPIM/src/devices/zoom/dynamixel/You will also need to edit this file to point to the correct Dynamixel dll. You could copy these files into the
zoom/dynamixelfolder to keep things neatly in one place.
Prepare a configuration file and wire the NI DAQ
The configuration files are in the
The "demo" files have some devices replaced with dummy devices for testing purposes.
You can start with one of those if you wish or proceed directly to a non-demo config file.
Choose one of the ZMB config files as appropriate and work through each section, filling it out for your hardware:
- You can rename your DAQ devices in NI MAX to match the names in the config file (PXI6259 and PXI6733).
master_trigger_out_lineshould be connected to the line which serves as the trigger source for the camera and the galvo/etl task. At time of writing that means the master trigger out (
PXI6259/port0/line1) should be connected to
- On Toptica lasers, analog line 1 is the longest wavelength and line 4 is the shortest wavelength. Use BNC T connectors to split each analog output line to both lasers.
- You will need to set the ThorLabs shutter controllers to run on TTL input mode.
From Anaconda prompt
conda activate py36 python mesoSPIM_Control.py
The software will now start. If you have multiple configuration files you will be prompted to choose one.
From start_mesoSPIM.bat file
start_mesoSPIM.bat file in text editor and configure Anaconda and
py36 path to your own.
Once done, launch mesoSPIM by double-clicking the file.
Optionally, create a Windows shortcut (via right-click menu) and place it e.g. on your desktop.
Using shortcut saves a lot of time.
Starting with interactive console
You may also run the software with an interactive IPython console for de-bugging:
python mesoSPIM_Control.py -C
For example, executing
mSpim.state.__dict__ in this console will show the current mesoSPIM state.
If there are problems with PyQt5 such as
ModuleNotFoundError: No module named 'PyQt5.QtWinExtras after starting
mesoSPIM-control, try reinstalling PyQt5 by:
python -m pip install --user -I PyQt5 and
python -m pip install --user -I PyQt5-sip)
Documentation for users
For instructions on how to use mesoSPIM-control, please check out the documentation here.