EncodingSpace.from_header#
- classmethod EncodingSpace.from_header()[source]#
Read encoding space
indexof a parsed MRD header.For a Cartesian space,
phase_encodesandpartitionsare the encoded matrix, the whole grid whatever number of lines an undersampled scan took, andphase_centerandpartition_centerplace the counters on it.For a non-Cartesian space,
phase_encodesis thekspace_encoding_step_1limit, which counts views, or the encoded matrix when no limit is stated.partitionsis 1 when thekspace_encoding_step_2limit 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 areNone, so no counter is shifted.recon_matrixandrecon_fovfall back to the encoded space when the header has noreconSpace.- 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_COUNTERSfollowed bysegment;Nonetakes every counter ofLOOP_COUNTERS.
- Raises:
IndexError – If the header describes no such encoding space.