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

📄 map.bff

📁 toolbox of BVQX, This is the access between BV and matlab. It will help you to analysis data from BV
💻 BFF
字号:
# BinaryFileFormat (leave this tag as its own magic token!)

# BVQX file format for *.MAP files (MAP of slice statistics)
# MAP FileVersions supported: 2
#
# Version:  v0.7a
# Build:    7081203
# Date:     Aug-12 2007, 3:21 AM CEST
# Author:   Jochen Weber, Brain Innovation, B.V., Maastricht, NL
# URL/Info: http://wiki.brainvoyager.com/BVQXtools

# FILE FORMAT
Description:Functional MRI map files
EncodingSyntax:ieee-le
Extensions:map

# FIELDS
ListOfFields:!
type  !cond                   !disktype!datatype!dim                      !default !varname

# correctly handle Type, NrOfSlices
EXPRE !$BFFWRITE          !!!!!@CombinedTypeSlices = 10000 * @Type + @NrOfSlices; if @Type == 0, @NrOfSlices = 0; end
EXPRE !$BFFREAD           !!!!!@Type = 1; @NrOfSlices = 25;
FIELD !                       !uint16  !double  !1, 1                     !        !CombinedTypeSlices
EXPRE !$BFFREAD           !!!!!@Type = fix(@CombinedTypeSlices / 10000); @NrOfSlices = mod(@CombinedTypeSlices, 10000);

# more header fields
FIELD !                       !uint16  !double  !1, 1                     !        !NrOfSlices
EXPRE !@NrOfSlices == 0   !!!!!@NrOfSlices = mod(@CombinedTypeSlices, 10000);
FIELD !                       !uint16  !double  !1, 1                     !        !DimY
FIELD !                       !uint16  !double  !1, 1                     !        !DimX
FIELD !                       !uint16  !double  !1, 1                     !        !ClusterSize
FIELD !                       !single  !double  !1, 1                     !        !LowerThreshold
FIELD !                       !single  !double  !1, 1                     !        !UpperThreshold
FIELD !@Type == 2             !uint16  !double  !1, 1                     !        !NrOfLags
EXPRE !$BFFREAD && @Type ~= 2 !!!!!@NrOfLags = [];

# value to dissociate Type/Slices ?
FIELD !                       !uint16  !double  !1, 1                     !9999    !ReservedToken

# FileVersion MUST be 2
FIELD !                       !uint16  !double  !1, 1                     !2       !FileVersion

# further header fields
FIELD !                       !cstring !cstring !1, 1                     !        !NameOfRTC

# slices (maps)
EXPRE !$BFFREAD           !!!!!@Map = cell2struct(cell(0, 0, 2), {'Number', 'Data'}, 3); if @NrOfSlices > 0, @Map(@NrOfSlices).Number = @NrOfSlices; end
BLOOP !                       ! ! !@NrOfSlices ! !MapNo
EXPRE !$BFFWRITE          !!!!!@Map($MapNo).Number = @Map($MapNo).Number - 1;
FIELD !                       !uint16  !double  !1, 1                     !        !Map($MapNo).Number
EXPRE !                   !!!!!@Map($MapNo).Number = @Map($MapNo).Number + 1;
FIELD !                       !single  !single  !@DimX, @DimY             !        !Map($MapNo).Data
ELOOP !                       ! ! !  ! !MapNo

# Read rest of File into REMAININGCONTENT
EXPRE !$BFFREAD           !!!!!$RemSize = $FILESIZE - ftell(fid);
EXPRE !$BFFWRITE          !!!!!$RemSize = 0; try, if isfield(@@, 'REMAININGCONTENT'), $RemSize = prod(size(@REMAININGCONTENT)); end, end
FIELD !$RemSize > 0           !uint8   !uint8   !1, $RemSize              !        !REMAININGCONTENT

EndListOfFields

NewFileCode:!
@Type = 1;
@NrOfSlices = 25;
@CombinedTypeSlices = 10000 * @Type + @NrOfSlices;
@DimY = 64;
@DimX = 64;
@ClusterSize = 10;
@LowerThreshold = 2.5;
@UpperThreshold = 8;
@NrOfLags = [];
@ReservedToken = 9999;
@FileVersion = 2;
@NameOfRTC = '';
tv_data = single(0); tv_data(@DimX, @DimY) = tv_data(1);
for tv_count=1:@NrOfSlices, @Map(tv_count).Number = tv_count; @Map(tv_count).Data = tv_data; end
clear tv_data;
EndNewFileCode

⌨️ 快捷键说明

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