Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Fix nargin check #3

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,5 @@ $RECYCLE.BIN/
Network Trash Folder
Temporary Items
.apdisk

data
10 changes: 5 additions & 5 deletions func/B1mappingSa2RAGElookuptable.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function [B1vector Intensity Signal]=B1mappingSa2RAGElookuptable(nimage,MPRAGE_tr,invtimesAB,flipangleABdegree,nZslices,FLASH_tr,varargin)
function [B1vector,Intensity,Signal]=B1mappingSa2RAGElookuptable(nimage,MPRAGE_tr,invtimesAB,flipangleABdegree,nZslices,FLASH_tr,varargin)
% usage
% [B1map]=B1mappingSa2RAGE(Rationii,nimage,MPRAGE_tr,invtimesAB,flipangleABdegree,nZslices,FLASH_tr,varargin)
% varargin{1} is a phase image
Expand All @@ -9,7 +9,7 @@
T1average=1.5;
else
T1average=varargin{2};
end;
end
T1average;
B1vector=0.005:0.005:2.5;

Expand All @@ -24,7 +24,7 @@
nZ_bef=nZslices/2;
nZ_aft=nZslices/2;
nZslices2=(nZslices);
end;
end



Expand All @@ -35,8 +35,8 @@
Signal(m,1:2)=1*MPRAGEfunc(nimage,MPRAGE_tr,invtimesAB,nZslices2,FLASH_tr,B1*[flipangleABdegree],'normal',T1average,-cos((B1*pi/2)));
else
Signal(m,1:2)=0;
end;
end;
end
end

Intensity=squeeze(real(Signal(:,1))./(real(Signal(:,2))));
B1vector=squeeze(B1vector);
22 changes: 11 additions & 11 deletions func/MP2RAGE_lookuptable.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

function [Intensity T1vector IntensityBeforeComb]=MP2RAGE_lookuptable(nimages,MPRAGE_tr,invtimesAB,flipangleABdegree,nZslices,FLASH_tr,sequence,varargin)
function [Intensity,T1vector,IntensityBeforeComb]=MP2RAGE_lookuptable(nimages,MPRAGE_tr,invtimesAB,flipangleABdegree,nZslices,FLASH_tr,sequence,varargin)
% first extra parameter is the inversion efficiency
% second extra parameter is the alldata
% if ==1 all data is shown
Expand Down Expand Up @@ -31,7 +31,7 @@
nZ_bef=nZslices/2;
nZ_aft=nZslices/2;
nZslices2=(nZslices);
end;
end



Expand All @@ -55,16 +55,16 @@
else
Signal(j,m,1:2)=1*MPRAGEfunc(nimages,MPRAGEtr,inversiontimes2,nZslices2,FLASH_tr,B1*[flipanglea flipangleb],sequence,T1);

end;
end;
end
end
else
Signal(j,m,1:2)=0;
end;
end;
end;
end;
end;
end;
end
end
end
end
end
end
Intensity=squeeze(real(Signal(:,:,1).*conj(Signal(:,:,2)))./(abs(Signal(:,:,1)).^2+abs(Signal(:,:,2)).^2));
T1vector=squeeze(T1vector);
if alldata==0
Expand All @@ -78,4 +78,4 @@
Intensity=squeeze(real(Signal(:,:,1).*conj(Signal(:,:,2)))./(abs(Signal(:,:,1)).^2+abs(Signal(:,:,2)).^2));
T1vector=squeeze(T1vector);
IntensityBeforeComb=squeeze(Signal(:,1,:));
end;
end
Loading