The program 'mattov' converts all data in a matlab mat-File into the vista data format.
mattov -in test.mat -out test.v
In our example, the mat-File 'test.mat' contains the following data
(in matlab):
>> whos
Name Size Bytes Class
a 30x40 9600 double array
b 100x100 40000 single array
c 20x1 40 int16 array
Grand total is 11220 elements using 49640 bytes
The output vista file contains exactly the same matrices as images. Different matrices
appear as different objects in the vista file which can be visualized using 'vxview'.
'mattov' can handle arrays of all data types.
The program 'vtomat' converts all images of a vista file into a mat-File. All vista image data types
are supported. 'Graph-files' are not supported.
vtomat -in file.v -out file.mat
Using 'vxview', the example 'file.v' looks as follows:
Under Matlab, the mat-file can be loaded. All variables are named 'objX' where 'X' is the object number
in the vista file.
>> load file.mat
>> whos
Name Size Bytes Class
obj0 256x256x5 327680 uint8 array
obj1 64x64x5 20480 uint8 array
obj2 64x64x480 3932160 int16 array
obj3 64x64x480 3932160 int16 array
obj4 64x64x480 3932160 int16 array
>> colormap gray;
>> imagesc(obj0(:,:,1)');
>>
In Lipsia, the functional MRI data are stored in different images (vista objects).
Each slice (row,column,time) is a single 3D-object which appears in the vista object list.
Thus, the number of functional slices coincides with the number of 'VShort' images in the vista file.
Normally, 'vtomat' converts all functional images of a vista file as separate matrices in the mat-file.
However, it is often useful to obtain a single 4-D image. This can be achieved using the option '-funconly true'.
If this option is used, all functional data (images of 'VShort' type) are saved into a matlab matrix named 'fnc'.
Non-functional images (anatomical, epiT1, tmaps, zmaps,...) are not converted.
vtomat -in file1.v -out file1.mat -funconly true
In this example, the vista file contains 5 functional slices (64x64) with 480 timesteps.
The mat-file 'file1.mat' can be loaded and processed under Matlab as follows:
>> load file1.mat
>> whos
Name Size Bytes Class
fnc 4-D 19660800 int16 array
Grand total is 9830400 elements using 19660800 bytes
>> size(fnc)
ans =
64 64 480 5
>> colormap gray;
>> imagesc(fnc(:,:,1,5)');
>>