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. partitions is 1 when the kspace_encoding_step_2 limit states a single partition, as for a trajectory that encodes kz itself, and otherwise the larger of that limit and the encoded matrix, as for a stack that is Cartesian along z. Both centres are None, so no counter is shifted.

recon_matrix and recon_fov fall back to the encoded space when the header has no reconSpace.

Parameters:
  • header (ismrmrd.xsd.ismrmrdHeader) – Parsed MRD header.

  • index (int, default=0) – Position in the header’s encoding list.

  • loops (Iterable[str], default=None) – 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.