---
name: "tff_manipulate_datatype.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_manipulate_datatype.py"
---

# tff\_manipulate\_datatype.py(1)

manipulate TRX file array to change data type

## NAME

tff\_manipulate\_datatype.py - manipulate TRX file array to change data type

## DESCRIPTION

usage: tff\_manipulate\_datatype.py \[-h\]

- \[--positions\_dtype {float16,float32,float64}\]

  \[--offsets\_dtype {uint32,uint64}\] \[--dpv NAME DTYPE\] \[--dps NAME DTYPE\] \[--groups NAME DTYPE\] \[--dpg GROUP NAME DTYPE\] \[-f\] in\_tractogram out\_tractogram

Manipulate a TRX file internal array to change their data type.

Each instance of **--dps**, **--dpv**, **--groups** require 2 arguments (FILE, DTYPE). **--dpg** requires 3 arguments (GROUP, FILE, DTYPE). The choice of DTYPE are:

-

  \- (u)int8, (u)int16, (u)int32, (u)int64 - float16, float32, float64 - bool

Example command: tff\_manipulate\_datatype.py input.trx output.trx     **--position** float16 **--offsets** uint64     **--dpv** color\_x uint8 **--dpv** color\_y uint8 **--dpv** color\_z uint8     **--dpv** fa float16 **--dps** algo uint8 **--dps** clusters\_QB uint16     **--dps** commit\_colors uint8 **--dps** commit\_weights float16     **--group** CC uint64 **--dpg** CC mean\_fa float64

### positional arguments:

- in\_tractogram

  Input TRX file.

- out\_tractogram

  Output filename. Format must be one of trk, tck, vtk, fib, dpy, trx.

### options:

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

  show this help message and exit

- **-f**

  Force overwriting of the output files.

### Data type options:

- **--positions\_dtype** {float16,float32,float64}

  Specify the datatype for positions for trx. \[float16, float32, float64\]

- **--offsets\_dtype** {uint32,uint64}

  Specify the datatype for offsets for trx. \[uint32, uint64\]

### Streamlines metadata options:

- **--dpv** NAME DTYPE

  Specify the datatype for a specific data\_per\_vertex.

- **--dps** NAME DTYPE

  Specify the datatype for a specific data\_per\_streamline.

- **--groups** NAME DTYPE

  Specify the datatype for a specific group.

- **--dpg** GROUP NAME DTYPE

  Specify the datatype for a specific data\_per\_group.
