📄 olt.tff
字号:
# TextFileFormat (leave this tag as magic token!)
# BVQX file format for *.OLT files (Overlay Lookup Table)
# OLT 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:Overlay lookup table files
Extensions:olt
FieldDelimiters: {[32]}
LineDelimiters: {[13, 10], [10]}
ParagraphArrays:0
SkipEmptyLines:1
# Field description
ListOfFields:!
type !cond !field !datatype!format !dim !default !varname
# reading/writing
EXPRE!$TFFREAD !!!!!!@NrOfColors = linecount; @Colors = zeros(@NrOfColors, 3);
EXPRE!$TFFWRITE !!!!!!@NrOfColors = size(@Colors, 1);
# read OLT lines
BLOOP!$TFFREAD ! ! ! !@NrOfColors ! !RColNr
EXPRE!!!!!!![t_ms, t_me, t_mt] = regexpi(deblank(linecont{linec}), '^color[^0-9]*(\d+)\s*\:?\s+(\d+)\s+(\d+)\s+(\d+).*$'); if isempty(t_ms), error('invalid file'); end
EXPRE!!!!!!!@Colors($RColNr, 1) = str2double(linecont{linec}(t_mt{1}(2, 1):t_mt{1}(2, 2)));
EXPRE!!!!!!!@Colors($RColNr, 2) = str2double(linecont{linec}(t_mt{1}(3, 1):t_mt{1}(3, 2)));
EXPRE!!!!!!!@Colors($RColNr, 3) = str2double(linecont{linec}(t_mt{1}(4, 1):t_mt{1}(4, 2)));
EXPRE!!!!!!!linec = linec + 1;
ELOOP! ! ! ! ! ! !RColNr
# write OLT lines
BLOOP!$TFFWRITE ! ! ! !@NrOfColors ! !WColNr
EXPRE!!!!!!!linecont{end + 1} = sprintf('%-8s %d %d %d', sprintf('Color%d:', $WColNr), @Colors($WColNr, 1), @Colors($WColNr, 2), @Colors($WColNr, 3)); linecount = linecount + 1;
ELOOP! ! ! ! ! ! !WColNr
EndListOfFields
# new file code snippet
NewFileCode:!
@NrOfColors = 20;
@Colors = [[255 * ones(10, 1), (75:20:255)', ones(10, 1)]; [zeros(10, 1), (75:20:255)', (255:-20:75)']];
EndNewFileCode
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -