mobie / mobie.github.io

1 stars 3 forks source link

Update view.schema.json #106

Closed martinschorb closed 1 year ago

martinschorb commented 1 year ago

This field was missing and it's crucial for showing multiple timepoints in one view.

Do we need it for the other transform types (grids) as well?

martinschorb commented 1 year ago

@tischi it seems that looking for sourceNamesAfterTransform in a timepoints transform is not yet implemented in the viewer either. I get a java.lang.RuntimeException: C1-Live4_smallerView_tp_98-to-99 is not part of the current image data. Exception when trying to load this view:

"sources": {
    "C1-Live4_smallerView": {
      "image": {
        "imageData": {
          "ome.zarr": {
            "relativePath": "images/ome-zarr/C1-Live4_smallerView.ome.zarr",
            "channel": 0
          }
        }
      }
    }
  },
  "views": {
    "ghosts": {
      "sourceDisplays": [
        {
          "imageDisplay": {
            "color": "255-255-255-255",
            "contrastLimits": [
              0.0,
              143.0
            ],
            "name": "C1-Live4_smallerView_tp_98-to-99",
            "opacity": 0.2000,
            "sources": [
              "C1-Live4_smallerView_tp_98-to-99"
            ],
            "showImagesIn3d": false,
            "visible": true
          }
        },
        {
          "imageDisplay": {
            "color": "255-255-255-255",
            "contrastLimits": [
              0.0,
              143.0
            ],
            "name": "C1-Live4_smallerView_tp_99-to-99",
            "opacity": 1.0000,
            "showImagesIn3d": false,
            "sources": [
              "C1-Live4_smallerView_tp_99-to-99"
            ],
            "visible": true
          }
        }
      ],
      "isExclusive": false,
      "uiSelectionGroup": "ghosts",
      "sourceTransforms": [
        {
          "timepoints": {
            "sources": [
              "C1-Live4_smallerView"
            ],
            "keep": false,
            "name": "C1-Live4_smallerView_timepoints",
            "parameters": [
              [
                99,
                98
              ]
            ]
          },
          "sourceNamesAfterTransform": "C1-Live4_smallerView_tp_98-to-99"
        },
        {
          "timepoints": {
            "sources": [
              "C1-Live4_smallerView"
            ],
            "keep": false,
            "name": "C1-Live4_smallerView_timepoints",
            "parameters": [
              [
                99,
                99
              ]
            ]
          },
          "sourceNamesAfterTransform": "C1-Live4_smallerView_tp_99-to-99"
        }
      ]
    }
  }
tischi commented 1 year ago

To me it looks like as if you put it by accident outside the { } of the timepoints::

"timepoints": {
            "sources": [
              "C1-Live4_smallerView"
            ],
            "keep": false,
            "name": "C1-Live4_smallerView_timepoints",
            "parameters": [
              [
                99,
                98
              ]
            ]
          },  // <---- the below should go inside ?!
          "sourceNamesAfterTransform": "C1-Live4_smallerView_tp_98-to-99"
martinschorb commented 1 year ago

Do we need it for the other transform types (grids) as well?

I just saw that for transformedGrid transformss it is already in. So I think it was only missing for timepoints.

martinschorb commented 1 year ago

And the overlayNamesthat were introduced with https://github.com/mobie/mobie-viewer-fiji/pull/1028 should also make it in the spec.

martinschorb commented 1 year ago

@tischi what does overlayNames do? The viewer adds this automatically to all new views (including what the project creator does) but it is not (yet) part of the spec.

constantinpape commented 1 year ago

The overlayNames are a flag for determining whether the text overlay of the layer name is shown. We decided to postpone adding it until we had a closer look at https://github.com/mobie/mobie-viewer-fiji/issues/1013.