Skip to content

lukaslang/ofmt

Repository files navigation

OFMT - Optical Flow for Microtubule Analysis

Lukas F. Lang (ll542@cam.ac.uk)
Department of Applied Mathematics and Theoretical Physics
University of Cambridge, UK.
http://www.damtp.cam.ac.uk/people/ll542/

1. Introduction

This is a MATLAB implementation as described in:

Drechsler, M. and Lang, L. F. and Dirks, H. and Burger, M. and Schönlieb, C.-B. and Palacios, I. M. Optical flow analysis reveals that Kinesin-mediated advection impacts on the orientation of microtubules, 2019.

If you use this software in your work please cite the abovementioned paper in any resulting publication.

BibTeX:

@article {DreLanDirBurSchoPal19,
    author = {Drechsler, M. and Lang, L.~F. and Dirks, H. and Burger, M. and Schönlieb, C.-B. and Palacios, I.~M.},
    title = {Optical flow analysis reveals that Kinesin-mediated advection impacts on the orientation of microtubules},
    year = {2019},
    % journal = {bioRxiv}
    % elocation-id = {XXXXXX},
    % doi = {10.XXXX/XXXXXX},
    % publisher = {Cold Spring Harbor Laboratory},
    % url = {https://www.biorxiv.org/content/early/YYYY/MM/DD/XXXXXX},
    % eprint = {https://www.biorxiv.org/content/early/YYYY/MM/DD/XXXXXX.full.pdf},
}

See Supplementary Methods for details on the models and the implementation.

2. License & Disclaimer

Copyright 2017 Lukas Lang.

This file is part of OFMT. OFMT is free software: you can redistribute it
and/or modify it under the terms of the GNU General Public License as
published by the Free Software Foundation, either version 3 of the License,
or (at your option) any later version.

OFMT is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 
details.

You should have received a copy of the GNU General Public License along
with OFMT.  If not, see <http://www.gnu.org/licenses/>.

For the full license statement see the file COPYING.

Moreover, this work incorporates source code from the colour wheel by 
Deqing Sun, Department of Computer Science, Brown University. The license 
statement can be found in the respective files.

In addition, two files were adapted from code shared by Hendrik Dirks.

3. Requirements

This software was originally written for and tested with MATLAB R2017b.

The following libraries are required for parts of this sofware:

export_fig: used for producing high quality figures from the results.
GitHub: https://github.com/altmany/export_fig
URL: http://www.mathworks.com/matlabcentral/fileexchange/23629-exportfig
Version used: bb6c842

>> git clone https://github.com/altmany/export_fig.git

circstat-matlab: used to compute statistics of circular quantities.
GitHub: https://github.com/circstat/circstat-matlab
URL: https://uk.mathworks.com/matlabcentral/fileexchange/10676-circular-statistics-toolbox-directional-statistics
Version used: cdbb5ca

>> git clone https://github.com/circstat/circstat-matlab.git

circHist: used to plot angular histograms.
GitHub: https://github.com/zifredder/CircHist
Version used: 535f8f4

>> git clone https://github.com/zifredder/CircHist

4. Usage

For easier use we provide a startup script (startup.m), which sets up the 
MATLAB search path. It includes required libraries and adds required 
subdirectories. Make sure to download the required packages and to set the 
library paths properly. Then simply run the startup script.

To run the test cases execute

>> runtests('test')

In order to run the software with real data set the path to your files
in the script:

- datapath.m

Make sure your data is organised in the way as in the folder 'data'. This
folder contains a minimal dataset required to run the code.

The figures in the paper were created with the following scripts:

- runflowcomputation.m

This script takes all the data specified in datapath.m and performs the
two-step analysis. In order to use a GPU set the flag to the correct ID.
On Unix it's easiest to use the script

>> sh runflowcomputation.sh &

to run execute the computations. Afterwards, the log file
runflowcomputation.log can be analysed with the script outputstats.m.

- runflowanalysis.m

Takes the results of the computations and creates all the plots. Note that
the folder 'data' contains only one sample dataset. In order to run this
script and create the aggregated plots, multiple image sequences are
required.

- plotoverlay.m

This script allows to overlay colour-coded velocity fields and image
sequences.

4. Acknowledgements

We gratefully acknowledge the support of NVIDIA Corporation with the
donation of the Quadro P6000 GPU used for this research.

About

Optical Flow for Microtubule Analysis

Resources

License

Stars

Watchers

Forks

Packages

No packages published