fmr_loadstc.m

来自「toolbox of BVQX, This is the access betw」· M 代码 · 共 47 行

M
47
字号
function hfile = fmr_LoadSTC(hfile)
% FMR::LoadSTCs  - load transio STC(s) of an FMR into memory
%
% FORMAT:       fmr.LoadSTCs;
%
% No input/output fields.

% Version:  v0.7b
% Build:    7083115
% Date:     Aug-31 2007, 3:21 PM CEST
% Author:   Jochen Weber, Brain Innovation, B.V., Maastricht, NL
% URL/Info: http://wiki.brainvoyager.com/BVQXtools

% argument check
if nargin ~= 1 || ...
    numel(hfile) ~= 1 || ...
   ~isBVQXfile(hfile, 'fmr')
    error( ...
        'BVQXfile:BadArgument', ...
        'Invalid call to %s.', ...
        mfilename ...
    );
end

% try to load transio objects
bc = bvqxfile_getcont(hfile.L);
dtsf = bc.DataStorageFormat;
for sc = 1:numel(bc.Slice)
    if istransio(bc.Slice(sc).STCData)
        try
            if dtsf == 1
                bc.Slice(sc).STCData = bc.Slice(sc).STCData(:, :, :);
            else
                bc.Slice(sc).STCData = bc.Slice(sc).STCData(:, :, :, :);
            end
        catch
            error( ...
                'BVQXfile:transioError', ...
                'Error resolving transio access.' ...
            );
        end
    end
end

% set back to memory
bvqxfile_setcont(hfile.L, bc);

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?