The TRAKO Project: Compression of DTI Streamlines.
Project description
TRAKO
Trako compresses DTI streamlines from .vtp to smaller .tko files!
Installation as PyPI package (recommended, preferably in a virtualenv)
pip install trako
Usage
./trakofy -i DATA/example.vtp -o /tmp/test.tko
./untrakofy -i /tmp/test.tko -o /tmp/restored.vtp
./tkompare -a DATA/example.vtp -b /tmp/restored.vtp
Diffusion Tensor Imaging (DTI) allows to estimate the brain's white matter tracts. Fiber tracking methods then produce clusters of streamlines that are 3D fiber bundles. Each fiber in these bundles is a line with X,Y,Z coordinates (floats) but researchers may attach many different scalars to each coordinate (per-vertex). Each scalar can be of arbitrary dimension, size, and data type. Researchers may also attach many different property values to individual streamlines (per-fiber). Adding scalars and properties can result in large streamline files.
Trako is a new file format that stores streamlines and associated per-vertex and per-fiber data as glTF containers with compression. We use the Draco algorithm to compress X,Y,Z coordinates, scalars, and properties.
We compared Trako and common streamline file formats (VTK, TrackVis) on data of two subjects with 800 fiber clusters each. The data includes multiple per-fiber and per-vertex scalar values. Trako yields an average compression ratio of 3.2 and reduces the data size from 2974 Megabytes to 941 Megabytes.
We also used Trako to compress a single whole brain tractography dataset with 153,537 streamlines. Trako reduces the data size from 543 Megabytes to 267 Megabytes (compression factor 2.02).
With default parameters, Trako uses lossy compression for position data and per-vertex/per-fiber scalar values with a mean relative loss of less than 0.0001 (besides RGB values as EmbeddingColor). We show the relative information loss for two subjects with 800 fiber clusters each on the left, and the relative information loss for a single whole brain tractography dataset on the right.
Developer installation (comes with test data)
Please follow these steps with Miniconda or Anaconda installed:
# create environment
conda create --name TRAKO python=3.6
conda activate TRAKO
# get TRAKO
git clone git@github.com:haehn/TRAKO.git
cd TRAKO
python setup.py install
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file trako-0.3.0.dev9.tar.gz
.
File metadata
- Download URL: trako-0.3.0.dev9.tar.gz
- Upload date:
- Size: 13.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 051404f89d1c64c8cfb0a96322927dd391baed516c75ed7753b91f1d2be9f06c |
|
MD5 | 41d249e5a9daaa48aeaa5972657ba26b |
|
BLAKE2b-256 | 96f5cca3b81aad2eeedb06563c0ac67361ff24b4ddbd77524f0b1feddec63f1a |
File details
Details for the file trako-0.3.0.dev9-py3.6.egg
.
File metadata
- Download URL: trako-0.3.0.dev9-py3.6.egg
- Upload date:
- Size: 31.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd45abb4a4a9dca3531773ce3337ecf79960d08f99eb744a59e09ed1f0c33f3b |
|
MD5 | c9d2f6c38a875d09a3093aca897e0836 |
|
BLAKE2b-256 | 59ea2c92f65c4a9d14a464c57705d38304f1eaada02da3466a15db703542852b |