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

CELE-126 Allows the EM viewer to not have any segmentation information #80

Draft
wants to merge 10 commits into
base: develop
Choose a base branch
from

Conversation

dvcorreia
Copy link
Member

@dvcorreia dvcorreia commented Dec 19, 2024

Currently, the EM viewer assumes that segmentation information will be present. The basic information for the segmentation impacts the “extent” of the EM viewer, which is used to computer properly the size of the final canvas and ensure that the positions of the polygons when a segmentation is displayed is there.

There is some dataset that might not have a segmentation, we need to tackle those cases.

Various aspect of the software need to be modified:

  • the ingestion needs to be modified to include the full image size in the metadata for the EM files
    • change the code to include the EM tiles resolution in the metadata
    • update the metadata in the bucket
  • this information needs to be written in the DB when the files are ingested (all the glue is here and should be working, only the “write the final image size” part is not in the tool that will ingest the data)
  • in the frontend, we need to modify the final size of the map following this idea: if there is a segmentation, we use this size, otherwise, we use the image size of the EM data
  • we need to create the layers and rings for the segmentation and the synapse segmentation only if there is some

Changes:

  1. Datasets API now returns an extra field emData. maxResolution with the maximum resolution of the EM tiles
  2. maxResolution is calculated during dataset ingestion and pushed in to the bucket
  3. maxResolution is saved in to the DB when the files are ingested
  4. If no EM data is available, it renders a NoEMData component instead of the EM viewer 1
  5. If no segmentation data is available, the EM viewer will take on the EM data extent (maxResolution) in the EM viewer (something is not working correctly and needs to be understood why)
  6. Neuron and synapses segmentations are only added to the EM viewer if the data is available
  7. CLI utility to inspect EM tiles metadata: python -m ingestion.em_metadata ../data/witvliet_2020_7/em
  8. Fix some pyramid related code and tests

Footnotes

  1. image

@dvcorreia dvcorreia self-assigned this Dec 19, 2024
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.

2 participants