BrainVoyager Support

documentation overview

  • Increase font size
  • Default font size
  • Decrease font size

Example VOI Transformation

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% VOItoTAL.m
%
% Converts a .voi file from native to TAL coordinates using
% ACPC .trf and .tal files as inputs. This script assumes the .voi file
% was created in a .vmr with 256 bounding box in all directions.
%
% -Requires .voi created in .vmr with 256 bounding box.
% -Requires .tal files in version 1 (delete all lines except "Project"
% and tal points.
% -Uses functions in BVQXtool_v08d with the following change to line 98
% of voi_ApplyTrf.m in /BVQXtools_v08d/@BVQXfile/private/:
% vox = zeros(sum(nvox), 3);
%
% 1/24/12: Script from Jochen Weber. (John Pyles)
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%% load VOI
voi = BVQXfile('*.voi');

%% load ACPC trf
trf = BVQXfile('*ACPC*.trf');

%% load TAL
tal = BVQXfile('*.tal');

%% change into TAL format
for vc = 1:numel(voi.VOI)
voi.VOI(vc).Voxels = 128 - voi.VOI(vc).Voxels(:, [3, 1, 2]);
end
voi.ReferenceSpace = 'TAL';

%% then apply TRF and TAL files
voi.ApplyTrf({trf,tal});

%% then save as...
voi.SaveAs;