-
Notifications
You must be signed in to change notification settings - Fork 9
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
A way to programmatically set opacity and color of layers? #827
Comments
Yes, you can specify the default values for each layer programmatically. You set For completeness sake, here is how you set this manually. Keep in mind, the first time you open any dataset and fiddle with these values, webKnossos will save your personal preference. In other words, changing the default values will only go into effect for 1) users opening a dataset for the first time or 2) new datasets. |
I see! Is it possible to do this with wkcuber? I have been using wkcuber
CLI to convert our TIFF files into wkw then moving them into the
appropriate folder on our server where WK is hosted
…On Mon, Nov 28, 2022, 3:05 PM Tom Herold ***@***.***> wrote:
Yes, you can specify the default values for each layer programmatically.
You set dataset.default_view_configuration = LayerViewConfiguration(...)
<https://docs.webknossos.org/api/webknossos/dataset/dataset.html#Dataset.default_view_configuration>.
This code snippet contains an example
<https://docs.webknossos.org/webknossos-py/examples/upload_image_data.html>
.
For completeness sake, here is how you set this manually
<https://docs.webknossos.org/webknossos/datasets.html#view-configuration-tab>
.
Keep in mind, the first time you open any dataset and fiddle with these
values, webKnossos will save your personal preference. In other words,
changing the default values will only go into effect for 1) users opening a
dataset for the first time or 2) new datasets.
—
Reply to this email directly, view it on GitHub
<#827 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACGLBQS4DB3YM3MN7WHK4J3WKSGV7ANCNFSM6AAAAAASNE7IZ4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
No, it is not possible with the wKCuber. You can, however, you use the wK Python Lib to convert a TIFF image stack with |
Thank you! I have been making some progress on this with the WK Python Lib
|
I think I've somewhat figured out what might the issue be. Dataset.from_images reads the single but multi-page TIFF file differently from add_layer_from_images. Might have to do with Dataset.ConversionLayerMapping? See corresponding json file below.
|
@azatian Thank you for reporting this bug! 🐞 I think I can reproduce the problem locally and will work on a fix. In the meantime it might work for you if you use the full path to the file in dataset.add_layer_from_images(images="cutouts/dcvsyn1_presyn/name_of_your.tiff", …) I'll write back when the fix is deployed, then it should work with the folder-name as well. |
Hello! I see! I shall try that. I was able to get around it by doing making individual datasets per layer but tying them with the same output path:
|
Here is the associated json file, where the input shapes are now correct for all layers:
|
@jstriebel Has this issue been resolved with PR #829? Perhaps, @azatian can re-test with your new release. |
Great that you found a workaround, @azatian! We just released a version with a fix for the problem, version |
Closing this for now. @azatian please let us know if something is unresolved. |
Hello!
Is there a way to programmatically set the opacity and the color of layers? Is there a value I can programmatically set within the meta data json file that would enable this automatically? Please see screenshot below. The default settings for these two layers is that there is 100 opacity and no color set.
Thank you for your help.
The text was updated successfully, but these errors were encountered: