|
1 | | -function outputFiltered = readOutputFilter(cfg, filterHeader, filterContent) |
| 1 | +function outputFiltered = readOutputFilter(varargin, filterHeader, filterContent) |
2 | 2 | % outputFiltered = readOutputFilter(cfg, filterHeader, filterContent) |
3 | 3 | % |
4 | 4 | % It will display in the command window the content of the `output.tsv' filtered by one element |
|
22 | 22 | % - outputFiltered: dataset with only the specified content, to see it in the command window |
23 | 23 | % use display(outputFiltered) |
24 | 24 |
|
| 25 | + if isstring(varargin{1}) |
| 26 | + tsvFile = varargin{1} |
| 27 | + elseif isstruct(varargin{1}) |
| 28 | + tsvFile = fullfile(varargin{1}.dir.outputSubject, ... |
| 29 | + varargin{1}.fileName.modality, ... |
| 30 | + varargin{1}.fileName.events); |
| 31 | + end |
25 | 32 |
|
26 | | - % Get the outputfile path |
27 | | - tsvFile = fullfile(cfg.dir.outputSubject, ... |
28 | | - cfg.fileName.modality, ... |
29 | | - cfg.fileName.events); |
| 33 | + % % Get the outputfile path |
| 34 | + % tsvFile = fullfile(cfg.dir.outputSubject, ... |
| 35 | + % cfg.fileName.modality, ... |
| 36 | + % cfg.fileName.events); |
30 | 37 |
|
31 | 38 | % Read the the tsv file and store each column in a field of `output` structure |
32 | 39 | output = bids.util.tsvread(tsvFile); |
|
0 commit comments