---
name: "tff_convert_dsi_studio.py"
section: "1"
platform: "linux"
package: "python3-trx-python"
version: "0.3-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/tff_convert_dsi_studio.py"
---

# tff\_convert\_dsi\_studio.py(1)

fix DSI-Studio TRK file

## NAME

tff\_convert\_dsi\_studio.py - fix DSI-Studio TRK file

## DESCRIPTION

usage: tff\_convert\_dsi\_studio.py \[-h\] \[--remove\_invalid \| **--keep\_invalid\]** \[-f\]

-

  IN\_DSI\_TRACTOGRAM IN\_DSI\_FA OUT\_TRACTOGRAM

This script is made to fix DSI-Studio TRK file (unknown space/convention) to make it compatible with TrackVis, MI-Brain, Dipy Horizon (Stateful Tractogram).

The script either make it match with an anatomy from DSI-Studio.

This script was tested on various datasets and worked on all of them. However, always verify the results and if a specific case does not work. Open an issue on the Scilpy GitHub repository.

WARNING: This script is still experimental, DSI-Studio evolves quickly and results may vary depending on the data itself as well as DSI-studio version.

### positional arguments:

- IN\_DSI\_TRACTOGRAM

  Path of the input tractogram file from DSI studio (.trk).

- IN\_DSI\_FA

  Path of the input FA from DSI Studio (.nii.gz).

- OUT\_TRACTOGRAM

  Path of the output tractogram file.

### options:

- **-h**, **--help**

  show this help message and exit

- **--remove\_invalid**

  Remove the streamlines landing out of the bounding box.

- **--keep\_invalid**

  Keep the streamlines landing out of the bounding box.

- **-f**

  Force overwriting of the output files.
