Exporting Data

From VISTA LAB WIKI

Jump to: navigation, search

Sometimes it is useful to export analyses conducted in mrVista for visualization or analysis using other software tools. A convenient format for exporting is NIFTI since it is a standard format.

The function 'functionals2itkGray.m' will export the currently displayed map in the GUI as a NIFTI-formatted volume. It will do this from a gray view or a volume view. (The two view types are the same except that the gray view restricts voxels to gray matter, whereas the volume view includes all voxels.) The export function can be called from the command line or accessed from the GUI under 'Xfrom/ Volume->itkGray/ write itkGray functional data overlay'. Note that when we say 'itkGray' we just mean standard 'NIFTI' format.

Example script to demonstrate how to do this from the command line starting from INPLANE data (slices), converting to a 3-D Volume view, and exporting as NIFTI files. The script assumes you have already run and saved a coranal (coherence analysis) from a retinotopy scan (e.g., rotating wedge or expanding ring).

% open the inplane view (assumed to contain a coherence analysis file from a retinopy scan)
ip = mrVista('Inplane');

% load the coranal file
ip = loadCorAnal(ip);

% open a 3d volume view
vol = mrVista('vol3view');
 
% transfer the coranal from the inplane view to the volume view
vol=ip2volCorAnal(ip,vol,0);

% select a scan to save
scan = 1;
 
% set display to coherence and save
vol=viewSet(vol, 'display mode', 'co');
functionals2itkGray(vol, scan, 'myCoherenceMap.nii.gz');
 
% set display to phase and save
vol=viewSet(vol, 'display mode', 'ph');
functionals2itkGray(vol, scan, 'myPhaseMap.nii.gz');

% set display to amplitude and save
vol=viewSet(vol, 'display mode', 'amp');
functionals2itkGray(vol, scan, 'myAmplitudeMap.nii.gz');
Personal tools