Skip to content

Create a widget for vesicle pool assignments #68

@constantinpape

Description

@constantinpape

This widget should take as parameters a segmentation layer (= the vesicle segmentation) with computed object morphology; we need to change the current implementation a bit and add the morphology properties to the layer in order to make this work), and two optional shape layers that represent measurements from the distance measurement widget. It should be checked that all measurements are derived from the same segmentation, by checking that the label ids in the corresponding feature tables match.
For each of these, the user can specify a string for evaluation with https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.query.html . All (up to 3) queries will be intersected to select objects, at least one query has to be given.
The result should be checked, if no vesicle fulfills the criteria do nothing and show an info about it.

The user specifies two parameters for the output: the name of a (new) segmentation layer, where the assignment results will be shown, and the name of the pool (= category) the vesicles should be assigned to. The name of the output layer must be different from the vesicle input layer.
If the specified layer does not yet exist, then create it. Otherwise add the pools onto the existing layer. Then copy over the vesicles that meet the pool assignment to the layer, and color them according to their pool id (this can be done by setting the pools as properties and coloring the layer based on the properties, ask ChatGPT what to do, it can give a good example).
If the layer already exists, then also check if the name of the pool already exists in the properties. If it does, over-ride the corresponding pool / the associated vesicles. Also add a table that shows the pools.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions