mcot.gcoord.orientation

Computes the gyral coordinate system.

For each point in space defines the radial, sulcal, and gyral orientations

Classes

WeightedOrientation(white, pial, …)

Can compute an averaged radial/tangential fiber orientations for every voxel.

Functions

align_vector_field(from_field, to_field)

Returns a new vector field parallel to from_field, which is aligned with to_field

make_perpendicular(radial, tangential)

Projects the tangential field, so that it is perpendicular to the radial field.

run_from_args(args)

align_vector_field

mcot.gcoord.orientation.align_vector_field(from_field, to_field)[source]

Returns a new vector field parallel to from_field, which is aligned with to_field

Parameters
  • from_field – (Nx, Ny, Nz, 3, Nf) original vector field

  • to_field – (Nx, Ny, Nz, 3, Nf) reference vector field with the correct rough hemisphere

Returns

same as from_field, but with every vector flipped that has a negative inner product with to_field

make_perpendicular

mcot.gcoord.orientation.make_perpendicular(radial, tangential)[source]

Projects the tangential field, so that it is perpendicular to the radial field.

Parameters
  • radial – (Nx, Ny, Nz, 3) array with the radial orientations

  • tangential – (Nx, Ny, Nz, 3) array with the tangential orientations

Returns

(Nx, Ny, Nz, 3, 3) array with the radial orientations […, 0], the projected tangential orientations […, 1] and the orientations perpendicular to both […, 2]. All output orientations will be normalized.

run_from_args

mcot.gcoord.orientation.run_from_args(args)[source]