Skip to content

Commit 9016d8b

Browse files
authored
Merge pull request #7 from labstreaminglayer/BIDS
BIDS formatting.
2 parents 879de5e + 243513d commit 9016d8b

10 files changed

Lines changed: 527 additions & 293 deletions

.appveyor.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,10 @@ environment:
88
CMakeArgs: ""
99
matrix:
1010
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
11-
VCVER: 14.1
1211
QTCOMPILER: msvc2017_64
1312
QTVER: 5.11
14-
ARCH: x64
15-
DEPLOYNAME: Win64
16-
- APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu1804
17-
DEPLOYNAME: Linux64-bionic
13+
- APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu1604
14+
DEPLOYNAME: Linux64-xenial
1815
install:
1916
- cmd: appveyor DownloadFile https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-win.zip -FileName ninja.zip
2017
- cmd: appveyor DownloadFile %LSLDIST_URL%/%lslversion%/liblsl-%lslversion%-Win64.7z -FileName liblsl_x64.7z
@@ -27,7 +24,7 @@ install:
2724
- sh: dpkg -x lsl.deb LSL
2825
- sh: sudo apt update && sudo apt install -y qtbase5-dev
2926
build_script:
30-
- cmd: call "C:\Program Files (x86)\Microsoft Visual Studio %VCVER%\VC\vcvarsall.bat" %ARCH%
27+
- cmd: call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
3128
- mkdir build
3229
- cd build
3330
- cmd: cmake -G Ninja -DQt5_DIR=C:/Qt/%QTVER%/%QTCOMPILER%/lib/cmake/Qt5 -DBOOST_ROOT=C:/Libraries/boost_1_67_0 -DLSL_INSTALL_ROOT=LSL/ %CMakeArgs% ../

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ installLSLApp(${PROJECT_NAME})
9696
installLSLApp(LabRecorderCLI)
9797
installLSLApp(testxdfwriter)
9898
installLSLAuxFiles(${PROJECT_NAME}
99-
default_config.cfg
99+
${PROJECT_NAME}.cfg
100100
)
101101

102102
LSLGenerateCPackConfig()

LabRecorder.cfg

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
; === Storage Location ===
2+
; the default file name can be something like C:\\Recordings\\untitled.xdf, but can also contain
3+
; placeholders. Two placeholder formats are supported: Legacy and BIDS.
4+
;
5+
; Legacy may contain a running number (incremented per experiment session) called %n, and a
6+
; placeholder for a "block" label %b (if the config script provides a list of block names that
7+
; consitute a session.
8+
; The syntax is as in: StorageLocation = "C:\\Recordings\\subject%n\\block_%b.xdf"
9+
;
10+
; For BIDS, the path may contain %p for participant label, %s for session label,
11+
; %b for task label (same as block in Legacy), %a for name of acquisition parameter set, and %r index.
12+
; The BIDS syntax is: path/to/CurrentStudy/sub-%p/ses-%s/eeg/sub-%p_ses-%s_task-%b[_acq-%a]_run-%r_eeg.xdf
13+
;
14+
; If StorageLocation is not provided then the default is QStandardPaths::DocumentsLocation/CurrentStudy/exp%n/untitled.xdf
15+
16+
;StorageLocation=C:/Recordings/CurrentStudy/exp%n/untitled.xdf
17+
18+
; === Study Root ===
19+
; You can optionally provide only the study root folder and it will be used to build a file name automatically.
20+
; The default filename builder is Legacy (see above).
21+
; StudyRoot=C:/Recordings/CurrentStudy
22+
23+
; === Block Names ===
24+
; This is optionally a list of blocks that make up a recording session. The blocks are displayed in
25+
; a list box where the experiment can select a block before pressing record. If used, the blocks
26+
; may serve as a reminder of where they are in the experiment, but more practically, can be
27+
; used to determine the file name of the recording. Power users can define scriptable actions
28+
; associated with selecting a block or pressing Start/Stop for a given block (e.g., for remote
29+
; control).
30+
; The syntax is as in: SessionBlocks = "Training","PreBaseline","MainSection","PostBaseline"
31+
32+
SessionBlocks="T1", "T2", "T3"
33+
34+
; === Required Streams ===
35+
; This is optionally a list of streams that are required for the recording;
36+
; a warning is issued if one of the streams is not present when the record button is pressed
37+
; The syntax is as in: RequiredStreams = "BioSemi (MyHostname)","PhaseSpace (MyHostname)","Eyelink (AnotherHostname)"
38+
; where the format is identical to what the LabRecorder displays in the "Record from streams" list.
39+
40+
;RequiredStreams="RequiredExample (PC)"
41+
42+
; === Online Sync ===
43+
; A list of sync settings. Each setting follows the following format: "SrcStreamName (SrcHostName) post_FLAG"
44+
; where post_FLAG is described here: https://github.com/sccn/liblsl/blob/master/src/common.h#L77-L89
45+
; Note that it is not necessary to set any flags for correct storage because all of the post-processing synchronization
46+
; can be achieved during file import using either the Matlab or Python importers.
47+
; Examples:
48+
; OnlineSync="ActiChamp-0 (DM-Laptop) post_ALL", "LiveAmpSN-054211-0237 (User-PC) post_ALL"
49+
; OnlineSync=["ActiChamp-0 (User-PC)" post_ALL]
50+
OnlineSync="SendDataC (Testpc) post_ALL", "Test (Testpc) post_clocksync"

LabRecorder_BIDS.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
; BIDS config, files are saved in the specified StudyRoot
2+
StudyRoot=C:/Recordings/CurrentStudy

LabRecorder_Legacy.cfg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
; Legacy config, the StudyRoot and TemplatePath are extracted automatically
2+
; from the StorageLocation
3+
StorageLocation = "C:/Recordings/CurrentStudy/expi_%n/blockvar_%b.xdf"

default_config.cfg

Lines changed: 0 additions & 32 deletions
This file was deleted.

main.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@
44
int main(int argc, char *argv[]) {
55

66
// determine the startup config file...
7-
const char *config_file = "default_config.cfg";
7+
const char *config_file = nullptr;
88
for (int k = 1; k < argc; k++)
99
if (std::string(argv[k]) == "-c" || std::string(argv[k]) == "--config")
1010
config_file = argv[k + 1];
1111

1212
QApplication a(argc, argv);
1313
MainWindow w(nullptr, config_file);
1414
w.show();
15-
1615
return a.exec();
1716
}

0 commit comments

Comments
 (0)