TEND-EPIREG(1)

πŸ“¦ version 1.11.0, in fedora 43, fedora 44

πŸ’– TEND-EPIREG(1) πŸ’–

okay so bestie, welcome to tend-epireg β€” the manual page for registering diffusion-weighted echo-planar images ✨ it lives in the User Commands section of the manual, and honestly? it's giving main character energy in the DWI preprocessing pipeline. let's get into it 🫢


🌸 NAME 🌸

tend-epireg β€” register diffusion-weighted echo-planar images πŸ’…


✨ SYNOPSIS ✨

tend epireg -i <dwi0 dwi1 ...> -g <grads> [-r <reference>] [-nv] [-p]
[-bw <x,y blur>] [-t <DWI thresh>] [-ncc] [-f <fit frac>] [-k <kernel>]
[-s <start #>] [-o <output/prefix>]

πŸ¦‹ DESCRIPTION πŸ¦‹

so what this does is register diffusion-weighted echo-planar images. periodt. but like, here's the tea β˜• β€” echo-planar imaging plus eddy currents from the diffusion-encoding gradients causes shear, scale, and translate along the phase encoding direction, which the page says we assume is the Y (second) axis of the image. this thing corrects all of that. slay.

the method is based on calculating moments of segmented images, where the segmentation is a simple procedure: blurring (optional!), then thresholding, then connected component analysis. lowkey elegant ngl.

the registered DWIs get resampled with whichever kernel you picked, and the separate DWIs are stacked along axis 0. iconic. 🌈


πŸ‘‘ OPTIONS πŸ‘‘

  • -i <dwi0 dwi1 ...> β€” all the diffusion-weighted images (DWIs), as separate 3D nrrds, OR: one 4D nrrd of all DWIs stacked along axis 0 (1 or more nrrds) πŸ“
  • -g <grads> β€” array of gradient directions, in the same order as the associated DWIs were given to -i, OR -g kvp signifies that gradient directions should be read from the key/value pairs of the DWI (string)
  • -r <reference> β€” which of the DW volumes (zero-based numbering, bestie, don't forget) should be used as the standard, to which all other images are transformed. Using -1 (the default) means that 9 intrinsic parameters governing the relationship between the gradient direction and the resulting distortion are estimated and fitted, ensuring good registration with the non-diffusion-weighted T2 image (which is never explicitly used in registration, fun fact πŸ™ˆ). Otherwise, by picking a specific DWI, no distortion parameter estimation is done. (int); default: -1
  • -nv β€” turn OFF verbose mode, and have no idea what stage processing is at. 😭 like literally you will be flying blind, your call
  • -p β€” save out intermediate steps of processing
  • -bw <x,y blur> β€” standard deviations in X and Y directions of the gaussian filter used to blur the DWIs prior to doing segmentation. this blurring does not affect the final resampling of registered DWIs (so breathe, it's fine). Use 0.0 0.0 to say "no blurring" (2 floats); default: 1.0 2.0
  • -t <DWI thresh> β€” threshold value to use on DWIs, to do initial separation of brain and non-brain. by default, the threshold is determined automatically by histogram analysis. (float)
  • -ncc β€” do NOT do connected component (CC) analysis, after thresholding and before moment calculation. doing CC analysis usually gives better results because it converts the thresholding output into something much closer to a real segmentation ✨
  • -f <fit frac> β€” (only meaningful with -r -1, iykyk) when doing linear fitting of the intrinsic distortion parameters, it is good to ignore the slices for which the segmentation was poor. a heuristic is used to rank the slices according to segmentation quality. this option controls how many of the (best) slices contribute to the fitting. use 0 to disable distortion parameter fitting. (float) default: 0.70
  • -k <kernel> β€” kernel for resampling DWIs along the phase-encoding direction during final registration stage; default: cubic:0,0.5 πŸ’…
  • -s <start #> β€” first number to use in numbered sequence of output files. (int); default: 1
  • -o <output/prefix #> β€” For separate 3D DWI volume inputs: prefix for output filenames; will save out one (registered) DWI for each input DWI, using the same type as the input. OR: For single 4D DWI input: output file name. (string); default: -

πŸŽ€ SEE ALSO πŸŽ€

  • tend(1) β€” go say hi to the parent command bestie 🫢

πŸ’€ reminder that the phase encoding direction is assumed to be the Y (second) axis, and that -r -1 is where the distortion parameter fitting magic lives. don't come for me if you skip the -f option, that's on you πŸ™ˆ

and that's the whole vibe check 🌈 β€” this page came to you from the User Commands manual, dated April 2021, and it's called TEND-EPIREG(1) fr fr. go register some DWIs, you've got this πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ‘‘

πŸ“¦ where this page comes from