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

Updating API #3

Open
ianhi opened this issue Mar 7, 2023 · 6 comments
Open

Updating API #3

ianhi opened this issue Mar 7, 2023 · 6 comments

Comments

@ianhi
Copy link
Collaborator

ianhi commented Mar 7, 2023

Now that we're moving this from mpl-interactions we have a good opportunity to update the API. Inspired by discussions from mpl-extensions/mpl-interactions#266 here are osme initial thoughts:

Image stacks

stack_segmenter = ImageSegmenter(image_stack)

stack_segmenter.mask # returns something with the same shape as image_stack

image overlay

ImageSegmenter([img1, img2], overlay_image_stack=True)

Multiple ROIs
with an implementation inspired by this: https://github.com/ianhi/mpl-point-clicker/blob/cf254d56a5ffe7ec2cc201f67d0d326f1006694e/mpl_point_clicker/_clicker.py#L50-L53

 ImageSegmenter(image_stack, rois = ['Tumor','Kidney','Vessel'])

# alternatively
 ImageSegmenter(image_stack, rois = 3)

attn: @wgottwald

@ianhi
Copy link
Collaborator Author

ianhi commented Mar 7, 2023

Note that the rois argument is currently somewhat implemented by the nclasses argument. I think it should probably be renamed to classes an implement the behavior here.

The current_class attribute should also become a property that accepts either a string or a number

@ianhi
Copy link
Collaborator Author

ianhi commented Mar 7, 2023

A bunch of current_class improvements implemented in c2766f0

@ianhi
Copy link
Collaborator Author

ianhi commented Mar 7, 2023

do need to add docs for that though - I broke my own rule by pushing without docs :(

@wgottwald
Copy link

I am currently busy with other things but will have a look at this as soon as possible- thanks for the new repo!

@ianhi
Copy link
Collaborator Author

ianhi commented Mar 21, 2023

stacking coming in #4

@ianhi
Copy link
Collaborator Author

ianhi commented Mar 21, 2023

image stacks available in 0.2.0 and things even got documented :) https://mpl-image-segmenter.readthedocs.io/en/stable/

still no image overlay

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