% Comput T value

function [Romap] = Compute_Nonp_Tmap(Pvalue,dof,brain_mask,Romap,M,N)
%---------- computing Tmaps for regression ------------------%
[R C B] = size(Pvalue);
for m = 1:M
    for n = 1:N
        if brain_mask(m,n) == 1
                Romap(m,n) = spm_invTcdf(1-Pvalue(m,n),dof);
        end
    end
end