⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vmp_update.m

📁 toolbox of BVQX, This is the access between BV and matlab. It will help you to analysis data from BV
💻 M
📖 第 1 页 / 共 2 页
字号:
function hfile = vmp_Update(hfile, F, S, V)
% VMP::Update  - called after subsasgn for VMPs

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

% persistent config
persistent bvqxfile_vmp;
if isempty(bvqxfile_vmp)
    bvqxfile_vmp = struct;
    
    bvqxfile_vmp.fdr = [0.1, 0.05, 0.04, 0.03, 0.02, 0.01, 0.005, 0.001];

    bvqxfile_vmp.fields = cell(1, 5);
    bvqxfile_vmp.fields{2} = ...
        {'NativeResolutionFile', 'FileVersion', 'NrOfMaps', 'Map', ...
         'VMRDimX', 'VMRDimY', 'VMRDimZ', ...
         'XStart', 'XEnd', 'YStart', 'YEnd', 'ZStart', 'ZEnd', ...
         'Resolution'};
    bvqxfile_vmp.fields{3} = bvqxfile_vmp.fields{2};
    bvqxfile_vmp.fields{4} = bvqxfile_vmp.fields{2};
    bvqxfile_vmp.fields{5} = ...
        {'NativeResolutionFile', 'FileVersion', 'DocumentType', ...
         'NrOfMaps', 'NrOfTimePoints', 'NrOfMapParameters', ...
         'ShowParamsRangeFrom', 'ShowParamsRangeTo', ...
         'FingerprintParamsRangeFrom', 'FingerprintParamsRangeTo', ...
         'XStart', 'XEnd', 'YStart', 'YEnd', 'ZStart', 'ZEnd', 'Resolution', ...
         'DimX', 'DimY', 'DimZ', 'VMRData', ...
         'VMRDimX', 'VMRDimY', 'VMRDimZ', ...
         'OriginatingVTC', 'LinkedPRT', 'OptionalVOI', ...
         'Map', 'MapParameter'};

    bvqxfile_vmp.map_fields = cell(1, 5);
    bvqxfile_vmp.map_fields{2} = ...
        {'Type', 'NrOfLags', 'MinLag', 'MaxLag', 'CCOverlay', ...
         'ClusterSize', 'EnableClusterCheck', ...
         'LowerThreshold', 'UpperThreshold', 'UseValuesAboveThresh', ...
         'DF1', 'DF2', 'BonferroniValue', ...
         'RGBLowerThreshPos', 'RGBUpperThreshPos', ...
         'RGBLowerThreshNeg', 'RGBUpperThreshNeg', ...
         'UseRGBColor', 'TransColorFactor', 'Name', 'VMPData'};
    bvqxfile_vmp.map_fields{3} = bvqxfile_vmp.map_fields{2};
    bvqxfile_vmp.map_fields{4} = ...
        {'Type', 'NrOfLags', 'MinLag', 'MaxLag', 'CCOverlay', ...
         'ClusterSize', 'EnableClusterCheck', ...
         'LowerThreshold', 'UpperThreshold', 'UseValuesAboveThresh', ...
         'DF1', 'DF2', 'ShowPositiveNegativeFlag', 'BonferroniValue', ...
         'RGBLowerThreshPos', 'RGBUpperThreshPos', ...
         'RGBLowerThreshNeg', 'RGBUpperThreshNeg', ...
         'UseRGBColor', 'TransColorFactor', 'Name', 'VMPData'};
    bvqxfile_vmp.map_fields{5} = ...
        {'Type', 'LowerThreshold', 'UpperThreshold', 'Name', ...
         'RGBLowerThreshPos', 'RGBUpperThreshPos', ...
         'RGBLowerThreshNeg', 'RGBUpperThreshNeg', ...
         'UseRGBColor', 'TransColorFactor', ...
         'NrOfLags', 'MinLag', 'MaxLag', 'CCOverlay', ...
         'ClusterSize', 'EnableClusterCheck', ...
         'LowerThreshold', 'LowerThreshold', 'UseValuesAboveThresh', ...
         'DF1', 'DF2', 'ShowPositiveNegativeFlag', 'BonferroniValue', ...
         'NrOfFDRThresholds', 'FDRThresholds', ...
         'UnknownValue', 'TimePointData', 'VMPData'};

    bvqxfile_vmp.defaults = {[], struct( ...
        'NativeResolutionFile', 0, ...
        'FileVersion',          4, ...
        'NrOfMaps',             0, ...
        'Map',                  cell2struct(cell(0, 0, 21), ...
            {'Type', 'NrOfLags', 'MinLag', 'MaxLag', 'CCOverlay', ...
             'ClusterSize', 'EnableClusterCheck', ...
             'LowerThreshold', 'UpperThreshold', 'UseValuesAboveThresh', ...
             'DF1', 'DF2', 'BonferroniValue', ...
             'RGBLowerThreshPos', 'RGBUpperThreshPos', ...
             'RGBLowerThreshNeg', 'RGBUpperThreshNeg', ...
             'UseRGBColor', 'TransColorFactor', 'Name', 'VMPData'}, 3), ...
        'VMRDimX',              256, ...
        'VMRDimY',              256, ...
        'VMRDimZ',              256, ...
        'XStart',               57, ...
        'XEnd',                 231, ...
        'YStart',               52, ...
        'YEnd',                 172, ...
        'ZStart',               59, ...
        'ZEnd',                 197, ...
        'Resolution',           3 ...
      ), [], struct( ...
        'NativeResolutionFile', 0, ...
        'FileVersion',          4, ...
        'NrOfMaps',             0, ...
        'Map',                  cell2struct(cell(0, 0, 22), ...
            {'Type', 'NrOfLags', 'MinLag', 'MaxLag', 'CCOverlay', ...
             'ClusterSize', 'EnableClusterCheck', ...
             'LowerThreshold', 'UpperThreshold', 'UseValuesAboveThresh', ...
             'DF1', 'DF2', 'ShowPositiveNegativeFlag', 'BonferroniValue', ...
             'RGBLowerThreshPos', 'RGBUpperThreshPos', ...
             'RGBLowerThreshNeg', 'RGBUpperThreshNeg', ...
             'UseRGBColor', 'TransColorFactor', 'Name', 'VMPData'}, 3), ...
        'VMRDimX',              256, ...
        'VMRDimY',              256, ...
        'VMRDimZ',              256, ...
        'XStart',               57, ...
        'XEnd',                 231, ...
        'YStart',               52, ...
        'YEnd',                 172, ...
        'ZStart',               59, ...
        'ZEnd',                 197, ...
        'Resolution',           3 ...
      ), struct( ...
        'NativeResolutionFile',         1, ...
        'FileVersion',                  5, ...
        'DocumentType',                 1, ...
        'NrOfMaps',                     0, ...
        'NrOfTimePoints',               0, ...
    	'NrOfMapParameters',            0, ...
        'ShowParamsRangeFrom',          0, ...
        'ShowParamsRangeTo',            0, ...
        'FingerprintParamsRangeFrom',   0, ...
        'FingerprintParamsRangeTo',     0, ...
        'XStart',                       57, ...
        'XEnd',                         231, ...
        'YStart',                       52, ...
        'YEnd',                         172, ...
        'ZStart',                       59, ...
    	'ZEnd',                         197, ...
        'Resolution',                   3, ...
        'VMRDimX',                      256, ...
        'VMRDimY',                      256, ...
        'VMRDimZ',                      256, ...
        'OriginatingVTC',               '', ...
        'LinkedPRT',                    '', ...
        'OptionalVOI',                  '', ...
        'Map',                          cell2struct(cell(0, 0, 26), ...
            {'Type', 'LowerThreshold', 'UpperThreshold', 'Name', ...
             'RGBLowerThreshPos', 'RGBUpperThreshPos', ...
             'RGBLowerThreshNeg', 'RGBUpperThreshNeg', ...
             'UseRGBColor', 'TransColorFactor', ...
             'NrOfLags', 'MinLag', 'MaxLag', 'CCOverlay', ...
             'ClusterSize', 'EnableClusterCheck', 'UseValuesAboveThresh', ...
             'DF1', 'DF2', 'ShowPositiveNegativeFlag', 'BonferroniValue', ...
             'NrOfFDRThresholds', 'FDRThresholds', ...
             'UnknownValue', 'TimePointData', 'VMPData'}, 3), ...
        'MapParameter',                 cell2struct(cell(0, 0, 2), ...
            {'Name', 'Values'}, 3) ...
    )};
    bvqxfile_vmp.defaults{3} = bvqxfile_vmp.defaults{2};
    
end

% argument check
if nargin < 2 || ...
    numel(hfile) ~= 1 || ...
   ~isBVQXfile(hfile(:), 'vmp') || ...
   ~ischar(F) || ...
    isempty(F)
    error( ...
        'BVQXfile:BadArgument', ...
        'Invalid call to %s.', ...
        mfilename ...
    );
end
if nargin < 3 || ...
   ~isstruct(S)
    S = struct;
    S.type = '.';
    S.subs = F;
end
if nargin < 4
    V = [];
end

% get content
bc = bvqxfile_getcont(hfile.L);

% linearize
F = makelabel(F(:)');

% F valid
if ~isfield(bc, F)
    error( ...
        'BVQXfile:InvalidProperty', ...
        'Cannot find property ''%s'' for type VMP.', ...
        F ...
    );
end

% what field has changed
switch (lower(F))

    % changing file version
    case {'fileversion'}

        % get wanted and old version
        reqv = bc.FileVersion;
        oldv = V;

⌨️ 快捷键说明

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