Skip to content

Commit

Permalink
Merge pull request #722 from HJZollner/develop
Browse files Browse the repository at this point in the history
[BUG FIX] - Siemens edit WIP not loading correctly - io_loadspec_twix…
  • Loading branch information
HJZollner authored Apr 22, 2024
2 parents 95cbe5d + 4f17ed0 commit b72bc23
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions libraries/FID-A/inputOutput/io_loadspec_twix.m
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@
twix_obj.image.softwareVersion = 'XA30';
version=twix_obj.image.softwareVersion;
end
if contains(twix_obj.hdr.Dicom.SoftwareVersions, 'XA61')
twix_obj.image.softwareVersion = 'XA61';
version=twix_obj.image.softwareVersion;
end

%find out what sequence, the data were acquired with. If this is a
%multi-raid file, then the header may contain multiple instances of
Expand All @@ -77,8 +81,10 @@
isjnMP=~isempty(strfind(sequence,'jn_MEGA_GABA')); %Is this Jamie Near's MEGA-PRESS sequence?
isjnseq=~isempty(strfind(sequence,'jn_')); %Is this another one of Jamie Near's sequences?
isWIP529=~isempty(strfind(sequence,'edit_529'));%Is this WIP 529 (MEGA-PRESS)?
ismodWIP=(~isempty(strfind(sequence,'\svs_edit')) && isempty(strfind(sequence,'edit_859'))); %Modified WIP
isWIP859=~isempty(strfind(sequence,'edit_859'));%Is this WIP 859 (MEGA-PRESS)?
ismodWIP=((~isempty(strfind(sequence,'\svs_edit'))||...
~isempty(strfind(sequence,'\wip_svs_edit'))) && isempty(strfind(sequence,'edit_859'))); %Modified WIP
isWIP859=~isempty(strfind(sequence,'edit_859'))||...;%Is this WIP 859 (MEGA-PRESS)?
~isempty(strfind(sequence,'WIP_859'));%Is this WIP 859 (MEGA-PRESS)? Other naming
isTLFrei=~isempty(strfind(sequence,'md_svs_edit')) ||... %Is Thomas Lange's MEGA-PRESS sequence
~isempty(strfind(sequence,'md_svs_slaser_edit')); %Is Thomas Lange's MEGA-s-LASER sequence
isMinn_eja=~isempty(strfind(sequence,'eja_svs_')); %Is this one of Eddie Auerbach's (CMRR, U Minnesota) sequences?
Expand Down Expand Up @@ -269,7 +275,7 @@
end

% Extract voxel dimensions
if (strcmp(version,'vd') || strcmp(version,'vb') || strcmp(version,'XA30'))
if (strcmp(version,'vd') || strcmp(version,'vb') || strcmp(version,'XA30') || strcmp(version,'XA61'))
TwixHeader.VoI_RoFOV = twix_obj.hdr.Config.VoI_RoFOV; % Voxel size in readout direction [mm]
TwixHeader.VoI_PeFOV = twix_obj.hdr.Config.VoI_PeFOV; % Voxel size in phase encoding direction [mm]
TwixHeader.VoIThickness = twix_obj.hdr.Config.VoI_SliceThickness; % Voxel size in slice selection direction [mm]
Expand Down Expand Up @@ -346,7 +352,7 @@
end

%Now index the dimension of the averages
if strcmp(version,'vd') || strcmp(version,'ve') || strcmp(version,'XA30')
if strcmp(version,'vd') || strcmp(version,'ve') || strcmp(version,'XA30') || strcmp(version,'XA61')
if isMinn_eja || isMinn_dkd || isConnectom
dims.averages=find(strcmp(sqzDims,'Set'));
else
Expand Down

0 comments on commit b72bc23

Please sign in to comment.