Unrecognized field name "lScanRegionPosTra"

Hi @Helge and Georg @admin,

@AlexB received the following error after updating to the latest Osprey version (develop branch). Should we add an if-statement to read_dcm_header to check if lScanRegionPosTra exists? And if it doesn’t exist, is there a value that we should set it to?

Thanks!
Meredith

Unrecognized field name "lScanRegionPosTra".

Error in read_dcm_header (line 188)
DicomHeader.TablePosTra          = dcmHeader.lScanRegionPosTra; % Transversal table position [mm]
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in io_loadspec_dicom (line 99)
DicomHeader = read_dcm_header(filesInFolder{1});
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in osp_LoadDICOM (line 67)
            raw = io_loadspec_dicom(MRSCont.files{metab_ll,kk});
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in OspreyLoad (line 201)
                [MRSCont] = osp_LoadDICOM(MRSCont);
                            ^^^^^^^^^^^^^^^^^^^^^^
Error in k01_06a_mrs_analysis (line 12)
MRSCont = OspreyLoad(MRSCont);
          ^^^^^^^^^^^^^^^^^^^

Following up with the fix that @AlexB used for our dataset in case others run into the same problem. Data were acquired on Siemens 7T MAGNETOM with the short-TE STEAM WIP.

In read_dcm_header.m, replace line 193 with

if isfield(dcmHeader, 'lScanRegionPosTra')
    DicomHeader.TablePosTra     = dcmHeader.lScanRegionPosTra; % Transversal table position [mm]
end

In io_loadspec_dicom.m, replace line 132 with

if isfield(DicomHeader, 'TablePosTra')
    geometry.pos.TablePosTra    = DicomHeader.TablePosTra; % Transversal table position [mm]
end