-
Notifications
You must be signed in to change notification settings - Fork 6
Vistasoft downloads
We have started to use the Remote Data Toolbox with Vistasoft. Specifically, Jon Winawer modified the integrated testing code to pull down data sets from the 'vistasoft' rdt site. Thus, if you run the testing software, you are using the Remote Data Toolbox (RDT).
For the moment, to use the RDT you must have that repository pulled to your computer and placed on your Matlab path. That set of directories has the core functionality. The few specific features that are unique to Vistasoft are in the top-level Vistasoft directory named rdt. That directory contains the configuration file (rdt-config-vistasoft.json) needed to configure a remote data toolbox object for Vistasoft.
rd = RdtClient('vistasoft')
We expect to extend the usage of the RDT from core vistasoft to include other tools, such as AFQ, LiFE, and mRQ. At present, we have placed Vistasoft and AFQ on the site. From Matlab, after creating the rd client, you can browse the site with the command
rd.openBrowser
When you run the mrvTest routines, it now depends on the RDT. To run that routine for the bold data, you would type
logfile = mrvTest([], 'bold');
edit(logfile)
It also runs for 'diffusion' and 'anatomy'.
These scripts perform some simple copy of RDT data to your local machine
mrtGetValididationData;
mrtInstallSampleData
Typically, we download and read NIfTI files using this method
% Here they are. Vistasoft has a lot of nii.gz files in general
a = rd.listArtifacts('print',true,'type','gz');
% Here is the download with the destination specified
dFolder = fullfile(vistaRootPath,'local');
fname = rd.readArtifact(a(1),'destinationFolder',dFolder);
% But the file that is written out is good
disp(fname)
% And niftiRead works on the downloaded fname.
ni = niftiRead(fname)
You can also find bvec and bval files
To list the remote AFQ data paths
rd.crp('/AFQ/data');
rd.listRemotePaths('print',true);
And here are the template files (mat-files) stored at the site
rd.crp('/AFQ/templates');
rd.listArtifacts('print',true);
AFQ has an important mat-file 'afq.mat'. You can read it this way
rd.crp('/AFQ/data/');
d = rd.readArtifact('afq','type','mat');
afq = d.afq;