TFF_MANIPULATE_DATATYPE.PY(1)
π NAME π
okay bestie, welcome to the TFF_MANIPULATE_DATATYPE.PY(1) manual page, and buckle up because this one is genuinely useful π«Ά
tff_manipulate_datatype.py β manipulate a TRX file array to change its data type. that's the whole job. it goes in, it pokes the internal arrays, it changes what type of number they're stored as. iconic behaviour honestly π
β¨ DESCRIPTION β¨
here's the vibe check on how you actually call it:
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
so like, the whole point: this tool manipulates a TRX file's internal array to change their data type. no cap, that's the description. π
now the important deets, bestie β each instance of --dps, --dpv, --groups needs 2 arguments (FILE, DTYPE). and --dpg is the extra one, it needs 3 arguments (GROUP, FILE, DTYPE). the way that --dpg just needs more than everyone else? main character energy, periodt. β¨
the choices of DTYPE are:
(u)int8,(u)int16,(u)int32,(u)int64float16,float32,float64bool
and here's the example command, straight up, so you can see it in the wild:
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
okay that's a lot of flags in one breath but you ate that, you got this π
πΈ positional arguments: πΈ
in_tractogramβ the input TRX file. your little guy going in. π¦out_tractogramβ the output filename. and bestie, heads up: the format must be one oftrk,tck,vtk,fib,dpy,trx. those are the only fits it's accepting, sorry π
π options: π
-h,--helpβ show this help message and exit. the classic. the icon. the one true escape hatch π-fβ force overwriting of the output files. it's giving "no thoughts, just replace" π₯
π Data type options: π
--positions_dtype {float16,float32,float64}β specify the datatype for positions for trx. the choices arefloat16,float32,float64. pick your fighter π--offsets_dtype {uint32,uint64}β specify the datatype for offsets for trx. the choices areuint32,uint64. only two options, keep it simple β¨
π Streamlines metadata options: π
--dpv NAME DTYPEβ specify the datatype for a specificdata_per_vertex. two arguments, don't forget the second one π--dps NAME DTYPEβ specify the datatype for a specificdata_per_streamline. also two arguments, also very slay πΈ--groups NAME DTYPEβ specify the datatype for a specific group. yep, two arguments here too π--dpg GROUP NAME DTYPEβ specify the datatype for a specificdata_per_group. this one's the overachiever with three arguments βGROUP,NAME,DTYPE. it said why have two when you can have three π
lowkey just remember:--dps,--dpv,--groupsβ 2 args.--dpgβ 3 args. that's the whole plot twist and it's not even a plot twist, it's just the rules π§
okay bestie that's literally the entire page, you're so smart for reading it, go change some datatypes and be free π
tff_manipulate_datatype.py 0.3 β July 2024 π byeee, mwah π«Ά
π¦ where this page comes from
- debian trixie: python3-trx-python 0.3-1 Β· BSD-2-Clause
- ubuntu questing: python3-trx-python 0.3-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms