Scroll to navigation

TFF_MANIPULATE_DATATYPE.PY(1) User Commands TFF_MANIPULATE_DATATYPE.PY(1)

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:

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

options:

show this help message and exit
Force overwriting of the output files.

Data type options:

Specify the datatype for positions for trx. [float16, float32, float64]
Specify the datatype for offsets for trx. [uint32, uint64]

Streamlines metadata options:

Specify the datatype for a specific data_per_vertex.
Specify the datatype for a specific data_per_streamline.
Specify the datatype for a specific group.
Specify the datatype for a specific data_per_group.
January 2024 tff_manipulate_datatype.py 0.2.9