Compute connection count and mean fiber length Input dir_name: Directory name where voxel images made by 'fsl2ascii' locate trackfile: .tck file made by streamtrack in MRtrix [relative path to dir_name] ofile: Output file containing mm coodinate of all the voxels in the mask [absolute path] Nlabel: Number of label files cfile: MAT file containing connection parameters to be saved [absolute path] 2012/06/15 M.Fukushima 2012/06/26 M.Fukushima 2014/05/29 rhayashi Input arugment Nlabel is deleted. Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function save_connection(dir_name, trackfile, ofile, cfile) 0002 % Compute connection count and mean fiber length 0003 % Input 0004 % dir_name: Directory name where voxel images made by 'fsl2ascii' locate 0005 % trackfile: .tck file made by streamtrack in MRtrix 0006 % [relative path to dir_name] 0007 % ofile: Output file containing mm coodinate of all the voxels in the mask 0008 % [absolute path] 0009 % Nlabel: Number of label files 0010 % cfile: MAT file containing connection parameters to be saved 0011 % [absolute path] 0012 % 0013 % 2012/06/15 M.Fukushima 0014 % 2012/06/26 M.Fukushima 0015 % 2014/05/29 rhayashi Input arugment Nlabel is deleted. 0016 % 0017 % Copyright (C) 2011, ATR All Rights Reserved. 0018 % License : New BSD License(see VBMEG_LICENSE.txt) 0019 0020 % % Add path to MRtrix directory 0021 % addpath('/usr/share/mrtrix/matlab'); 0022 0023 tic 0024 % Compute connection count and mean fiber length 0025 [connect, count, fiber_length, mfiber_length, Noverlap, track_parm] = ... 0026 calc_connection(dir_name, trackfile, ofile); 0027 toc 0028 0029 % Save parameters 0030 save(cfile,'connect','count','fiber_length','mfiber_length','Noverlap','track_parm');