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

Create pipeline.utils.manualsegmenter.py #460

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Neuro-CS
Copy link
Contributor

Added a manual segmentation iPython widget to pipeline.utils. To use it, run the following in a Jupyter notebook:

%matplotlib ipympl

from pipeline.utils import manualsegmenter as ms
key = dict(animal_id=0, session=0, scan_idx=0)  # Your key here
ms.ManualSegmentationWidget({**key, "field": 1, "channel": 1})

Two critical limitations:

  1. Segmentations cannot be updated. The class can add manually segmented masks only if no manual segmentation currently exists
  2. The classification dropdown menu will apply the selected classification to ALL masks on insertion. You cannot specify different classifications on a per-mask basis.

To draw multiple, disconnected shapes and have them belong to the same mask, click the "Multi-shape mode" button and then draw all pieces of your mask. Once done, click "Finish Mask" to add the pieces as a new mask.

image (7)

Added a manual segmentation iPython widget to pipeline.utils. To use it, run the following in a Jupyter notebook:

```python
%matplotlib ipympl

from pipeline.utils import manualsegmenter as ms
key = dict(animal_id=0, session=0, scan_idx=0)  # Your key here
ms.ManualSegmentationWidget({**key, "field": 1, "channel": 1})
```

Two critical notes:
1. Segmentations cannot be updated. The class can add manually segmented masks only if no manual segmentation currently exists
2. The classification dropdown menu will apply the selected classification to ALL masks on insertion. You cannot specify different classifications on a per-mask basis.
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.

1 participant