跳转到主要内容

TRAKO项目:DTI Streamlines的压缩。

项目描述

TRAKO

Trako将.vtp文件中的DTI streamlines压缩为更小的.tko文件!

作为PyPI包安装(推荐,最好在虚拟环境中进行)

pip install trako

用法

./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

扩散张量成像(DTI)允许估计大脑的白质束。纤维追踪方法随后产生3D纤维束的流线簇。这些束中的每根纤维都是一个有X、Y、Z坐标(浮点数)的线,但研究人员可能将许多不同的标量附加到每个坐标(每顶点)。每个标量可以是任意维度、大小和数据类型。研究人员还可以将许多不同的属性值附加到单个流线上(每纤维)。添加标量和属性可能导致流线文件很大。

Trako是一种新的文件格式,它使用压缩的glTF容器存储流线和相关的每顶点及每纤维数据。我们使用Draco算法压缩X、Y、Z坐标、标量和属性。

自定义参数

Trako允许详细配置编码参数。可以通过JSON文件进行自定义配置,以指定不同属性的参数。

我们包含一个示例配置DATA/test.conf

{
    
  'POSITION': {
    'position':True,
    'sequential':True,
    'quantization_bits':14,
    'compression_level':1,
    'quantization_range':-1,
    'quantization_origin':None
  },
  'INDICES': {
    'position':False,
    'sequential':True,
    'quantization_bits':14,
    'compression_level':1,
    'quantization_range':-1,
    'quantization_origin':None
  },
  'RTOP2': { # configure custom settings per attribute name
    'position':False,
    'sequential':True,
    'quantization_bits':20,
    'compression_level':1,
    'quantization_range':-1,
    'quantization_origin':None
  }

}

此配置将名为RTOP2的标量配置为比其他属性更高的比特率。还可以使用通用配置(例如,减少所有属性的量化比特率)如下所示

{
    
  '*': {
    'position':False,
    'sequential':True,
    'quantization_bits':11,
    'compression_level':1,
    'quantization_range':-1,
    'quantization_origin':None
  }

}

配置仅在压缩期间相关,可以使用如下方式使用

./trakofy -i DATA/example.vtp -o /tmp/test.tko -c DATA/test.conf

实验

我们比较了Trako和常见的流线文件格式(VTK、TrackVis)在两个每个对象有800个纤维簇的数据上的性能。数据包括多个每纤维和每顶点的标量值。Trako的平均压缩比达到3.2,将数据大小从2974兆字节减少到941兆字节。

我们还使用Trako压缩了一个包含153,537个流线的单个全脑纤维束追踪数据集。Trako将数据大小从543兆字节减少到267兆字节(压缩因子2.02)。

使用默认参数,Trako对位置数据和每顶点/每纤维的标量值使用有损压缩,平均相对损失小于0.0001(RGB值作为EmbeddingColor除外)。我们在左侧显示了两个每个对象有800个纤维簇的相对信息损失,在右侧显示了单个全脑纤维束追踪数据集的相对信息损失。

使用WebGL进行可视化

我们提供了JavaScript解析器,用于使用Three.jsVtk.jsXTK可视化Trako (.TKO)文件。

此外,SliceDrop也支持Trako!只需将浏览器中的.TKO文件拖放到浏览器中即可查看它们。

开发者安装(包含测试数据)

请按照以下步骤操作,前提是已安装Miniconda或Anaconda

# 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

Trako @ MICCAI 2020

请按照以下方式引用TRAKO

@inproceedings{haehn2020trako,
  title={TRAKO: Efficient Transmission of Tractography Data for Visualization},
  author={Haehn, Daniel and Franke, Loraine and Zhang, Fan and Karayumak, Suheyla Cetin and Pieper, Steve and O'Donnell, Lauren and Rathi, Yogesh},
  abstract={Fiber tracking produces large tractography datasets that are tens of gigabytes in size consisting of millions of streamlines. Such vast amounts of data require formats that allow for efficient storage, transfer, and visualization. We present TRAKO, a new data format based on the Graphics Layer Transmission Format (glTF) that enables immediate graphical and hardware-accelerated processing. We integrate a state-of-the-art compression technique for vertices, streamlines, and attached scalar and property data. We then compare TRAKO to existing tractography storage methods and provide a detailed evaluation on eight datasets. TRAKO can achieve data reductions of over 28x without loss of statistical significance when used to replicate analysis from previously published studies. },
  booktitle={Medical Image Computing and Computer-Assisted Intervention (MICCAI)},
  pages={XXX--XXX},
  year={2020},
  supplemental={http://danielhaehn.com/papers/haehn2020trako_supplemental.pdf},
  organization={Springer, Cham},
  code={https://github.com/bostongfx/TRAKO/},
  data={https://github.com/bostongfx/TRAKO/},
  website={https://pypi.ac.cn/project/trako/}
}

以下是预印本:https://danielhaehn.com/papers/?haehn2020trako

项目详情


下载文件

下载适用于您平台的文件。如果您不确定选择哪个,请了解更多关于安装软件包的信息。

源代码分发

trako-0.3.5.dev9.tar.gz (17.9 kB 查看哈希值)

上传时间 源代码

由以下机构支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误记录 StatusPage StatusPage 状态页面