Skip to content

Commit

Permalink
MP2RAGE: Add magnitude-only data functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieuboudreau committed Nov 24, 2023
1 parent e55a5fa commit 9ba631d
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion src/Models/T1_relaxometry/mp2rage.m
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
noINV2phase = false;
availabledata.onlyUNI = false;
availabledata.allbutUNI = false;
availabledata.allMagbutUNI=false;
availabledata.all = false;

if ~isfield(data,'INV1mag'), data.INV1mag = []; end
Expand All @@ -123,6 +124,10 @@

availabledata.allbutUNI = true;

elseif ~noINV1mag && noINV1phase ~noINV2mag && noINV2phase && noUNI

availabledata.allMagbutUNI = true;

elseif ~noINV1mag && ~noINV1phase && ~noINV2mag && ~noINV2phase && ~noUNI

availabledata.all = true;
Expand Down Expand Up @@ -202,6 +207,20 @@
MP2RAGEimg.img = img;

clear('INV1','INV2','img');

elseif availabledata.allMagbutUNI

INV1 = data.INV1mag;
INV2 = data.INV2mag;

% Combination
img = (INV1.*INV2./(INV1.^2 + INV2.^2))*4095 + 2048;
img(img<0) = 0;
img(img>4095) = 4095;
FitResult.MP2RAGE = img;
MP2RAGEimg.img = img;

clear('INV1','INV2','img');

end

Expand Down Expand Up @@ -236,4 +255,4 @@
end % FIT RESULTS END
end % METHODS END

end % CLASSDEF END
end % CLASSDEF END

0 comments on commit 9ba631d

Please sign in to comment.