Napari-time_series_plotter (TSP) is a plugin for the napari
ndimensional image viewer.
TSP adds live plotting of time-resolved images to napari. You can select and visualize pixel/voxel or ROI mean values from one or multiple image layers as intensity-over-time line plots (The first image dimension is handled as time) and save the figures or the underlying time series data as CSV file. TSP supports 3D to nD images (3D: t+2D, nD: t+nD).
Plotting is handeled by the Explorer
widget, it offers three different plotting modes: Voxel, Shapes, Points
--> Voxel mode offers live plotting while moving the cursor over an image layer
--> Shapes mode offers shape-based ROI plotting the ROI combination method can be one of [Mean, Median, STD, Sum, Min, Max]; multiple ROIs can be plotted simultaneously
--> Points mode offers simultaneous, point-based plotting of multiple voxels
You can modify and save the plots through the canvas toolbar.
Plotting powered by napari-matplotlib
.
Viewing the time series as a table is handled by the Inspector
widget. You can load the data you've plotted and inspect the single time point values of each selection. The columns are named like the plots in the Explorer
. You can copy the whole tabe or a selection to the clipboard or directly expot it to a CSV file to save the time series.
You can either install the latest version via pip or conda.
pip:
pip install napari-time-series-plotter
or download the packaged tar.gz
file from the release assets and install it with
pip install /path/to/file.tar.gz
conda:
conda install -c conda-forge napari-time-series-plotter
Alternatively, you can install the plugin directly in the napari
viewer plugin manager, the napari hub, or the release assets.
To install the latest development version install directly from the relevant GitHub branch.
TSP_basic_and_voxel_plotting_demo.webm
TSPExplorer
widget in the Plugins
tab of the napari viewerLayerSelector
to choose the image layers you want to source for plottingThe Options
tab offers multiple options to customize your plot.
The plot can be modified and saved through its toolbar above.
Options
tab (Voxel mode is the default).LayerSelector
to choose the image layers you want to source for plotting.Options
tab (Default: mean).Options
tab (Voxel mode is the default).LayerSelector
to choose the image layers you want to source for plotting.TSPInspector
widget in the Plugins
tab of the napari viewerInspector
You can copy the whole table or a selection to your clipboard or export it to CSV file through the buttons above.
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-time_series_plotter" is free and open-source software
If you encounter any problems, please file an issue along with a detailed description.
This napari plugin was generated with Cookiecutter using @napari's cookiecutter-napari-plugin template.
Images used in the demo gif were taken from The Cancer Imaging Archive
DOI: https://doi.org/10.7937/K9/TCIA.2015.VOSN3HN1
Images: 1.3.6.1.4.1.9328.50.16.281868838636204210586871132130856898223
1.3.6.1.4.1.9328.50.16.254461916058189583774506642993503110733