Skip to main content

Tractometry Visualization Tool

Project description

trksnapshot

Installation

pip install trksnapshot (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)

trksnapshot \
      -i /path_to_tractogram/bundle*.trk \
      -glass default_pial \
      -show

You may also provide your own pial surface files

trksnapshot \
      -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)

trksnapshot \
      -i /path_to_tractogram/bundle*.trk \
      -glass default_glass \
      -show

To visualization bundle with pial surfaces with BUAN output

trksnapshot \
      -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.2.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.2-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for trksnapshot-0.1.2.tar.gz
Algorithm Hash digest
SHA256 73710e92b662a1d52316d952c27b5463ba5fc5b9559d13a6b3b159f98030c0ae
MD5 9a520d3c202880276eb68866ab83a4c6
BLAKE2b-256 579fd3ba682cfd456951fedf7316bfa25f8f9134364f272920345b117da2034b

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for trksnapshot-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9aed192eff93b9601fb10fb0cd0486dd2c9245c689a01ac2251253cf9802ed45
MD5 caa456dd53b079c28a9246672abb0a99
BLAKE2b-256 569aa69cda8bfe28557e024b25fe310dc5d4597b2403bc5894a5815a1cc7ec41

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