Home > file > feWriteValues2nifti.m

feWriteValues2nifti

PURPOSE ^

Write the vals in the nifti file named fileName

SYNOPSIS ^

function ni = feWriteValues2nifti(stats,fileName,xForm2Acpc)

DESCRIPTION ^

 Write the vals in the nifti file named fileName 
 
 ni = feWriteValues2nifti(stats,fileName,xForm2Acpc)


 Write statistics computed for each voxel in an ROI into a nifti image.
 
 stats is a 3d volume containing values at the coordinate sof an roi.

 
 See also:

 Example:
    feWriteValues2nifti(fd,'fiberDensity_of_some_roi',xform)

 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 ni = feWriteValues2nifti(stats,fileName,xForm2Acpc)
0002 % Write the vals in the nifti file named fileName
0003 %
0004 % ni = feWriteValues2nifti(stats,fileName,xForm2Acpc)
0005 %
0006 %
0007 % Write statistics computed for each voxel in an ROI into a nifti image.
0008 %
0009 % stats is a 3d volume containing values at the coordinate sof an roi.
0010 %
0011 %
0012 % See also:
0013 %
0014 % Example:
0015 %    feWriteValues2nifti(fd,'fiberDensity_of_some_roi',xform)
0016 %
0017 % Copyright (2013-2014), Franco Pestilli, Stanford University, pestillifranco@gmail.com.
0018 
0019 % Create the nifti structure
0020 ni  = niftiCreate('data',stats, ...
0021     'qto_xyz',xForm2Acpc, ...
0022     'fname',fileName, ...
0023     'data_type',class(stats));
0024 
0025 % Write the file.  Saved as a nii.gz
0026 niftiWrite(ni)
0027 
0028 end
0029

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