A Python implementation of 'dual-coding'
Alternatives To Nanslice
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Pynq1,62843 days ago12June 16, 202234bsd-3-clauseJupyter Notebook
Python Productivity for ZYNQ
Qnn Mo Pynq167
2 years ago15bsd-3-clauseJupyter Notebook
Ultra96 Pynq142
9 days agoapache-2.0Jupyter Notebook
Board files to build Ultra 96 PYNQ image
Pynq Computervision100
3 years ago3otherJupyter Notebook
Computer Vision Overlays on Pynq
Risc V On Pynq76
4 years ago7otherTcl
RISC-V Integration for PYNQ
4 months ago23November 12, 201912mitJupyter Notebook
A Python 3 library to make psychrometric charts and overlay information on them.
Pynq Project65
4 years ago2Jupyter Notebook
PYNQ, Neural network Language model, Overlay
Alveo Pynq38
14 days ago7June 01, 20213apache-2.0Jupyter Notebook
Introductory examples for using PYNQ with Alveo
6 months ago3June 26, 20203mpl-2.0Python
A Python implementation of 'dual-coding'
6 days ago21bsd-3-clauseJavaScript
ESASky Widget for Jupyter Notebook
Alternatives To Nanslice
Select To Compare

Alternative Project Comparisons

Not Another Neuroimaging Slicer - nanslice

Credit / Blame / Contact - Tobias Wood - [email protected]

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at

If you find the tools useful the author would love to hear from you.

Brief Description


This is a pure Python module for creating slices through neuro-imaging datasets. The main motivation for building this was to implement the 'Dual-Coding' visualisation method that can be found in this paper: However, it then expanded to include standard visualisation methods, and an interactive viewer for Jupyter notebooks.

Documentation can be found at

A Jupyter Notebook demonstrating the module can be found at When using a Jupyter Notebook (as a standalone) or in VS Code, you need to choose the widget backend:

import matplotlib
%matplotlib widget

Unfortunately, the widget backend is not supported yet in PyCharm or Colab.

In dual-coding instead of plotting thresholded blobs of T-statistics or p-values on top of structural images, transparency (or alpha) is used to convey the p-value of T-statistic, while color can be used to convey the effect size or difference in group means etc. Finally, contours can be added at a specific p-value, e.g. p < 0.05. In this way, 'dual-coded' overlays contain all the information that standard overlays do, but also show much of the data that is 'hidden' beneath the p-value threshold.

Whether you think this is useful or not will depend on your attitude towards p-values and thresholds. Personally, I think that sub-threshold but anatomically plausible blobs are at least worth showing to readers, who can then make their own mind up about significance.

This is a sister project to spinicist/QUIT. I mainly work with quantitative T1 & T2 maps, where group mean difference or "percent change" is a meaningful, well-defined quantity. If you use these tools to plot "percent BOLD signal change", I hope you know what you what you are doing and wish you luck with your reviewers.


NaNSlice is available on PyPI. Run pip install nanslice to install the stable version. Alternatively, clone the repository from Github and then run pip install -e . to use the development version.


These are Python scripts. The core sampling/blending code was written over 3 evenings while on the Bruker programming course. Most of nanviewer was written in literally 4 hours across a Monday and Tuesday. After a refactoring, it is surprisingly responsive on my MacBook. The Jupyter viewer, on the other hand, is not wildly performant. Patches are welcome!

Popular Jupyter Notebook Projects
Popular Overlay Projects
Popular Data Processing Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.