get_hdr_metadata
- bidsaid.metadata.get_hdr_metadata(metadata_name, nifti_file_or_img=None, nifti_header=None, return_header=False)[source]
Get metadata from a NIfTI header.
Parameters
- metadata_name
str Name of the metadata field to return.
- nifti_file_or_img
str,Path, orNifti1Image, default=None Path to the NIfTI file or a NIfTI image. Must be specified if
nifti_headeris None.- nifti_header
Nifti1Header, default=None Path to the NIfTI file or a NIfTI image. Must be specified if
nifti_file_or_imgis None.- return_header
bool Returns the NIfTI header
Returns
- Any or tuple[Any, Nifti1Header]
If
return_headeris False, only returns the associated value of the metadata. Ifreturn_headeris True returns a tuple containing the assoicated value of the metadata and the NIfTI header.
- metadata_name