📄 dtsf.bff
字号:
# BinaryFileFormat (leave this tag as its own magic token!)
# DTi Studio file format for *.dat files (Fiberdat)
# DTSF FileVersions supported:
#
# Version: v0.6d
# Build: 7020711
# Date: Feb-07 2007, 11:45 AM CET
# Author: Jochen Weber, Brain Innovation, B.V., Maastricht, NL
# URL/Info: http://wiki.brainvoyager.com/BVQXtools
# FILE FORMAT
Description:DTI Studio FiberDat files (*.dat)
EncodingSyntax:ieee-le
Extensions:dtsf # dummy extension !
Magic:|
name |range |type |magic
DTSF_FiberDat |1, 8 |regexp |^FiberDat$
EndMagic
# FIELDS
ListOfFields:!
type !cond !disktype!datatype!dim !default !varname
EXPRE !$BFFWRITE !!!!!@FiberDatMagic = 'FiberDat'; @HeaderPadding = uint8(zeros(1, 82)); # just to make sure!
# Header
FIELD ! !char !char !1, 8 ! !FiberDatMagic # 'FiberDat' 0x0000
FIELD ! !uint32 !double !1, 1 ! !NrOfFibers # 0x0008
FIELD ! !uint32 !double !1, 1 ! !ReservedN # 0x000c
FIELD ! !single !double !1, 1 ! !ReservedF # 0x0010
FIELD ! !uint32 !double !1, 1 ! !DimX # 0x0014
FIELD ! !uint32 !double !1, 1 ! !DimY # pix 0x0018
FIELD ! !uint32 !double !1, 1 ! !DimZ # 0x001c
FIELD ! !single !double !1, 1 ! !ResX # 0x0020
FIELD ! !single !double !1, 1 ! !ResY # mm/pix 0x0024
FIELD ! !single !double !1, 1 ! !ResZ # 0x0028
FIELD ! !uint8 !double !1, 1 ! !SliceOrientation # 0: cor, 1: axial, 2: sag
FIELD ! !uint8 !double !1, 1 ! !SliceSequencing # 0: normal, 1: z-flipped
FIELD ! !uint8 !uint8 !1, 82 ! !HeaderPadding # 0x002e
# Fibers
EXPRE !$BFFREAD !!!!!@Fibers = bvqx_dtsf_parsefibers(fid, @NrOfFibers);
EXPRE !$BFFWRITE !!!!!bvqx_dtsf_writefibers(fid, @Fibers);
# 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:!
@FiberDatMagic = 'FiberDat';
@NrOfFibers = 0;
@ReservedN = 0;
@ReservedF = 0;
@DimX = 128;
@DimY = 128;
@DimZ = 64;
@ResX = 2;
@ResY = 2;
@ResZ = 2;
@SliceOrientation = 1;
@SliceSequencing = 0;
@HeaderPadding = uint8(zeros(1, 82));
@Fibers = cell2struct(cell(0, 0, 5), {'NrOfPoints', 'Selected', 'RGB', 'FromToPoint', 'Coord'}, 3);
EndNewFileCode
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -