Skip to main content

Utilities for converting .trk tractography files into Neuroglancer precomputed annotation format, and serving them locally with HTTP requests.

Project description

trk_to_annotation

This repository provides utilities for converting .trk tractography files into Neuroglancer precomputed annotation format, and serving them locally with HTTP requests.

Install

python -m build
pip install .

Usage

python -m trk_to_annotation <trk_file> \
    --annotation_output_dir ./precomputed_annotations \
    --segmentation_output_dir ./precomputed_segmentations \
    --grid_densities 1 2 4 8 16

Arguments

Argument Required Default Description
trk_file Path to the input .trk file
--annotation_output_dir ./precomputed_annotations Output directory for precomputed annotations
--segmentation_output_dir ./precomputed_annotations/precomputed_segmentations Output directory for precomputed segmentations
--grid_densities [1, 2, 4, 8, 16] Grid densities (powers of two, ascending order)

Running server for neuroglancer

Run the following command in the directory with your outputted folders

python -m trk_to_annotation.http_server

You should now be able to access the annotation and segmentation layers on neuroglancer via http://localhost:8000/

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

trk_to_annotation-0.0.1.tar.gz (15.5 kB view details)

Uploaded Source

Built Distribution

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

trk_to_annotation-0.0.1-py3-none-any.whl (19.2 kB view details)

Uploaded Python 3

File details

Details for the file trk_to_annotation-0.0.1.tar.gz.

File metadata

  • Download URL: trk_to_annotation-0.0.1.tar.gz
  • Upload date:
  • Size: 15.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for trk_to_annotation-0.0.1.tar.gz
Algorithm Hash digest
SHA256 81d5ff14a1d8afc43d402a372fe55219e839409d9eed88a4065669510d605c77
MD5 ba072a356458deeefb9c99bf05a059d0
BLAKE2b-256 c973e1aef29aee36b7a702743006eb3d2c1a46826adaf65023df30556742c03d

See more details on using hashes here.

Provenance

The following attestation bundles were made for trk_to_annotation-0.0.1.tar.gz:

Publisher: publish.yml on lincbrain/trk_to_annotation

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file trk_to_annotation-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for trk_to_annotation-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dae0a5bc60cba7e058e27649a014f901e2dc147b49f6d69a2247d8455cae1a2b
MD5 4a0da6267527dddc05e9118189a18263
BLAKE2b-256 adf4eaacf0d18e771e26e477cf331dcec9def329fd0bb4e9aeb3157ee7ee388b

See more details on using hashes here.

Provenance

The following attestation bundles were made for trk_to_annotation-0.0.1-py3-none-any.whl:

Publisher: publish.yml on lincbrain/trk_to_annotation

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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