dosma.core.orientation.get_flip_inds
- dosma.core.orientation.get_flip_inds(curr_orientation: tuple, new_orientation: tuple)[source]
Get indices to flip from
curr_orientationtonew_orientation.- Parameters:
curr_orientation (tuple[str]) – Current image orientation.
new_orientation (tuple[str]) – New image orientation.
- Returns:
Axes to flip.
- Return type:
list[int]
- Raises:
ValueError – If mismatch in orientation indices. To avoid this error, use
get_transpose_inds()prior to flipping.
Examples
>>> get_transpose_inds(("SI", "AP", "LR"), ("IS", "AP", "RL")) [0, 2]