reorient

reorient(x, orient)

Remap the grid-to-world coordinates mapping of an image.

Parameters

Name Type Description Default
x NeuroSpace or NeuroVol The object to reorient required
orient str or list of str The orientation code indicating the remapped axes. Can be a 3-letter string like “RAS” or list like [“R”, “A”, “S”] Each position represents: - First: “R” (Right) or “L” (Left) - Second: “A” (Anterior) or “P” (Posterior) - Third: “S” (Superior) or “I” (Inferior) required

Returns

Name Type Description
NeuroSpace or NeuroVol A reoriented version of x

Examples

>>> # Reorient a space to RAS
>>> space_ras = reorient(space, "RAS")
>>>
>>> # Or using a list
>>> space_ras = reorient(space, ["R", "A", "S"])
Back to top