EncodingSpace.from_header

EncodingSpace.from_header#

classmethod EncodingSpace.from_header()[source]#

Read encoding space index of a parsed MRD header.

For a Cartesian space phase_encodes and partitions are the encoded matrix, the whole grid whatever number of lines an undersampled scan took, and phase_center and partition_center place the counters on it. For a non-Cartesian space phase_encodes is the kspace_encoding_step_1 limit, which counts views, or the encoded matrix when no limit is stated; its partitions is the larger of the encoded matrix and the kspace_encoding_step_2 limit, a stack being Cartesian along z, and no counter is shifted. recon_matrix and recon_fov fall back to the encoded space when the header has no reconSpace.

Parameters:
  • header – Parsed MRD header.

  • index – Position in the header’s encoding list.

  • loops – Counters to lay out as axes where the header gives them more than one value, in the order of LOOP_COUNTERS followed by segment; None takes every counter of LOOP_COUNTERS.

Raises:

IndexError – If the header describes no such encoding space.