-
Notifications
You must be signed in to change notification settings - Fork 141
t_initVistaSession
html { min-height:100%; margin-bottom:1px; } html body { height:100%; margin:0px; font-family:Arial, Helvetica, sans-serif; font-size:10px; color:#000; line-height:140%; background:#fff none; overflow-y:scroll; } html body td { vertical-align:top; text-align:left; }
h1 { padding:0px; margin:0px 0px 25px; font-family:Arial, Helvetica, sans-serif; font-size:1.5em; color:#d55000; line-height:100%; font-weight:normal; } h2 { padding:0px; margin:0px 0px 8px; font-family:Arial, Helvetica, sans-serif; font-size:1.2em; color:#000; font-weight:bold; line-height:140%; border-bottom:1px solid #d6d4d4; display:block; } h3 { padding:0px; margin:0px 0px 5px; font-family:Arial, Helvetica, sans-serif; font-size:1.1em; color:#000; font-weight:bold; line-height:140%; }
a { color:#005fce; text-decoration:none; } a:hover { color:#005fce; text-decoration:underline; } a:visited { color:#004aa0; text-decoration:none; }
p { padding:0px; margin:0px 0px 20px; } img { padding:0px; margin:0px 0px 20px; border:none; } p img, pre img, tt img, li img, h1 img, h2 img { margin-bottom:0px; }
ul { padding:0px; margin:0px 0px 20px 23px; list-style:square; } ul li { padding:0px; margin:0px 0px 7px 0px; } ul li ul { padding:5px 0px 0px; margin:0px 0px 7px 23px; } ul li ol li { list-style:decimal; } ol { padding:0px; margin:0px 0px 20px 0px; list-style:decimal; } ol li { padding:0px; margin:0px 0px 7px 23px; list-style-type:decimal; } ol li ol { padding:5px 0px 0px; margin:0px 0px 7px 0px; } ol li ol li { list-style-type:lower-alpha; } ol li ul { padding-top:7px; } ol li ul li { list-style:square; }
.content { font-size:1.2em; line-height:140%; padding: 20px; }
pre, code { font-size:12px; } tt { font-size: 1.2em; } pre { margin:0px 0px 20px; } pre.codeinput { padding:10px; border:1px solid #d3d3d3; background:#f7f7f7; } pre.codeoutput { padding:10px 11px; margin:0px 0px 20px; color:#4c4c4c; } pre.error { color:red; }
@media print { pre.codeinput, pre.codeoutput { word-wrap:break-word; width:100%; } }
span.keyword { color:#0000FF } span.comment { color:#228B22 } span.string { color:#A020F0 } span.untermstring { color:#B20000 } span.syscmd { color:#B28C00 }
.footer { width:auto; padding:10px 0px; margin:25px 0px 0px; border-top:1px dotted #878787; font-size:0.8em; line-height:140%; font-style:italic; color:#878787; text-align:left; float:none; } .footer p { margin:0px; } .footer a { color:#878787; } .footer a:hover { color:#878787; text-decoration:underline; } .footer a:visited { color:#878787; }
table th { padding:7px 5px; text-align:left; vertical-align:middle; border: 1px solid #d6d4d4; font-weight:bold; } table td { padding:7px 5px; text-align:left; vertical-align:top; border:1px solid #d6d4d4; }
</style>
Illustrates how to initialize a mrVista session with functional MRI data using sample data set erniePRF
Dependencies: Remote Data Toolbox
This tutorial is part of a sequence. Run t_initAnatomyFromFreesurfer prior to running this tutorial.
Summary
- Download erniePRF sample data set - Create new folder, and move EPI and inplane files there - Specify session parameters - Initialize and visualize
Tested 07/21/2016 - MATLAB r2015a, Mac OS 10.11.6
See also: t_initAnatomyFromFreesurfer
Winawer lab (NYU)
% Remember where we are curdir = pwd();% If we find the directory, do not bother unzipping again forceOverwrite = true;
% Get it erniePRFOrig = mrtInstallSampleData('functional', 'erniePRF', [], forceOverwrite);
% Create a new directory in 'scratch' for the tutorial erniePathTemp = fullfile(vistaRootPath, 'local', 'scratch', 'erniePRF');% Navigate and create a directory cd(erniePathTemp)
% Set up Raw data file directory mkdir Raw;
% These are the EPI and inplane files downloaded with the pRF sample data fname{1} = fullfile(erniePRFOrig, 'Raw', 'Ernie_EPI01.nii.gz'); fname{2} = fullfile(erniePRFOrig, 'Raw', 'Ernie_EPI02.nii.gz'); fname{3} = fullfile(erniePRFOrig, 'Raw', 'Ernie_EPI03.nii.gz'); fname{4} = fullfile(erniePRFOrig, 'Raw', 'ErnieInplane.nii.gz');
% Move the files from the downloaded directory to the new, clear directory for ii = 1:length(fname) copyfile(fname{ii}, fullfile(erniePathTemp, 'Raw')); end
Warning: Directory already exists.
% These files have been copied to the scratch directory. Use local paths. epiFile{1} = fullfile('Raw','Ernie_EPI01.nii.gz'); epiFile{2} = fullfile('Raw','Ernie_EPI02.nii.gz'); epiFile{3} = fullfile('Raw','Ernie_EPI03.nii.gz'); inplaneFile = fullfile('Raw','ErnieInplane.nii.gz'); anatFile = fullfile('3DAnatomy', 't1.nii.gz');% Generate the expected generic params structure params = mrInitDefaultParams;
% And insert the required parameters: params.inplane = inplaneFile; params.functionals = epiFile; params.sessionDir = erniePathTemp;
% Specify some optional parameters % 3D volume anatomy (originally from freesurfer) params.vAnatomy = anatFile; % Drop the first 8 volumes in each scan, keep remaining volumes params.keepFrames = [8 -1; 8 -1; 8 -1]; % Subject ID. For most labs, it is probably safest to use an % anonymized coding scheme params.subject = 'Ernie'; % Name for each of the three scans params.annotations = {'PRF 1', 'PRF 2', 'PRF 3'};
% Do the initialization: ok = mrInit(params);
% Open a graphical user interface to ensure that we succeeded vw = mrVista('inplane');
***** [mrInit] Initializing Session erniePRF ***** (21-Jul-2016 10:06:23) [niftiCheckQto] NIFTI header origin is at or outside the image volume. [niftiCheckQto] Origin to the image center [52.000,40.000,12.000] pix. [niftiCheckQto] NIFTI header origin is at or outside the image volume. [niftiCheckQto] Origin to the image center [52.000,40.000,12.000] pix. [niftiCheckQto] NIFTI header origin is at or outside the image volume. [niftiCheckQto] Origin to the image center [52.000,40.000,12.000] pix. [mrInit]: Finished initializing mrVista session. (21-Jul-2016 10:06:25) [niftiCheckQto] NIFTI header origin is at or outside the image volume. [niftiCheckQto] Origin to the image center [80.000,104.000,12.000] pix. ***** [mrInit] Finished Initializing Session erniePRF (21-Jul-2016 10:06:25)***** Initializing Inplane view Attaching menus [niftiCheckQto] NIFTI header origin is at or outside the image volume. [niftiCheckQto] Origin to the image center [80.000,104.000,12.000] pix. Attaching popup menus Attaching sliders Could not find /Users/jonathanwinawer/matlab/git/vistasoft/local/scratch/erniePRF/Inplane/userPrefs.mat Done initializing Inplane view

close(viewGet(vw, 'figure number'); mrvCleanWorkspace cd(curdir)
%% t_initVistaSession % % Illustrates how to initialize a mrVista session with functional MRI data % using sample data set % % Dependencies: % Remote Data Toolbox % % This tutorial is part of a sequence. Run % t_initAnatomyFromFreesurfer % prior to running this tutorial. % % Summary % % - Download sample data set % - Create new folder, and move EPI and inplane files there % - Specify session parameters % - Initialize and visualize % % Tested 07/21/2016 - MATLAB r2015a, Mac OS 10.11.6 % % See also: t_initAnatomyFromFreesurfer % % Winawer lab (NYU)
%% Download ernie raw MRI data
% Remember where we are curdir = pwd();
% If we find the directory, do not bother unzipping again forceOverwrite = true;
% Get it erniePRFOrig = mrtInstallSampleData('functional', 'erniePRF', [], forceOverwrite);
%% Organize functional data
% Create a new directory in 'scratch' for the tutorial erniePathTemp = fullfile(vistaRootPath, 'local', 'scratch', 'erniePRF');
% Navigate and create a directory cd(erniePathTemp)
% Set up Raw data file directory mkdir Raw;
% These are the EPI and inplane files downloaded with the pRF sample data fname{1} = fullfile(erniePRFOrig, 'Raw', 'Ernie_EPI01.nii.gz'); fname{2} = fullfile(erniePRFOrig, 'Raw', 'Ernie_EPI02.nii.gz'); fname{3} = fullfile(erniePRFOrig, 'Raw', 'Ernie_EPI03.nii.gz'); fname{4} = fullfile(erniePRFOrig, 'Raw', 'ErnieInplane.nii.gz');
% Move the files from the downloaded directory to the new, clear directory
for ii = 1:length(fname)
copyfile(fname{ii}, fullfile(erniePathTemp, 'Raw'));
end
%% Initialize a vistasoft session
% These files have been copied to the scratch directory. Use local paths. epiFile{1} = fullfile('Raw','Ernie_EPI01.nii.gz'); epiFile{2} = fullfile('Raw','Ernie_EPI02.nii.gz'); epiFile{3} = fullfile('Raw','Ernie_EPI03.nii.gz'); inplaneFile = fullfile('Raw','ErnieInplane.nii.gz'); anatFile = fullfile('3DAnatomy', 't1.nii.gz');
% Generate the expected generic params structure params = mrInitDefaultParams;
% And insert the required parameters: params.inplane = inplaneFile; params.functionals = epiFile; params.sessionDir = erniePathTemp;
% Specify some optional parameters % 3D volume anatomy (originally from freesurfer) params.vAnatomy = anatFile; % Drop the first 8 volumes in each scan, keep remaining volumes params.keepFrames = [8 -1; 8 -1; 8 -1]; % Subject ID. For most labs, it is probably safest to use an % anonymized coding scheme params.subject = 'Ernie'; % Name for each of the three scans params.annotations = {'PRF 1', 'PRF 2', 'PRF 3'};
% Do the initialization: ok = mrInit(params);
% Open a graphical user interface to ensure that we succeeded vw = mrVista('inplane');
%% Clean up % close(viewGet(vw, 'figure number'); % mrvCleanWorkspace % cd(curdir)
-->
- Vistasoft
- Getting Started
- mrVista Overview
- Anatomy
- Functional MRI
- mrVista
- Retinotopy tutorial
- Population RF methods also prf Model, prf_tutorial, prf tutorial
- Diffusion weighted MRI
- Visualization
- Tractography
- Tutorials
- Software overview