Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set initial layer color trough datasource-properties.json #4298

Closed
normanrz opened this issue Oct 4, 2019 · 2 comments · Fixed by #4357
Closed

Set initial layer color trough datasource-properties.json #4298

normanrz opened this issue Oct 4, 2019 · 2 comments · Fixed by #4357
Assignees
Labels

Comments

@normanrz
Copy link
Member

normanrz commented Oct 4, 2019

It would be nice to set the color of a layer in the datasource-properties.json. I still think the users should be able to edit that color, but this could be the default.

@philippotto
Copy link
Member

Ok, I gave this some thought and I think, we should extend the datasource-properties.json with all default-view-related properties. That is, position, zoom, segmentationOpacity and interpolation (for the dataset) as well as color, alpha and intensityRange (per layer).
The back-end should read these settings from the datasource-properties.json file and return them when the view configuration is requested from the front-end.

To stay backwards-compatible with existing view-configurations which are not controlled via the datasource-properties.json, we still keep the View Configuration settings. If they are empty, the back-end reads the properties from the disk. If they were changed, the new values are written to the DB and then read from there.

Do you agree, @fm3?

@fm3
Copy link
Member

fm3 commented Nov 12, 2019

well we have to save those things somewhere on the wk side (amongst the rest of the „datasource“ properties, since the json itself is only available for the datastore). but I guess we can maybe afford to duplicate this in the db. what do you think @youri-k ?

@philippotto philippotto assigned youri-k and unassigned philippotto Nov 13, 2019
bulldozer-boy bot pushed a commit that referenced this issue Mar 17, 2020
* [WIP] add view configuration to datasource properties json #4298
* Merge branch 'master' of github.com:scalableminds/webknossos into view-defaults-from-disk
* [WIP] add layer view configuration
* first working version of new source default view configurations
* Merge branch 'master' of github.com:scalableminds/webknossos into view-defaults-from-disk
* add new configurations to explore layer
* update schema and evolutions
* update test db and changelog and migrations guide
* remove segmentation opacity
* update snapshots
* Merge branch 'master' into view-defaults-from-disk
* adapt flow type that a unimported dataset doesnt have a scale
* merge master
* getting rid of segmentationOpacity property
* Merge branch 'view-defaults-from-disk' of github.com:scalableminds/webknossos into view-defaults-from-disk
* fix small bugs
* fix annotation saga
* merge master
* update naming of defaultViewConfigurationOpt
* merge master
* update evolutions
* merge master
* update evolutions
* fix segmentation layer settings not bound to alpha of segmentation
* fixing flow complains
* Merge branch 'view-defaults-from-disk' of github.com:scalableminds/webknossos into view-defaults-from-disk
* fix flow typing
* fix frontend linting
* Merge branch 'master' of github.com:scalableminds/webknossos into view-defaults-from-disk
* add warning when using depricated api
* change deprication warning
* apply feedback
* remove another redundant check
* Merge branch 'master' of github.com:scalableminds/webknossos into view-defaults-from-disk
* remove intensityRange from segmentationLayerConfig
* Merge branch 'master' into view-defaults-from-disk
* make color property for layers optional
* shorten warning message
* Merge branch 'master' of github.com:scalableminds/webknossos into view-defaults-from-disk
* fix merging errors
* Merge branch 'master' of github.com:scalableminds/webknossos into view-defaults-from-disk
* better unify segmentation / color layer rendering
* clean up faulty merge
* change merge mode to use newest api
 * clean up apit to only print deprication warning if necessary
* fix flow errors
* Merge branch 'master' of github.com:scalableminds/webknossos into view-defaults-from-disk
* Merge branch 'master' into view-defaults-from-disk
* fix typo
* use default configuration when reading a new dataset
* Merge branch 'master' into view-defaults-from-disk
* Merge branch 'master' into view-defaults-from-disk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants