nifti_mrs.utils
Utility functions for NIfTI-MRS utilities
Author: Will Clarke <william.clarke@ndcn.ox.ac.uk> Copyright (C) 2021 University of Oxford
- exception nifti_mrs.utils.NIfTI_MRSIncompatible
- nifti_mrs.utils.modify_hdr_ext(new_hdr_ext, nifti_header)
Generate a new NIfTI header with a modified header extension. New header is a copy of the one passed
- Parameters:
new_hdr_ext (Hdr_Ext object) – Modified header extension
nifti_header (nibabel.nifti2.Nifti2Header) – NIfTI header
- Returns:
Copied header with modified hdr extension
- Return type:
nibabel.nifti2.Nifti2Header
- nifti_mrs.utils.check_type(in_format)
Return type of header: long (list) or short (dict)
- Parameters:
in_format (list or dict) – Value of header key
- Returns:
‘long’ or ‘short’
- Return type:
str
- nifti_mrs.utils.dim_n_header_short_to_long(in_format, elements)
- nifti_mrs.utils.dim_n_header_long_to_short(in_format)