Skip to main content

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/

Metadata

Release files for trk-to-annotation 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for trk-to-annotation 0.0.2
File Size Uploaded
trk_to_annotation-0.0.2.tar.gz 15.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for trk-to-annotation 0.0.2
File Interpreter ABI Platform
trk_to_annotation-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 34.7 kB

Release files / trk_to_annotation-0.0.2.tar.gz

Download URL trk_to_annotation-0.0.2.tar.gz
Size 15.5 kB
Tags Source
SHA-256 checksum
How to use checksums
7d8c55ec829580cfb37c8c7af9bea85aab2ca26eb5dda50be7aab712f82be9b3
BLAKE2b-256 checksum
How to use checksums
290502dbe3512ea314752051644a71677a52aa011b21145c6baacf5db16efefc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 26, 2026.

Transparency log

Release files / trk_to_annotation-0.0.2-py3-none-any.whl

Download URL trk_to_annotation-0.0.2-py3-none-any.whl
Size 19.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
82d77bf898d8b3d7d63c2699e9fa9e582883fcbead0943136e548ee39cf6d142
BLAKE2b-256 checksum
How to use checksums
8e53df1835e2842f440c44dc79498c20b3cdfa45e78088233a61ab28c3842baf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 26, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page