Home > file > feConnectomeWrite.m

feConnectomeWrite

PURPOSE ^

Writes the Connectome (the fiber group, fe.fg) taking care of the coordinate system.

SYNOPSIS ^

function fg_file = feConnectomeWrite(fe,saveDir,fileType)

DESCRIPTION ^

 Writes the Connectome (the fiber group, fe.fg) taking care of the coordinate system. 

 fg_file = feConnectomeWrite(fe,[saveDir],[fileType])


 Copyright (2013-2014), Franco Pestilli, Stanford University, pestillifranco@gmail.com.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function fg_file = feConnectomeWrite(fe,saveDir,fileType)
0002 % Writes the Connectome (the fiber group, fe.fg) taking care of the coordinate system.
0003 %
0004 % fg_file = feConnectomeWrite(fe,[saveDir],[fileType])
0005 %
0006 %
0007 % Copyright (2013-2014), Franco Pestilli, Stanford University, pestillifranco@gmail.com.
0008 
0009 % Default directory for saving the fiber group is the LIFE folder where the
0010 % the fe structure is saved by default.
0011 if notDefined('saveDir'),saveDir = feGet(fe,'save dir');end
0012 if notDefined('fileType'),fileType = 'mat';end
0013 
0014 % Build a file name.
0015 fg_file = fullfile(saveDir,sprintf('%s_FG',feGet(fe,'name')));
0016 
0017 % Write the fiber group always in acpc coordinates,
0018 % Also, we always save as .mat
0019 fprintf('[%s] Saving connectome: %s.%s\n',mfilename,fg_file,fileType)
0020 fgWrite(feGet(fe,'fg acpc'),fg_file,fileType); 
0021 % Note .pdb seem to not save correctly by fgWrite.
0022 % Maybe a problem with pathwaysInfo?
0023 
0024 return

Generated on Wed 02-Jul-2014 17:17:39 by m2html © 2005