allen-cell-animated / website-3d-cell-viewer

Other
5 stars 4 forks source link

collect viewer settings into a JSON data structure #97

Open toloudis opened 1 year ago

toloudis commented 1 year ago

Use Case

Users who spend a lot of time tweaking settings want to share their view with others.
Also, users may want to augment those settings (using e.g. python scripts) after obtaining them from their viewer session.

Solution

Generate a json file containing every viewer setting, including the location of the volume data loaded.
Create a new url query parameter to go and load json files to initialize the viewer with the settings contained within.

Bonus: allow loading json files from local disk also, via some ui control like a Load button. This brings up implications of being able to load other data via some kind of load button presenting a url entry dialog,etc...

Alternatives

Alternative: put all settings as url query parameters. This would generate potentially very long urls. This is probably less of a requirement than having a json file.

toloudis commented 1 year ago

TODO: design json spec!

toloudis commented 1 year ago
// random brainstorming:

// array of complete channels 
[
  { url (index maybe), channel index, time, all the channel settings, ui group name},
  { ... },
]

// data sources
[ url, url, url ]
// what channels to pull from each data source...
toloudis commented 1 year ago

consider using/extending VolumeDisplayOptions and VolumeChannelDisplayOptions from volume-viewer, or just refer to them

toloudis commented 1 year ago

consider how the spread operator could be used to combine/merge objects with settings from two different places

toloudis commented 1 year ago

see #107