?? voi_bvcoords.m
字號:
function bvc = voi_BVCoords(hfile, voi)
% VOI::BV1Coords - return BV system coords for a voi
%
% FORMAT: bvc = voi.BVCoords(voi)
%
% Input fields:
%
% voi number of name of VOI
%
% Output fields:
%
% bvc Nx3 coords (e.g. to index into 256^3 VMR space)
% Version: v0.7b
% Build: 7090215
% Date: Sep-02 2007, 3:10 PM CEST
% Author: Jochen Weber, Brain Innovation, B.V., Maastricht, NL
% URL/Info: http://wiki.brainvoyager.com/BVQXtools
% argument check
if nargin < 2 || ...
numel(hfile) ~= 1 || ...
~isBVQXfile(hfile, 'voi') || ...
(~ischar(voi) && ~isa(voi, 'double')) || ...
isempty(voi)
error( ...
'BVQXfile:BadArguments', ...
'Invalid call to %s.', ...
mfilename ...
);
end
bc = bvqxfile_getcont(hfile.L);
numvois = numel(bc.VOI);
if ischar(voi)
voiok = false;
for vc = numvois
if ~isempty(regexpi(bc.VOI(vc).Name, lower(voi(:)')))
voiok = true;
brea;
end
end
if ~voiok
error( ...
'BVQXfile:InvalidName', ...
'Named VOI not found.' ...
);
end
voi = vc;
else
voi = real(voi(:)');
if any(isinf(voi) | isnan(voi) | voi < 1 | voi > numvois) || ...
numel(unique(fix(voi))) ~= numel(voi)
error( ...
'BVQXfile:BadArgument', ...
'Invalid VOI selection.' ...
);
end
voi = fix(voi);
end
% get voi
voi = bc.VOI(voi);
% initialize bvc
bvc = voi.Voxels;
% transform?
if strcmpi(bc.CoordsType, 'tal')
bvc = tal2bv(bvc')';
end
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -