


Fisher Z score transformation
Usage:
rest_Corr2FisherZ(ACorrMap, AZScoreMap, AMaskFilename)
ACorrMapFilename, Input, Original Pearson Product Moment correlation map
AZScoreMapFilename, Output, Fisher Z score map
AMaskFilename, Input, Mask file
-----------------------------------------------------------
Copyright(c) 2007~2010
State Key Laboratory of Cognitive Neuroscience and Learning in Beijing Normal University
Written by Xiao-Wei Song
http://resting-fmri.sourceforge.net
Mail to Authors: <a href="Dawnwei.Song@gmail.com">Xiaowei Song</a>; <a href="ycg.yan@gmail.com">Chaogan Yan</a>
Version=1.3;
Release=20090321;
Revised by YAN Chao-Gan, 080610. NIFTI compatible
Last Revised by YAN Chao-Gan, 090321. Result data will be saved in the format 'single'.
-----------------------------------------------------------


0001 function rest_Corr2FisherZ(ACorrMapFilename, AZScoreMapFilename, AMaskFilename) 0002 % Fisher Z score transformation 0003 %Usage: 0004 % rest_Corr2FisherZ(ACorrMap, AZScoreMap, AMaskFilename) 0005 % ACorrMapFilename, Input, Original Pearson Product Moment correlation map 0006 % AZScoreMapFilename, Output, Fisher Z score map 0007 % AMaskFilename, Input, Mask file 0008 % 0009 %----------------------------------------------------------- 0010 % Copyright(c) 2007~2010 0011 % State Key Laboratory of Cognitive Neuroscience and Learning in Beijing Normal University 0012 % Written by Xiao-Wei Song 0013 % http://resting-fmri.sourceforge.net 0014 % Mail to Authors: <a href="Dawnwei.Song@gmail.com">Xiaowei Song</a>; <a href="ycg.yan@gmail.com">Chaogan Yan</a> 0015 % Version=1.3; 0016 % Release=20090321; 0017 % Revised by YAN Chao-Gan, 080610. NIFTI compatible 0018 % Last Revised by YAN Chao-Gan, 090321. Result data will be saved in the format 'single'. 0019 %----------------------------------------------------------- 0020 0021 if ~(nargin==3) error(' Error using ==> rest_Corr2FisherZ. 3 arguments wanted.'); end 0022 0023 %Load the original ReHo map file 0024 [BrainMap,VoxelSize, Header]=rest_readfile(ACorrMapFilename); 0025 nDim1 = size(BrainMap,1); nDim2 = size(BrainMap,2); nDim3 = size(BrainMap,3); 0026 BrainSize = [nDim1 nDim2 nDim3]; VoxelSize =VoxelSize'; 0027 mask=rest_loadmask(nDim1, nDim2, nDim3, AMaskFilename); 0028 0029 pos=find(mask); 0030 BrainMap(pos) =0.5 * log((1 +BrainMap(pos))./(1- BrainMap(pos))); 0031 rest_writefile(single(BrainMap),AZScoreMapFilename,BrainSize,VoxelSize,Header, 'single'); %Revised by YAN Chao-Gan, 090321. Result data will be stored in 'single' format. %'double'); 0032 0033