Commit 4d9b7026 authored by Tyler Collins's avatar Tyler Collins
Browse files

Updated run_htb to have a notion of importing Bids structures.

parent 35d81f2b
function out=pop_rfind(root)
filePattern = fullfile(root, 'sub-*'); % Change to whatever pattern you need.
allFiles = dir(filePattern);
out = '';
for k = 1 : length(allFiles)
subj = allFiles(k).name;
singleFile = dir(fullfile(sprintf('%s/%s/eeg/',root,subj),'*.set'));
out = sprintf('%sbids/%s/eeg/%s\n',out,subj,singleFile.name);
end
end
......@@ -98,6 +98,7 @@ if nargin < 4
{8 26 [0.05 -.2] [4.3 1]} ... %3 history path edit box
{8 26 [0.05 .6] [4.3 2.5]} ... %4 history file edit box
{8 26 [4.7 -1] [1.8 1]} ... %5 data file push button
{8 26 [6.32 -1] [1.68 1]} ... %5.1 bids file push button
{8 26 [4.22 -.2] [1 1]} ... %6 path: text
{8 26 [4.7 -.2] [3.3 1]} ... %7 data path edit box
{8 26 [4.32 .6] [1 1]} ... %8 file: text
......@@ -131,6 +132,11 @@ if nargin < 4
'if isnumeric(input_fname);return;end;', ...
'set(findobj(gcbf,''tag'',''edt_dfp''),''string'',input_fpath);', ...
'set(findobj(gcbf,''tag'',''lst_dfn''),''string'',input_fname);']} ... %5 data file push button
{'Style', 'pushbutton', 'string', 'Bids is great!', ...
'callback', ...
['rootF = uigetdir();',...
'fNames = pop_rfind(rootF);', ... % call to recursive crawl method
'set(findobj(gcbf,''tag'',''lst_dfn''),''string'',deblank(fNames));']} ... %5 data file push button
{'Style', 'text', 'string', 'path:'} ... %6 path: text
{'Style', 'edit', 'tag','edt_dfp'} ... %7 data path edit box
{'Style', 'text', 'string', 'file:'} ... %8 file: text
......@@ -347,3 +353,4 @@ for hi=1:length(htb_fname)
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment