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

Prepare Measurement Engine to extract #559

Open
Czaki opened this issue Mar 23, 2022 · 1 comment
Open

Prepare Measurement Engine to extract #559

Czaki opened this issue Mar 23, 2022 · 1 comment

Comments

@Czaki
Copy link
Collaborator

Czaki commented Mar 23, 2022

Steps needed to prepare measurement engine to be extracted from PartSeg

  1. Update migration engines to allow declare migration next to data structure definitions (almost done) feat: Better serialization mechanism allow for declaration data structure migration locally #462 https://hackmd.io/@GytvakMcS_WIFerhsG8H3w/H1dhn-wpF.
  2. decide where migration engine should be available (maybe nme aka napari-migration-engine`)
  3. Allow to register function-based measurement (currently accept only class-based and comes from python 2.7 where there is no annotation). The best will be if it will be possible to bedone with npe2. Also may need:
    • Update hash function for better-caching results during calculation
    • Better area definition that will cover not only Labels but also Shapes etc.
    • maybe Better Per component definition. Currently, the measurement could be calculated per Label component, globally, or Mean from Per component. Adding more option may reduce needs of postprocessing but complicate the interface.

For performance reasons measurement engine uses cythonized calc_bounds function
https://github.com/4DNucleome/PartSegCore-compiled-backend/blob/494dee185a3a965f90ba06aacdd1a896d0681fe1/src/PartSegCore_compiled_backend/utils.pyx#L13

This allows a clipping array that gains significant performance speedup but also introduces a binary dependency.

I will update this issue.

@kevinyamauchi

@kevinyamauchi
Copy link

Thanks @Czaki ! Let me know if you'd like to chat!

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

No branches or pull requests

2 participants