Replies: 2 comments 2 replies
-
Most of the state in Vitessce is stored in the coordination space in the view configuration. However, the state values in the coordination space are initialized automatically unless you initialize them manually. In this case, you will want to manually specify the value for For example, in this view configuration, all image rendering properties are automatically initialized (demo): {
"version": "1.0.3",
"name": "Automatic color initialization",
"description": "",
"datasets": [{
"uid": "spraggins-dataset",
"name": "Spraggins et al.",
"files": [{
"type": "raster",
"fileType": "raster.json",
"url": "https://s3.amazonaws.com/vitessce-data/0.0.31/master_release/spraggins/spraggins.raster.json"
}]
}],
"initStrategy": "auto",
"layout": [{
"component": "spatial",
"props": {
"view": {
"zoom": -6.5,
"target": [20000, 20000, 0]
}
},
"x": 0, "y": 0, "w": 9, "h": 2
}, {
"component": "layerController",
"x": 9, "y": 0, "w": 3, "h": 2
}]
} In the following view configuration, we use the {
"version": "1.0.3",
"name": "Automatic color initialization",
"description": "",
"datasets": [{
"uid": "spraggins-dataset",
"name": "Spraggins et al.",
"files": [{
"type": "raster",
"fileType": "raster.json",
"url": "https://s3.amazonaws.com/vitessce-data/0.0.31/master_release/spraggins/spraggins.raster.json"
}]
}],
"initStrategy": "auto",
"coordinationSpace": {
"spatialRasterLayers": {
"A": [{
"type": "raster",
"index": 1,
"visible": true,
"colormap": null,
"opacity": 1,
"domainType": "Min/Max",
"transparentColor": null,
"renderingMode": "Additive",
"use3d": false,
"channels": [{
"selection": {
"channel": 0
},
"color": [255, 0, 0],
"visible": true,
"slider": [20, 24553]
}, {
"selection": {
"channel": 1
},
"color": [255, 0, 0],
"visible": true,
"slider": [75, 15541]
}, {
"selection": {
"channel": 2
},
"color": [255, 0, 0],
"visible": true,
"slider": [17, 8705]
}, {
"selection": {
"channel": 3
},
"color": [255, 0, 0],
"visible": true,
"slider": [21, 7440]
}]
}]
}
},
"layout": [{
"component": "spatial",
"props": {
"view": {
"zoom": -6.5,
"target": [20000, 20000, 0]
}
},
"x": 0, "y": 0, "w": 9, "h": 2,
"coordinationScopes": {
"spatialRasterLayers": "A"
}
}, {
"component": "layerController",
"x": 9, "y": 0, "w": 3, "h": 2,
"coordinationScopes": {
"spatialRasterLayers": "A"
}
}]
} It may also be helpful to check out the full JSON schema for |
Beta Was this translation helpful? Give feedback.
-
On vitessce.io, to see the view configuration (including the coordination space) logged in the browser console, add So this:
becomes
|
Beta Was this translation helpful? Give feedback.
-
I have a number of images of the same experiment type that I would like to load into my application. The provider had previously defined colors to use for each channel in a combined/flattened image. We would like to use the same colors in our presentation of this data as they have used in the combined/flattened version of the data as we will likely be making both versions available to users.
Additionally, this allow us to ensure that whenever looking at data from this experiment we can be sure that channels measuring the same values show up with the same color, making it easier for our users to compare between multiple images.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions