Skip to main content

Scripts to slice and display neuroimages (probably stored in nifti format)

Project description

Not Another Neuroimaging Slicer - nanslice

Credit / Blame / Contact - Tobias Wood - tobias.wood@kcl.ac.uk

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 http://mozilla.org/MPL/2.0/.

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

Brief Description

Screenshot

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: http://dx.doi.org/10.1016/j.neuron.2012.05.001. However, it then expanded to include standard visualisation methods, and an interactive viewer for Jupyter notebooks.

Documentation can be found at https://nanslice.readthedocs.io/en/latest/.

A Jupyter Notebook demonstrating the module can be found at https://mybinder.org/v2/gh/spinicist/nanslice/master?filepath=doc%2Fexample.ipynb.

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 https://github.com/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.

Installation

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.

Performance

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!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nanslice-1.0.0.tar.gz (21.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nanslice-1.0.0-py2.py3-none-any.whl (31.0 kB view details)

Uploaded Python 2Python 3

File details

Details for the file nanslice-1.0.0.tar.gz.

File metadata

  • Download URL: nanslice-1.0.0.tar.gz
  • Upload date:
  • Size: 21.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

File hashes

Hashes for nanslice-1.0.0.tar.gz
Algorithm Hash digest
SHA256 35831e55578af2ed73ab7fcaf26f6e401698c63ca00e2ecd91a246d122579a7d
MD5 b15c3bd8846ea9b6bc825f908a48515b
BLAKE2b-256 46d430e742d2122096ab014706fb6c7458f125e82ed6cccb8ffcfb37ddfb7d08

See more details on using hashes here.

File details

Details for the file nanslice-1.0.0-py2.py3-none-any.whl.

File metadata

  • Download URL: nanslice-1.0.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 31.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

File hashes

Hashes for nanslice-1.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 4665b0877ed6f16413af6376d67b2496160ea9dec31db778209153255402484a
MD5 90a42a1b9f1804380d217ed20db2a50b
BLAKE2b-256 ea24c00a9a01ce007fec9960035aac4f5b24466eebf8af63a2fc0da396ca3b18

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page