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

Uploaded Python 3

File details

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

File metadata

  • Download URL: trk_to_annotation-0.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 7d8c55ec829580cfb37c8c7af9bea85aab2ca26eb5dda50be7aab712f82be9b3
MD5 740b3bb421998e289b48401cb049281e
BLAKE2b-256 290502dbe3512ea314752051644a71677a52aa011b21145c6baacf5db16efefc

See more details on using hashes here.

Provenance

The following attestation bundles were made for trk_to_annotation-0.0.2.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.2-py3-none-any.whl.

File metadata

File hashes

Hashes for trk_to_annotation-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 82d77bf898d8b3d7d63c2699e9fa9e582883fcbead0943136e548ee39cf6d142
MD5 17930660f8d9d510705b99c61337bb12
BLAKE2b-256 8e53df1835e2842f440c44dc79498c20b3cdfa45e78088233a61ab28c3842baf

See more details on using hashes here.

Provenance

The following attestation bundles were made for trk_to_annotation-0.0.2-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