FLIM phasor plotter
A plugin that performs phasor plot from TCSPC FLIM data.
Napari-flim-phasor-plotter is a napari plugin to interactively load and show raw fluorescence lifetime imaging microscopy (FLIM) single images and series and generate phasor plots. These are Fourier transforms of the decay data being visualized using the napari-clusters-plotter plotter, adapted to suit the FLIM context. This allows qualitative and quantitative downstream analysis of FLIM images.
Open a FLIM image to visualize it both as a 'FLIM image series' being a sequence of intensity images each corresponding to an individual time point of the FLIM 'micro-time', plus as a timely summed up image. Scrolling through the FLIM time series provides a first glimpse of lifetimes across image regions.
Call the plugin from the menu
Plugins > FLIM phasor plotter > Make FLIM Phasor Plot to generate a phasor plot by pixel-wise Fourier transformation of the decay data. Hereby, select the FLIM image to be used, specify the laser pulse frequency if not read properly from metadata. Define an intensity threshold to exclude pixels of low photon counts, optionally a median filter, and a harmonic for optimal visualization.
Run creates the phasor plot and an additional labels layer in the layer list. Below is a demonstration:
Change the color-code of the phasor plot to a density plot of various ‘Colormaps’ from the pulldown
Expand for advanced options and select
HISTOGRAM. Manually encircle a region of interest in the phasor plot to highlight the corresponding pixels in the newly created image layer. Hold ‘Shift’ to select and visualize several clusters to investigate image regions of similar FLIM patterns.
This plugin integrates with napari-clusters-plotter plugin.
This plugin can read the following FLIM file types:
This plugin works with the following data shapes:
- 2D FLIM images (actually 3D data where FLIM counts are in the first axis).
- 3D FLIM images (actually 4D data where FLIM counts are in the first axis).
- 3D timelapse FLIM images (actually 5D data where FLIM counts are in the first axis).
- Multichannel '.tif' or '.zarr' data may need to be loaded separately.
The plugin outputs data axes in the following order (data from multiple detectors are displayed as distinct napari layers):
It also outputs the standard intensity image in another layer by summing the
If a collection of raw (uncompressed) images are larger than 4GB, we recommend converting them to
.zarr. This can be done via
Plugins > napari-flim-phasor-plotter > Convert to zarr.
Warning: In the current version, lazy loading with
.zarr is available, but processing may still load all data into memory, so keep track of your memory usage.
If you have multiple slices or time-points as separated files, you can choose a folder containing the files. In order for the plugin to properly build a stack, the file names must contain some indication about which slice or time-point they represent, i.e., each file name should contain a
_z followerd by a number.
Here are a few example templates:
- 3D timelapse:
You can install
napari-flim-phasor-plotter via pip. Follow these steps from a terminal.
We recommend using
mamba-forge whenever possible. Click here to choose the right download option for your OS.
If you use
mamba-forge, replace the
conda term whenever you see it below with
Create a conda environment:
conda create -n napari-flim-phasor-env python=3.9
Activate the environment:
conda activate napari-flim-phasor-env
napari-clusturs-plotter (plus git if on Windows):
conda install -c conda-forge napari==0.4.17 napari-clusters-plotter git pyqt
Optional: we strongly recommend having the
devbio-napari plugin bundle also installed for post-processing. This can be done with:
conda install -c conda-forge devbio-napari
napari-flim-phasor-plotter plugin with:
pip install napari-flim-phasor-plotter
Alternatively, clone this repository and install the latest plugin development version with:
pip install git+https://github.com/zoccoler/napari-flim-phasor-plotter.git
Contributions are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.
Distributed under the terms of the BSD-3 license, "napari-flim-phasor-plotter" is free and open source software
If you encounter any problems, please file an issue along with a detailed description.
- 18 August 2023
- 17 August 2023
- Information not submitted
- Stars: 5
- Forks: 1
- Issues + PRs: 14