Skip to content

Add method to download meshes #1307

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

Merged
merged 29 commits into from
Jul 30, 2025
Merged

Add method to download meshes #1307

merged 29 commits into from
Jul 30, 2025

Conversation

markbader
Copy link
Contributor

@markbader markbader commented May 15, 2025

Description:

  • This PR adds functionality to download meshes as .stl files.

Issues:

Todos:

Make sure to delete unnecessary points or to check all before merging:

  • Updated Changelog

@markbader markbader self-assigned this May 15, 2025
Copy link

github-actions bot commented May 22, 2025

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
9291 7841 84% 80% 🟢

New Files

File Coverage Status
webknossos/webknossos/client/api_client/tracingstore_api_client.py 57% 🟢
TOTAL 57% 🟢

Modified Files

File Coverage Status
webknossos/webknossos/annotation/annotation.py 81% 🟢
webknossos/webknossos/client/api_client/init.py 100% 🟢
webknossos/webknossos/client/api_client/_abstract_api_client.py 94% 🟢
webknossos/webknossos/client/api_client/datastore_api_client.py 82% 🟢
webknossos/webknossos/client/api_client/models.py 100% 🟢
webknossos/webknossos/client/api_client/wk_api_client.py 89% 🟢
webknossos/webknossos/client/context.py 89% 🟢
webknossos/webknossos/dataset/dataset.py 85% 🟢
TOTAL 90% 🟢

updated for commit: 5f1733c by action🐍

@markbader markbader marked this pull request as ready for review June 5, 2025 16:23
@markbader markbader requested a review from fm3 June 16, 2025 12:50
Copy link
Member

@fm3 fm3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for looking into this! I added a couple of comments.

Additionally: is there an exposed way to download meshes from datasets (without annotation?) Maybe a similar method could be added to wk.Dataset? On the other hand, I’d say the Tracingstore class with its download_mesh may not have to be user-facing.

What do you think?

@markbader markbader requested a review from fm3 July 10, 2025 10:55
@markbader
Copy link
Contributor Author

What exactly should be downloaded from a dataset without annotation? I thought we always want to download a certain segment. Does a dataset have segments if there is no annotation?

@fm3
Copy link
Member

fm3 commented Jul 10, 2025

Yes, this is somewhat specific to the webknossos terminology, but “on-disk” segmentation layers are not directly counted as annotations. Yes, volume annotation layers can have such segmentation layers as fallback layers, but no annotation object is required to see segments and their meshes. As long as a dataset has a layer of category segmentation, and a meshfile, this should be possible.

@markbader
Copy link
Contributor Author

I am not sure if I understand it completely. I added the download_mesh method to the remote_dataset class.

As long as a dataset has a layer of category segmentation, and a meshfile, this should be possible.

Does this mean AdHoc meshes are not possible for a dataset with segmentation layer?

Another question is if downloading a mesh from a dataset is also possible with a tracing_id or just with the Datastore?

@fm3
Copy link
Member

fm3 commented Jul 21, 2025

Does this mean AdHoc meshes are not possible for a dataset with segmentation layer?

AdHoc meshing is also possible, true, I missed that case in my post above.

Another question is if downloading a mesh from a dataset is also possible with a tracing_id or just with the Datastore?

Just with the datastore, not by tracing_id.

As discussed internally, I will take over this PR going forward. Thanks for your effort! I think it’s already very close to being complete.

@fm3 fm3 merged commit 4f59df9 into master Jul 30, 2025
29 checks passed
@fm3 fm3 deleted the download-meshes branch July 30, 2025 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Download meshes from remote segmentations
2 participants