diff --git a/CHANGELOG.md b/CHANGELOG.md index 01fbc7f..6f643d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ Most recent version numbers *should* follow the [Semantic Versioning](https://se - spatial processing: add explicit mask creation and fix implicit mask (0 to NaN in float images) - update FIL seste seq parameters in get_metadata_val_classic - denoising module-first part: Java-Matlab interface for LCPCA denoising +- read EffectiveEchoTime in new TerraX Dicom format ### Fixed - replace `datestr(now)` with `datetime('now')` in line with [MATLAB recommendation](https://mathworks.com/help/matlab/matlab_prog/replace-discouraged-instances-of-serial-date-numbers-and-date-strings.html) diff --git a/spm12/metadata/get_metadata_val_classic.m b/spm12/metadata/get_metadata_val_classic.m index 0687974..1d08eda 100644 --- a/spm12/metadata/get_metadata_val_classic.m +++ b/spm12/metadata/get_metadata_val_classic.m @@ -123,8 +123,16 @@ end case 'EchoTime' % [ms] - % Valid for all vendors + % Valid for all vendors: + % try EchoTime first [nFieldFound, fieldList] = find_field_name(mstruc, 'EchoTime', 'caseSens','sensitive','matchType','exact'); + % In some sequences (e.g. the XA implementations of FLASH from Kerrin Pine) + % the EffectiveEchoTime is populated instead of the EchoTime field in the DICOM. + % If EchoTime is not found than search for EffectiveEchoTime: + if ~nFieldFound + [nFieldFound, fieldList] = find_field_name(mstruc,'EffectiveEchoTime', 'caseSens','sensitive','matchType','exact'); + end + % Valid for all vendors: [val,nam] = get_val_nam_list(mstruc, nFieldFound, fieldList); if nFieldFound cRes = 1;