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

Update SegmentationExtractor #366

Open
wants to merge 32 commits into
base: 0.6.0
Choose a base branch
from
Open

Update SegmentationExtractor #366

wants to merge 32 commits into from

Conversation

pauladkisson
Copy link
Member

@pauladkisson pauladkisson commented Sep 28, 2024

Awaiting #365 then will change base to 0.6.0dev.

This PR is the second of a series that implement breaking changes to fully standardize the roiextractors api and update/streamline the testing suite. Some of the main goals include

  • removing channels argument to enforce 1 channel/extractor
  • Switching to modularized mixins for testing and supporting pytest fixtures/parameterization
  • Standard input validation, numpy indexing for 'get' methods, etc.

This PR focuses on SegmentationExtractor, FrameSliceSegmentationExtractor, and NumpySegmentationExtractor

@@ -31,6 +31,7 @@
DtypeType = DTypeLike
IntType = Union[int, np.integer]
FloatType = float
NoneType = type(None)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this used? Is it needed? I think generally None is used in typehinting to express the None type

if image_masks.is_file():
assert image_masks.suffix == ".npy", "'image_masks' file is not a numpy file (.npy)"
image_masks: Union[PathType, np.ndarray]
Binary image for each of the regions of interest.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description doesn't seem to indicate what type of arg would take the Path type

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