BICCN / cell-locator

manually align specimens to annotated 3D spaces
https://cell-locator.readthedocs.io
Other
19 stars 7 forks source link

Simplify Json files #150

Closed jcfr closed 4 years ago

jcfr commented 4 years ago

I am also thinking we should remove some properties from the annotation file and have there initialized at loading by the application. The idea is to save to LIMS only the relevant information.

@wbwakeman What do you think ? See below for the proposed simplification @allemangD Do you anticipate any issues doing so ?

Other information we should probably include in the JSON under a metadata dictionnary:

Also which terminologies to you use in LIMS ? I think we should change the markups and markup key to properly reflect the used terminology.

diff --git a/annotation.json b/annotation-cleaned.json
index 786ee63..e6ae130 100644
--- a/annotation.json
+++ b/annotation-cleaned.json
@@ -2,16 +2,9 @@
     "markups": [
         {
             "markup": {
-                "type": "ClosedCurve",
                 "coordinateSystem": "LPS",
-                "locked": false,
-                "labelFormat": "%N-%d",
                 "controlPoints": [
                     {
-                        "id": "1",
-                        "label": "MarkupsClosedCurve-1",
-                        "description": "",
-                        "associatedNodeID": "vtkMRMLScalarVolumeNode1",
                         "position": [
                             -7725.476777936878,
                             5071.924649397559,
@@ -28,16 +21,8 @@
                             0,
                             1
                         ],
-                        "selected": true,
-                        "locked": false,
-                        "visibility": true,
-                        "positionStatus": "defined"
                     },
                     {
-                        "id": "2",
-                        "label": "MarkupsClosedCurve-2",
-                        "description": "",
-                        "associatedNodeID": "vtkMRMLScalarVolumeNode1",
                         "position": [
                             -8785.61316343005,
                             5514.035987881592,
@@ -54,16 +39,8 @@
                             0,
                             1
                         ],
-                        "selected": true,
-                        "locked": false,
-                        "visibility": true,
-                        "positionStatus": "defined"
                     },
                     {
-                        "id": "3",
-                        "label": "MarkupsClosedCurve-3",
-                        "description": "",
-                        "associatedNodeID": "vtkMRMLScalarVolumeNode1",
                         "position": [
                             -7732.355384361564,
                             5984.77667260136,
@@ -80,16 +57,8 @@
                             0,
                             1
                         ],
-                        "selected": true,
-                        "locked": false,
-                        "visibility": true,
-                        "positionStatus": "defined"
                     },
                     {
-                        "id": "4",
-                        "label": "MarkupsClosedCurve-4",
-                        "description": "",
-                        "associatedNodeID": "vtkMRMLScalarVolumeNode1",
                         "position": [
                             -6980.525470132225,
                             5682.868336976309,
@@ -106,16 +75,8 @@
                             0,
                             1
                         ],
-                        "selected": true,
-                        "locked": false,
-                        "visibility": true,
-                        "positionStatus": "defined"
                     },
                     {
-                        "id": "5",
-                        "label": "MarkupsClosedCurve-5",
-                        "description": "",
-                        "associatedNodeID": "vtkMRMLScalarVolumeNode1",
                         "position": [
                             -6735.759199784232,
                             5461.593738502808,
@@ -132,49 +93,8 @@
                             0,
                             1
                         ],
-                        "selected": true,
                         ],
-                        "selected": true,
-                        "locked": false,
-                        "visibility": true,
-                        "positionStatus": "defined"
                     }
                 ],
-                "display": {
-                    "visibility": true,
-                    "opacity": 1,
-                    "color": [
-                        0.4,
-                        1,
-                        1
-                    ],
-                    "selectedColor": [
-                        1,
-                        0.5000076295109483,
-                        0.5000076295109483
-                    ],
-                    "propertiesLabelVisibility": true,
-                    "pointLabelsVisibility": false,
-                    "textScale": 3,
-                    "glyphType": "Sphere3D",
-                    "glyphScale": 1,
-                    "glyphSize": 5,
-                    "useGlyphScale": true,
-                    "sliceProjection": false,
-                    "sliceProjectionUseFiducialColor": true,
-                    "sliceProjectionOutlinedBehindSlicePlane": false,
-                    "sliceProjectionColor": [
-                        1,
-                        1,
-                        1
-                    ],
-                    "sliceProjectionOpacity": 0.6,
-                    "lineThickness": 0.2,
-                    "lineColorFadingStart": 1,
-                    "lineColorFadingEnd": 10,
-                    "lineColorFadingSaturation": 1,
-                    "lineColorFadingHueOffset": 0,
-                    "handlesInteractive": false,
-                    "snapMode": "toVisibleSurface"
-                }
             },
             "orientation": [
                 0.9423723483536421,

Originally posted by @jcfr in https://github.com/BICCN/cell-locator/issues/93#issuecomment-683161533

wbwakeman commented 4 years ago

@jcfr Yes, I generally support this. I don't know that I am a great authority on what should or should not be removed. It does seem like anything that might be specific to any particular polygon should be retained in the json. Looking at your example, I wonder about id, label, and description. Since those could be different for each polygon, I guess I would think they should be included.

I am okay with any of these terminology systems: markups or annotations or polygons.

Adding the CCF and cell-locator version info seems like a great idea