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

📄 vtc2vmp.m

📁 VTC file is the file format of the Brainvoyager. The FMRI matchine scan human s brain and get the vt
💻 M
字号:
function vtc2vmp(path, vtc, output);
% syntax: vtc2vmp(path, vtc, output);
% this func gets a vtc with 1 value at each voxel (1 point TC), and make a
% VMP from it (actually write this value (normalized between 0-1) in a
% correlation map format)
% 
% This function was written by:
% Hagar Gelbard
% Rafi Malach's Lab
% Weizmann Institute of Science
% Rehovot, Israel
% hagar.gelbard@weizmann.ac.il

datestr(now)

% open the vtc file for reading  
fid = fopen([path vtc '.vtc'],'r');
[NoOfVolumes, cols, rows, slices] = vtcMoveToAfterHeaderPosition(fid);

voxelsNo = cols*rows*slices;
vmpVec = zeros(1,voxelsNo);

for k = 1:voxelsNo
       fseek(fid, 0, 'cof');
        vmpVec(k) = fread(fid, 1, 'uint16');
end

vmpVec = vmpVec / max(vmpVec);
writeVMP(path, output, vmpVec, 3, 10 ,0.1,1);

fclose('all');
datestr(now)

⌨️ 快捷键说明

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