Using Suite2p with Scanbox

Marius Pachitariu and Carsen Stringer released a Python version of their Suite2p pipeline for two-photon imaging. So I decided to take this tool for a test drive with data collected from Scanbox. At the moment, Suite2p takes tiff and hdf5 files, so we first decided to write a function to convert *.sbx to *.h5 files. …

Read More

New alignment and segmentation tools

Improved alignment and segmentation tools have now been released in the latest version of Scanbox, while retaining much of the functionality of the last version. sbxaligntool. The new alignment tool, shown below, adds batch processing of files, including the processing of eye and ball motion if those data are present.  A region-of-interest (ROI) can optionally be…

Read More

Improvements in alignment and segmentation tools

Two GUIs to align (sbxaligntool) and segment (sbxsegmenttool) two-photon imaging data from Scanbox were recently updated. Sbxaligntool allows users to perform alignment using rigid translation or a non-rigid deformation of the image stack. The tool now uses all the cores available in your computer along with the GPU.  Rigid alignment can take place at near…

Read More

Non-rigid image alignment in twenty lines of Matlab

We have previously discussed rigid and non-rigid image alignment algorithms for calcium imaging data. If you have the image processing toolbox, a particularly compact solution for non-rigid image registration can be written in ~20 lines of code or so.  The code below returns a displacement field for each frame in the image sequence (output variable ‘disp’) that needs…

Read More

Using auto-stabilization

Real-time auto-stabilization in Scanbox Yeti is achieved by tracking the displacement of 2D features in a number of small windows relative to a reference image.  We prefer tracking cells within a handful of small windows because slow gradients in the image can easily bias the resulting estimates for large regions. Here are some step-by-step instructions on how…

Read More

Recursive Image Alignment and Statistics

If it is awake, it will move.  And if it moves, your images are likely to do it too.  This means that, almost surely, the first step in processing your data will be to align (or register) all the images in the sequence. This is such a basic problem that there are probably as many solutions…

Read More