CASFI is a cell segmentation and analysis code written in Matlab to infer electrical activity of cells from fluorescent images. This assumes you are using a voltage-sensitive dye like BeRST, where intensity is proportional to voltage.
Increases in voltage in cells are reflected by a linear increase in fluorescence in BeRST, (Delta F/ F). With high resolution and fast enough framerates, this can be used to see neurons fire.
After segmentation and background subtraction, Delta F/F traces are made from a (TIF) stack of fluorescent images and after several steps, we infer and visualize the electrical activity from the cells. We can then use a rule-based method (e.g. z-score > 1.5) to label spikes when looking at neurons, AKA neuronal firing.
- Pre-process the image
- Segmentation (identify each cell object)
- Background subtraction
- Map electrical activity in cells from change in fluorescence
- Visualize activity
Call the main Matlab script, with parameters:
runAll('../data/6e6ACSF_0ms_3_MMStack.tif',70,2000,0.7,70)
which points to the TIF stack 6e6ACSF_0ms_3_MMStack.tif and passes image processing parameters.
Details and comments in runAll.m...