Skip to main content

Tractometry Visualization Tool

Project description

trksnapshot

Installatoin

pip install trksnapshot==0.1 (project page)

Description

trksnapshot is a CLI for creating bundle visualizations (created using FURY and DIPY). It supports

  1. Visualizing 3D bundles in an interactive window with custom color options and camera view. These include per-bundle color and along-tract color using BUAN (for tractometry results).
  2. Supports plotting bundle with glass brain and pial surfaces.
  3. Rotate the camera however you like and save camera settings to produce consistent plots.
  4. Save snapshot images for publication-ready figures!

All bundle visualizations in our recent work Microstructural mapping of neural pathways in Alzheimer's disease using macrostructure-informed normative tractometry were created with this script. Here's one of the figures:

bundle_atlas

Usage

[RECOMMENDED] To visualization bundle(s) with default pial surfaces (in MNI space)

python snapshot_bundle.py \
      -i /path_to_tractogram/bundle*.trk \
      -glass default_pial \
      -show

You may also provide your own pial surface files

python snapshot_bundle.py \
      -i /path_to_tractogram/bundle*.trk \
      -glass /path_to_surfaces/pial_left.nii /path_to_surfaces/pial_right.nii \
      -show

To visualization bundle(s) with default glass brain (must be in MNI space)

python snapshot_bundle.py \
      -i /path_to_tractogram/bundle*.trk \
      -glass default_glass \
      -show

To visualization bundle with pial surfaces with BUAN output

python snapshot_bundle.py \
      -i /path_to_tractogram/bundle.trk \
      -f /path_to_buan_results/pvals.npy \
      -ctitle pvalues -auto -cbar /path_to_output_folder/cbar.png \
      -glass /path_to_surfaces/pial_left.gii.gz /path_to_surfaces/pial_right.gii.gz
      -show \
      -o /path_to_output_folder/bundle.png

Citations

  1. Microstructural mapping of neural pathways in Alzheimer's disease using macrostructure-informed normative tractometry
  2. FURY: advanced scientific visualization

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

trksnapshot-0.1.1.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

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

trksnapshot-0.1.1-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file trksnapshot-0.1.1.tar.gz.

File metadata

  • Download URL: trksnapshot-0.1.1.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for trksnapshot-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c5a491541cd706a35b01179bee4b20bd20b23f2cceee2e1c42d685f740280768
MD5 a62a64d0e6ef37c9ed6ead71608b1b0d
BLAKE2b-256 71f3d2ddefdb83ae0db0369f10984a11dd65454bb2f355f573a540dfed13038c

See more details on using hashes here.

File details

Details for the file trksnapshot-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: trksnapshot-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for trksnapshot-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4855cda6997c862dcf8ee1c40129871034106d8e7ab620f9ed6f81835cb64f50
MD5 587f68fbde4af6ea5159a15e68a5018f
BLAKE2b-256 2063a4e0ce8fc17ece493d0dfae352878bc948708105bc69a7a7a1d08f05c30b

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