Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
651d3fa
Updated testing. Added Jest and Ajv.
katiamar63 May 11, 2020
c915d20
Added Istanbul. Created suite for viewer schema test.
katiamar63 May 12, 2020
fc86282
Added new matchers for quick tests. Ajv can be used globally and loca…
katiamar63 May 13, 2020
8aed122
Added AJV parameters to message for Jest.
katiamar63 May 13, 2020
285e8c6
Added widgets.
katiamar63 May 14, 2020
791e0cb
Added pointerTool, crosshairTool and brushTool to widgets.
katiamar63 May 14, 2020
f7d3bc8
Updated widgets.
katiamar63 May 14, 2020
fd7a7f9
Updated widgets.
katiamar63 May 14, 2020
00222ae
Updated widgets.
katiamar63 May 14, 2020
5b30f8e
Updated widgets.
katiamar63 May 14, 2020
ced6292
Updated widgets.
katiamar63 May 14, 2020
eaa0ae0
Updated widgets.
katiamar63 May 14, 2020
b64a14a
Updated widgets.
katiamar63 May 14, 2020
a5ea12b
Updated widgets.
katiamar63 May 14, 2020
ba01241
Merge pull request #3 from SPINEProject/master
katiamar63 May 14, 2020
7f5f120
Merge branch 'master' into version2
katiamar63 May 14, 2020
d38d24a
Updated widgets.
katiamar63 May 15, 2020
35b369f
Added new widget.
katiamar63 May 18, 2020
e42795f
Added full viewer test.
katiamar63 May 22, 2020
7528a6d
Merge branch 'master' of https://github.com/SPINEProject/SPINE-json-s…
katiamar63 Oct 12, 2020
a5ba3c3
Merge pull request #29 from gregblt/master
alfredomp Nov 4, 2020
eab1025
Merge pull request #30 from gregblt/master
katiamar63 Nov 6, 2020
221d390
Merge branch 'master' of https://github.com/SPINEProject/SPINE-json-s…
katiamar63 Feb 11, 2021
68b7e99
Merge pull request #31 from katiamar63/version2
katiamar63 Feb 11, 2021
8675606
Merge branch 'master' of https://github.com/SPINEProject/SPINE-json-s…
katiamar63 Feb 11, 2021
4f7d676
Merge pull request #32 from gregblt/master
gregblt Feb 17, 2021
f2bc933
Merge branch 'master' of https://github.com/SPINEProject/SPINE-json-s…
katiamar63 Jun 9, 2021
b306f90
Update annotation.schema.json
gregblt Aug 4, 2021
af288a2
Update annotation.schema.json
gregblt Aug 4, 2021
d7d0df4
Merge branch 'master' of https://github.com/SPINEProject/SPINE-json-s…
katiamar63 Oct 22, 2021
7cc5d16
[Update] Updated examples of widgets
katiamar63 Oct 22, 2021
b261643
[Cleaning] Commented out missing parts.
katiamar63 Oct 22, 2021
c12b8e0
[Update] Updated list of widget tools
katiamar63 Oct 22, 2021
a5dc7ce
Updated widget schema.
katiamar63 Oct 22, 2021
6efc30c
[Update] Updated version in package.json.
katiamar63 Oct 22, 2021
4e87934
Merge pull request #33 from katiamar63/master
katiamar63 Oct 22, 2021
ce9a767
[Update] Updated displayControls and viewer layouts. Updated examples…
katiamar63 Oct 22, 2021
2b077c5
[Update] Updated orientation options. Updated version.
katiamar63 Oct 22, 2021
2f51884
Merge pull request #34 from katiamar63/master
katiamar63 Oct 22, 2021
c5aa5ea
[Update] Updated displayControls array.
katiamar63 Oct 22, 2021
28ff5f0
Merge pull request #35 from katiamar63/master
katiamar63 Oct 22, 2021
e93a13c
Merge pull request #7 from SPINEProject/master
alfredomp Oct 25, 2021
111dacb
Removed "status" and "reference" as required
alfredomp Oct 25, 2021
fbe9419
Remove req. keys: "schema" & "roiInOut_FileFormat"
alfredomp Oct 25, 2021
bce7f09
Updated annotationTableDefinition type enum
alfredomp Oct 25, 2021
2bcf2cc
Add annotationFormDefinitionInOut to the schema
alfredomp Oct 25, 2021
dede598
Update core.schema.json
alfredomp Oct 25, 2021
b02db81
Fix to lookupTable and add lookUpTableDescription
alfredomp Oct 25, 2021
d05a8cb
Fix lookupTable to lookUpTable
alfredomp Oct 25, 2021
4a21d15
Update annotationTableDataInOut
alfredomp Oct 25, 2021
1eb5332
Add annotationFormDataInOut
alfredomp Oct 25, 2021
74cfe03
Fix missing commas
alfredomp Oct 25, 2021
5d87629
Add missing spine output types
alfredomp Oct 25, 2021
3f6a9b8
Merge pull request #36 from alfredomp/master
alfredomp Oct 25, 2021
22355c4
[Update] Added comments, updated tool examples, modified examples.
katiamar63 Oct 25, 2021
1e8958f
Merge pull request #37 from katiamar63/master
katiamar63 Oct 25, 2021
9d28369
[Update] Viewer schema splitted into 2 definitions: 2D and 3D (due to…
katiamar63 Oct 26, 2021
41fd1c4
[Update] Added new testing suite for the contents of examples/tool fo…
katiamar63 Oct 26, 2021
b05fdf6
[Update] Updated manual.
katiamar63 Oct 26, 2021
1356160
Merge pull request #38 from katiamar63/master
katiamar63 Oct 26, 2021
2f28585
[Update] Added new suite for validation of local folder content.
katiamar63 Oct 28, 2021
2588707
[Update] Added missing enumerated values. Fixed initial windowLevel d…
katiamar63 Oct 28, 2021
b342ff3
[Update] Added definitions of scenes, luts, lutdescriptions, rois, ov…
katiamar63 Oct 28, 2021
bf7ba4d
[Update] Updated version to the new release 2.4.0
katiamar63 Oct 28, 2021
5468036
Merge pull request #39 from katiamar63/master
katiamar63 Oct 28, 2021
bbadac1
[Update] Added roiTable widget
katiamar63 Oct 29, 2021
f395893
Merge pull request #40 from katiamar63/master
katiamar63 Oct 29, 2021
34d3bda
[Update] Added cohort schema along with testing suite and examples. U…
katiamar63 Dec 2, 2021
a3b289c
Merge pull request #41 from katiamar63/master
katiamar63 Dec 2, 2021
ac3ac4c
[Update] Added mainTool widget configuration schema.
katiamar63 Dec 17, 2021
b6beaaf
[Update][#42] Propoerty docType is required in cohort document.
katiamar63 Dec 17, 2021
104b78d
Merge pull request #43 from katiamar63/master
katiamar63 Dec 17, 2021
9380c8a
[Update] Added experimentalPlan schema
katiamar63 Mar 10, 2022
62b370b
Add "one-time questionnaires" scheduling
alfredomp Mar 10, 2022
5c25dda
Merge pull request #44 from alfredomp/patch-1
alfredomp Mar 10, 2022
7e07f46
Remove cyclic questionnaires
alfredomp Mar 10, 2022
6a12442
Update experimentConfiguration_V1_1.json
katiamar63 Mar 11, 2022
b22ad4a
Update according to changes proposed by Giovanni
katiamar63 Mar 14, 2022
c5783f9
[Update] Added experimentalPlan - short version
katiamar63 Mar 15, 2022
77fe5a5
[Update] Updated experimentalPlan - short version
katiamar63 Mar 15, 2022
2ef8fcf
Merge pull request #45 from katiamar63/master
katiamar63 Mar 15, 2022
e756227
[Update] Updated schema for experimentalPlan
katiamar63 Mar 15, 2022
c7bb72a
[Update] Updated experimentId
katiamar63 Mar 17, 2022
efe032b
Merge pull request #46 from katiamar63/master
katiamar63 Mar 17, 2022
ecd9cf4
Merge pull request #47 from katiamar63/master
katiamar63 Mar 17, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules

# testing
/coverage

# misc
package-lock.json
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,25 @@ If you make changes and tag this project make sure that the version of the ```pa
1. Create migration script for the database and save it the SPINE repository in the folder ```src/backedn/migrations_scripts/```. ***The migration script changes at least the document having the version of the json schema used.***
1. Create a release for SPINE project including migration instructions from previous releases. Please refer to the migration script in the commit messages.

## Testing with Jest and Ajv
All schemas should be validated with tests, based on Ajv library. Since Jest can’t
specify the error message, in order to display a meaningful error message,
we will have to create a custom matcher to show our own message, returned by Ajv.
It is shown in [Example of matcher extension](/tests/jest.ajv.schema.test.js).

### Test cases
Examples used for testing are defined in "examples" subfolders. To identify weak tests
[Mutation tests](https://en.wikipedia.org/wiki/Mutation_testing) are applied (json files with _mutation._ prefix).
Manual tools definitions can be tested using [automatic suite](/tests/tools2.schema.test.js)


### Links:

[Test JSON schema with AJV and Jest](https://medium.com/@moshfeu/test-json-schema-with-ajv-and-jest-c1d2984234c9 )

[Getting started with JEST](https://jestjs.io/docs/en/getting-started)

[Getting started with Ajv](https://github.com/ajv-validator/ajv)

TODO:
Set up coverage as in [Ajv-Istanbul](https://github.com/ajv-validator/ajv-istanbul)
44 changes: 35 additions & 9 deletions examples/annotationWorkflow/tool_annotationThreeViewers.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,15 +132,41 @@
"possibleImagesToDisplay": ["imagesA"],
"hasDefaultImageToDisplay": false
},
"displayControls":{
"orientations": ["axial", "sagittal", "coronal"],
"defaultOrientation": "axial",
"smoothing": {
"smoothingControl": true,
"smoothingDefault": false
}
}
}
"displayControls": {
"orientation": {
"controlVisible": false,
"controlEnabled": false,
"options": [
{
"label": "Sagittal",
"value": "SAGITTAL"
},
{
"label": "Coronal",
"value": "CORONAL"
},
{
"label": "Axial",
"value": "AXIAL"
}
],
"defaultValue": "AXIAL"
},
"smoothing": {
"controlVisible": false,
"controlEnabled": false,
"defaultValue": false
},
"sequence": {
"controlVisible": true,
"controlEnabled": true
},
"linked": {
"controlVisible": false,
"controlEnabled": false
}
}
}
}
},

Expand Down
19 changes: 19 additions & 0 deletions examples/cohort/epvs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"uuid": "5ec47681-0872-4368-a53f-aaed3f8ac391",
"docType": "cohort",
"name": "EPVS MICCAI VALDO 2021",
"description": "EPVS dataset",
"creationDate": "2021-09-07T17:04:06.158040",
"privacy": "private",
"pi": "a60017ce-6be9-4054-9f84-06722d5166be",
"co-investigators": [
"0f8fc6f7-1361-4f55-9bfa-b8e70c3a5718"
],
"logo": {
"type": "url",
"value": "https://www.miccai2021.org/files/images/layout/en/miccai2021-logo.png",
"url": "https://valdo.grand-challenge.org/Task3"
},
"relativePath": "EPVS_MICCAI_VALDO_2021",
"sourceSystem": "SPINE Insertion script"
}
30 changes: 30 additions & 0 deletions examples/cohort/epvs2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"uuid": "8631a9d7-6247-412c-b921-a73769e16647",
"docType": "cohort",
"name": "EPVS MICCAI VALDO 2021",
"description": "EPVS dataset",
"creationDate": "2021-09-01T15:38:09.421140",
"privacy": "private",
"pi": "a60017ce-6be9-4054-9f84-06722d5166be",
"co-investigators": [
"0f8fc6f7-1361-4f55-9bfa-b8e70c3a5718"
],
"diseases": [],
"keywords": [
{
"label": "Brain",
"iri": "http://purl.org/sig/ont/fma/fma50801"
},
{
"label": "MRI",
"iri": "http://purl.bioontology.org/ontology/SNOMEDCT/113091000"
}
],
"relativePath": "EPVS_MICCAI_VALDO_2021",
"logo": {
"type": "url",
"value": "https://www.miccai2021.org/files/images/layout/en/miccai2021-logo.png",
"url": "https://valdo.grand-challenge.org/Task1"
},
"sourceSystem": "SPINE Insertion script"
}
25 changes: 25 additions & 0 deletions examples/cohort/fat.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"uuid": "35d4d7d1d0fb89504a8c0c74250008af",
"docType": "cohort",
"name": "Abdominal Fat Testing",
"description": "Testing database for Abdominal Faat",
"creationDate": "2020-03-10T23:54:14.063Z",
"privacy": "public",
"pi": "a60017ce-6be9-4054-9f84-06722d5166be",
"co-investigators": [
"0f8fc6f7-1361-4f55-9bfa-b8e70c3a5718"
],
"diseases": [],
"keywords": [
{
"label": "Brain",
"iri": "http://purl.org/sig/ont/fma/fma50801"
},
{
"label": "MRI",
"iri": "http://purl.bioontology.org/ontology/SNOMEDCT/113091000"
}
],
"relativePath": "Cohort_AbdominalFat_Testing",
"sourceSystem": "manualInsertion"
}
30 changes: 30 additions & 0 deletions examples/cohort/lacunes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"uuid": "2be44462-b0a5-4a32-b3a7-cd33bcdff3f1",
"docType": "cohort",
"name": "LACUNES MICCAI VALDO 2021",
"description": "LACUNES dataset",
"creationDate": "2021-09-21T14:37:57.266647",
"relativePath": "LACUNES_MICCAI_VALDO_2021",
"privacy": "private",
"pi": "a60017ce-6be9-4054-9f84-06722d5166be",
"co-investigators": [
"0f8fc6f7-1361-4f55-9bfa-b8e70c3a5718"
],
"diseases": [],
"keywords": [
{
"label": "Brain",
"iri": "http://purl.org/sig/ont/fma/fma50801"
},
{
"label": "MRI",
"iri": "http://purl.bioontology.org/ontology/SNOMEDCT/113091000"
}
],
"logo": {
"type": "url",
"value": "https://www.miccai2021.org/files/images/layout/en/miccai2021-logo.png",
"url": "https://valdo.grand-challenge.org/Task3"
},
"sourceSystem": "SPINE Insertion script"
}
46 changes: 46 additions & 0 deletions examples/cohort/miccai.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"uuid": "023e3ce2-d2e0-4b73-87c1-c0c166b8c313",
"docType": "cohort",
"name": "MICROBLEEDS MICCAI VALDO 2021",
"description": "MICROBLEEDS dataset. he goal of this task is to develop an automated method to segment cerebral microbleeds in MRI scans. The training set contains segmentations of microbleeds in the full brain for every case. The submitted automated methods will be applied on the hidden test set and should output microbleed segmentations for the full brain. The predicted segmentation mask should be continuous and will be thresholded at 0.5 during evaluation to obtain a binary segmentation mask (0: background, 1: microbleed). An interesting public dataset that can be used to have additional training cases, is the microbleeds dataset that was released with the following paper: Q. Dou*, H. Chen*, L. Yu, J. Qin, L. Shi, P. A. Heng, et al. 'Automatic Detection of Cerebral Microbleeds from MR Images via 3D Convolutional Neural Networks'. IEEE Transactions on Medical Imaging (TMI), 2016.This set contains 20 cases with dot annotations of microbleeds.",
"creationDate": "2021-09-20T16:51:33.887301",
"privacy": "private",
"relativePath": "EPVS_MICCAI_VALDO_2021",
"pi": "a60017ce-6be9-4054-9f84-06722d5166be",
"co-investigators": [
"0f8fc6f7-1361-4f55-9bfa-b8e70c3a5718"
],
"diseases": [
{
"label": "Multiple Sclerosis",
"icdCode": "G35",
"url": "https://www.icd10data.com/search?s=G35"
},
{
"label": "Disseminated demyelination",
"icdCode": "G36",
"url": "https://www.icd10data.com/search?s=G36"
}
],
"keywords": [
{
"label": "Multiple Sclerosis",
"iri": "http://purl.bioontology.org/ontology/SNOMEDCT/24700007"
},
{
"label": "Freesurfer",
"iri": "http://purl.org/sig/ont/fma/fma271960"
},
{
"label": "White Matter",
"iri": "http://purl.org/sig/ont/fma/fma83929"
}
],
"logo": {
"type": "url",
"value": "https://www.miccai2021.org/files/images/layout/en/miccai2021-logo.png",
"url": "https://valdo.grand-challenge.org/Task2"
},
"sourceSystem": "SPINE Insertion script"
}

30 changes: 30 additions & 0 deletions examples/cohort/miccai2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"uuid": "20c2d549136e928edffcdb64b901f990",
"docType": "cohort",
"name": "Testing Openneuro. Dataset ds000221.",
"description": "Testing database from Openneuro",
"creationDate": "2019-08-21T19:32:14.063Z",
"privacy": "public",
"pi": "a60017ce-6be9-4054-9f84-06722d5166be",
"co-investigators": [
"0f8fc6f7-1361-4f55-9bfa-b8e70c3a5718"
],
"relativePath": "CohortOpenneuro_ds0002221",
"sourceSystem": "manualInsertion",
"diseases": [],
"keywords": [
{
"label": "Brain",
"iri": "http://purl.org/sig/ont/fma/fma50801"
},
{
"label": "MRI",
"iri": "http://purl.bioontology.org/ontology/SNOMEDCT/113091000"
}
],
"logo": {
"type": "url",
"value": "https://openneuro.org/assets/on-light-horz.23ff22c3.svg",
"url": "https://openneuro.org/datasets/ds000221/versions/1.0.0"
}
}
Loading