.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. .TH TFF_GENERATE_TRX_FROM_SCRATCH.PY "1" "January 2024" "tff_generate_trx_from_scratch.py 0.2.9" "User Commands" .SH NAME tff_generate_trx_from_scratch.py \- generate a TRX file from CSV, TXT or NPY files .SH DESCRIPTION usage: tff_generate_trx_from_scratch.py [\-h] [\-\-positions POSITIONS] .TP [\-\-offsets OFFSETS] [\-\-positions_csv POSITIONS] [\-\-space {RASMM,VOXMM,VOX}] [\-\-origin {NIFTI,TRACKVIS}] [\-\-positions_dtype {float16,float32,float64}] [\-\-offsets_dtype {uint32,uint64}] [\-\-dpv FILE DTYPE] [\-\-dps FILE DTYPE] [\-\-groups FILE DTYPE] [\-\-dpg GROUP FILE DTYPE] [\-\-verify_invalid] [\-f] reference OUT_TRACTOGRAM .PP Generate TRX file from a collection of CSV, TXT or NPY files by individually specifying positions, offsets, data_per_vertex, data_per_streamlines, groups and data_per_group. Each file must have its data type specified by the users. .PP A reference file must be provided (NIFTI) and the option \fB\-\-verify_invalid\fR will remove invalid streamlines (outside of the bounding box in VOX space). .PP All dimensions (nbr_vertices and nbr_streamlines) and groups/dpg must match otherwise the script will (likely) crash. .PP Each instance of \fB\-\-dps\fR, \fB\-\-dpv\fR, \fB\-\-groups\fR require 2 arguments (FILE, DTYPE). \fB\-\-dpg\fR requires 3 arguments (GROUP, FILE, DTYPE). The choice of DTYPE are: .IP \- (u)int8, (u)int16, (u)int32, (u)int64 \- float16, float32, float64 \- bool .PP Example command: tff_generate_trx_from_scratch.py fa.nii.gz generated.trx \fB\-f\fR \fB\-\-positions\fR test_npy/positions.npy \fB\-\-positions_dtype\fR float16 \fB\-\-offsets\fR test_npy/offsets.npy \fB\-\-offsets_dtype\fR uint32 \fB\-\-dpv\fR test_npy/dpv_cx.npy uint8 \fB\-\-dpv\fR test_npy/dpv_cy.npy uint8 \fB\-\-dpv\fR test_npy/dpv_cz.npy uint8 \fB\-\-dps\fR test_npy/dps_algo.npy uint8 \fB\-\-dps\fR test_npy/dps_cw.npy float64 \fB\-\-groups\fR test_npy/g_AF_L.npy int32 \fB\-\-groups\fR test_npy/g_AF_R.npy int32 \fB\-\-dpg\fR g_AF_L test_npy/dpg_AF_L_mean_fa.npy float32 \fB\-\-dpg\fR g_AF_R test_npy/dpg_AF_R_mean_fa.npy float32 \fB\-\-dpg\fR g_AF_L test_npy/dpg_AF_L_volume.npy float32 .SS "positional arguments:" .TP reference Reference anatomy for tck/vtk/fib/dpy file support (.nii or .nii.gz). .TP OUT_TRACTOGRAM Output filename. Format must be one of trk, tck, vtk, fib, dpy, trx. .SS "options:" .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit .TP \fB\-\-verify_invalid\fR Verify that the positions are all valid. None outside of the bounding box in VOX space. Requires Dipy (due to use of SFT). .TP \fB\-f\fR Force overwriting of the output files. .SS "Positions options:" .TP \fB\-\-positions\fR POSITIONS Binary file containing the streamlines coordinates. Must be Nx3 (.npy) .TP \fB\-\-offsets\fR OFFSETS Binary file containing the streamlines offsets (.npy) .TP \fB\-\-positions_csv\fR POSITIONS CSV file containing the streamlines coordinates. Rows for each streamlines organized as x1,y1,z1, x2,y2,z2,...,xN,yN,zN .TP \fB\-\-space\fR {RASMM,VOXMM,VOX} Space in which the coordinates are declared.[RASMM] Non\-default option requires Dipy. .TP \fB\-\-origin\fR {NIFTI,TRACKVIS} Origin in which the coordinates are declared. [NIFTI] Non\-default option requires Dipy. .SS "Data type options:" .TP \fB\-\-positions_dtype\fR {float16,float32,float64} Specify the datatype for positions for trx. [float32] .TP \fB\-\-offsets_dtype\fR {uint32,uint64} Specify the datatype for offsets for trx. [uint64] .SS "Streamlines metadata options:" .TP \fB\-\-dpv\fR FILE DTYPE Binary file containing data_per_vertex. Must haveNB_VERTICES as first dimension (.npy) .TP \fB\-\-dps\fR FILE DTYPE Binary file containing data_per_vertex. Must haveNB_STREAMLINES as first dimension (.npy) .TP \fB\-\-groups\fR FILE DTYPE Binary file containing a sparse group (indices). Indices should be lower than NB_STREAMLINES (.npy) .TP \fB\-\-dpg\fR GROUP FILE DTYPE Binary file containing data_per_group. .IP Must have(1,) as first dimension (.npy)