User Tools

Site Tools




The main motivation for using this function is the ability to flexibly script VTC creation from FMR files using transformation files created in BrainVoyager QX (coregistration initial and fine alignment, as well as ACPC and TAL normalization files).

Method reference ('vmr.Help('CreateVTC')')

 VMR::CreateVTC  - mimick BV's VTC creation
 FORMAT:       [vtc] = vmr.CreateVTC(fmr, afs, vtcfile, res, meth, bbox, dt);
 Input fields:
       fmr         FMR object to create VTC from
       afs         cell array: alignment file objects ({ia, fa, acpc, tal})
       vtcfile     filename of output VTC
       res         resolution (default: 3)
       meth        interpolation, 'cubic', 'lanczos3', {'linear'}, 'nearest'
       bbox        2x3 bounding box (optional, default: small TAL box)
       dt          datatype override (default: uint16, FV 2)
 Output fields:
       vtc         VTC object

Usage example

To load files manually and then creating a VTC, the following code can be used:

% load the required files
vmr = xff('*.vmr', 'Please select the VMR file to use as a reference...');
fmr = xff('*.fmr', 'Please select the FMR file to sample into VTC space...');
ia = xff('*IA*.trf', 'Please select the initial alignment (_IA.trf) file...');
fa = xff('*FA*.trf', 'Please select the fine alignment (_FA.trf) file...');
acpc = {xff('*ACPC*.trf', 'Please select the ACPC transformation file...')};
if ~isempty(acpc{1})
    tal = {xff('*.tal', 'Please select the TAL transformation file...')};
    if isempty(tal{1})
        tal = {};
        space = '_ACPC';
        space = '_TAL';
    acpc = {};
    space = '';
% make a call to vmr.CreateVTC (will save VTC already!)
vtc = vmr.CreateVTC(fmr, {ia, fa, acpc{:}, tal{:}}, ...
    strrep(fmr.FilenameOnDisk, '.fmr', [space '.vtc']), ...
    3, 'cubic', [], 2);
% clear objects
xffclearobjects({vtc, tal{:}, acpc{:}, fa, ia, fmr, vmr});
vmr.createvtc.txt · Last modified: 2010/08/11 15:35 by jochen