-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdp.m
executable file
·46 lines (32 loc) · 1.09 KB
/
dp.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
classdef dp % data processor
% we are working with input and output structures, with some rules
% embedded here
% fields that are expected of the input and output structures
%
% id - uniquely defines a subject or subject/date
% bp - base path
% *_fn - filenames, will be checked if they exist
%
% in addition, it could have these field(s):
%
% tmp - temporary info, with fields
% bp - base path
% do_delete - determines whether the path will be deleted after
% execution
methods (Static)
function node = setup_node(name, prev, node)
warning('use node.setup instead')
node.name = name;
node.previous_node = prev;
end
function fn = new_fn(op, fn, suffix, ext)
if (nargin < 3), suffix = ''; end
if (nargin < 4), ext = ''; end
[~, name, ext_this] = msf_fileparts(fn);
if (isempty(ext))
ext = ext_this;
end
fn = fullfile(op, cat(2, name, suffix, ext));
end
end
end