BICCN / cell-locator

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

Is there a difference between a LIMS json blob those save directly to file? #207

Open lydiang opened 3 years ago

lydiang commented 3 years ago

Environment

Windows 10

Description Some cells were annotated using Cell Locator and LIMS integration. I wanted to use these annotation for analysis. I wanted to turn these annotation into a standalone json file so that I don't accidently alter what is in LIMS. When I copy the LIMS json blob into a file, Cell Locator isn't able to open the file.

Expected behavior I expected that Cell Locator is able to open the file. It seems to have the same fields - expect in a different order - but I didn't think one would use json in a order sensitive way.

How to Reproduce

Save this json blob into a file
{
  "cameraViewUp": [
    0,
    0,
    1
  ],
  "currentId": 2,
  "cameraPosition": [
    5871.541337421424,
    -50929.52487274342,
    -3987.4998168945312
  ],
  "markups": [
    {
      "markup": {
        "type": "Fiducial",
        "coordinateSystem": "LPS",
        "controlPoints": [
          {
            "position": [
              -6270.166125184477,
              6774.999999999999,
              -3622.9618407105872
            ],
            "id": "1",
            "orientation": [
              -1,
              0,
              0,
              0,
              -1,
              0,
              0,
              0,
              1
            ]
          }
        ]
      },
      "name": "Sst-IRES-Cre;Ai14-594119.11.02.01",
      "orientation": [
        1,
        0,
        0,
        5686.499999999999,
        0,
        0,
        1,
        -6774.999999999999,
        0,
        1,
        0,
        -3987.4999999999995,
        0,
        0,
        0,
        1
      ]
    },
    {
      "markup": {
        "type": "Fiducial",
        "coordinateSystem": "LPS",
        "controlPoints": [
          {
            "position": [
              -6121.520630121633,
              6774.999999999999,
              -3855.5935779519623
            ],
            "id": "1",
            "orientation": [
              -1,
              0,
              0,
              0,
              -1,
              0,
              0,
              0,
              1
            ]
          }
        ]
      },
      "name": "Sst-IRES-Cre;Ai14-594119.11.02.02",
      "orientation": [
        1,
        0,
        0,
        5686.499999999999,
        0,
        0,
        1,
        -6774.999999999999,
        0,
        1,
        0,
        -3987.4999999999995,
        0,
        0,
        0,
        1
      ]
    },
    {
      "markup": {
        "type": "Fiducial",
        "coordinateSystem": "LPS",
        "controlPoints": [
          {
            "position": [
              -6397.886925430679,
              6774.999999999999,
              -3832.422825283248
            ],
            "id": "1",
            "orientation": [
              -1,
              0,
              0,
              0,
              -1,
              0,
              0,
              0,
              1
            ]
          }
        ]
      },
      "name": "Sst-IRES-Cre;Ai14-594119.11.02.03",
      "orientation": [
        1,
        0,
        0,
        5686.499999999999,
        0,
        0,
        1,
        -6774.999999999999,
        0,
        1,
        0,
        -3987.4999999999995,
        0,
        0,
        0,
        1
      ]
    }
  ],
  "stepSize": 24.999999999999996,
  "version": "0.2.0+2021.08.12",
  "ontology": "Structure",
  "referenceView": "Coronal"
}
  1. Start the application
  2. Open the json file
  3. An error occurs.

image

wbwakeman commented 2 years ago

FWIW, this works for me. The LIMS JSON is equivalent to the JSON saved to a file.

If the problem is reproducible, then it may be worthwhile reviewing how you are getting the JSON from the LIMS database.