Skip to content

Update asset labels for cell meshes#553

Merged
GianlucaFicarelli merged 7 commits intomainfrom
update_mesh_asset_labels
Mar 16, 2026
Merged

Update asset labels for cell meshes#553
GianlucaFicarelli merged 7 commits intomainfrom
update_mesh_asset_labels

Conversation

@GianlucaFicarelli
Copy link
Collaborator

@GianlucaFicarelli GianlucaFicarelli commented Mar 9, 2026

Implement:

and remove custom .h5 format for cell_surface_mesh, since not used and replaced by .glb.

In both staging and production there are only:

cell_surface_mesh                       | application/obj

EDIT based on the comments below, these asset labels have been added:

EntityType.cell_morphology -> AssetLabel.cell_surface_mesh -> ContentType.glb
EntityType.em_cell_mesh -> AssetLabel.cell_surface_mesh -> ContentType.glb
EntityType.em_cell_mesh -> AssetLabel.lod_cell_block -> directory

@codecov
Copy link

codecov bot commented Mar 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Flag Coverage Δ
pytest 97.92% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
app/db/types.py 99.46% <100.00%> (+<0.01%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jdcourcol
Copy link
Contributor

I thought this:
content_type=ContentType.gltf_binary,

was for morphologies, not for em_cell_mesh.

@jdcourcol
Copy link
Contributor

and for this:
AssetLabel.lod_mesh_block, I really want a documentation. There are multiple elements missings.

@GianlucaFicarelli
Copy link
Collaborator Author

I thought this: content_type=ContentType.gltf_binary,

was for morphologies, not for em_cell_mesh.

I understood from the linked tickets that the mesh itself can be represented as a single .obj or .glb, and that there can be a directory with many files in .glb format, representing small blocks.
@marwan-abdellah could you clarify?

AssetLabel.lod_mesh_block, I really want a documentation. There are multiple elements missings.

Agreed, but where should it go? The description in the asset label table is meant to be a short description, while for detailed specifications there should be a separate document (like for sonata specs, for example).
In either case I think we need @marwan-abdellah's help

@jdcourcol
Copy link
Contributor

There are

  • the use case where we start from a skeleton (so a morphology) and build a mesh, that I assumed was a single .glb . We would attach that .glb to the skeleton.
  • the use case where we register a em_cell_mesh, this one has a directory with multiple lods each of them being glb.

@GianlucaFicarelli
Copy link
Collaborator Author

GianlucaFicarelli commented Mar 16, 2026

Considering the comment https://github.com/openbraininstitute/Ultraliser/issues/211#issuecomment-4066661627 and previous clarifications with @marwan-abdellah and @jdcourcol:

  • for skeletonization in Ultraliser, the em_cell_mesh needs a single mesh file that has all the details of the mesh. It can be .obj or .glb, since they both contain the same information. We intend to allow .glb only, but we need to allow both the formats in entitycore until the existing assets have been migrated. The corresponding asset label is AssetLabel.cell_surface_mesh
  • for the visualization, the em_cell_mesh needs LODs stored in a directory asset. Each LOD should not exceed 300kbytes, although there won't be a specific limit in entitycore. The format of the files in the directory needs to be documented (ticket https://github.com/openbraininstitute/Ultraliser/issues/205 ?). The corresponding asset label is AssetLabel.lod_mesh_block

@marwan-abdellah and @jdcourcol can you confirm the points above, and the changes in this PR?

@jdcourcol
Copy link
Contributor

There is a 3rd bullet from my comment:

we start from a skeleton (so a morphology) and build a mesh, that I assumed was a single .glb . We would attach that .glb to the skeleton.

Copy link
Collaborator

@mgeplf mgeplf left a comment

Choose a reason for hiding this comment

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

the entitycore side looks fine to me

@GianlucaFicarelli
Copy link
Collaborator Author

GianlucaFicarelli commented Mar 16, 2026

There is a 3rd bullet from my comment:

we start from a skeleton (so a morphology) and build a mesh, that I assumed was a single .glb . We would attach that .glb to the skeleton.

Clarified and updated the PR with a new asset label for the cell morphology:

  • EntityType.cell_morphology -> AssetLabel.cell_surface_mesh -> ContentType.glb

Use case:

A morphology can be given to NeuroMorphoMesh to create a light but with nice triangulation and geometry to have beautiful visualization

The process to generate the mesh is the opposite of skeletonization.

@GianlucaFicarelli GianlucaFicarelli merged commit 820395c into main Mar 16, 2026
2 checks passed
@GianlucaFicarelli GianlucaFicarelli deleted the update_mesh_asset_labels branch March 16, 2026 14:05
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.

3 participants