This toolbox provides functions to load mesoscope data in Matlab. It relies on lazy data structures to load on demand images from sequences.
The toolbox requires Matlab (tested on Matlab 2016b) and the following packages:
- TIFFStack
- MappedTensor
- TensorStack class
- TensorView class
- uipickfiles (optional, used in example)
Retrieve a copy if this repository, cloning it with git. This can be achieved by to typing the following command in a terminal:
git clone https://github.com/BaselLaserMouse/MesoscopeLoader
Then, in Matlab, go to the toolbox folder and use the toolbox_setup
function
to download the dependencies and properly configure Matlab search path.
Do not forget to save Matlab search path for future use.
Do not manually add the repository folder to the path, as the hidden .git folder will likely cause troubles.
Loading stacks of images relies on the stacksload
function. Then, one needs
to (virtually) split each ScanImage ROI using the split_mroi_stack
function.
Typical use look like this:
% load a set of .tif files
stackfolder = uigetdir; % can be replaced by uipickfiles, much better
[stack, header] = stacksload(stackfolder);
% get each ScanImage ROI in a different stack object
meso_stacks = split_mroi_stack(stack, header)
Documentation of each function be can accessed from Matlab command line using
help <function name>
and doc <function name>
.