Conversation
| self.compartments = [ | ||
| x | ||
| for x in self.image_set_dict | ||
| if "Nuclei" in x or "Cell" in x or "Cytoplasm" in x or "Organoid" in x |
There was a problem hiding this comment.
Consider making the specific kind of compartments configurable with this reasonable default.
| """Configuration options for ImageSetLoader.""" | ||
|
|
||
| image_set_name: str | None = None | ||
| mask_key_name: list[str] | None = None |
There was a problem hiding this comment.
Would it make sense to use "label" instead of "mask" wherever it appears to keep language consistent?
| self.image1 = self.image_set_loader.image_set_dict[channel1].copy() | ||
| self.image2 = self.image_set_loader.image_set_dict[channel2].copy() |
There was a problem hiding this comment.
Why a copy? Consider documenting.
| """Test that spaces are replaced with hyphens.""" | ||
| assert remove_underscores_from_string("test string") == "test-string" | ||
|
|
||
| def test_remove_slashes(self) -> None: |
There was a problem hiding this comment.
Consider using pytest parametrization throughout where possible.
|
|
||
| class ImageSetLoader: | ||
| """ | ||
| Load an image set consisting of raw z stack images and segmentation masks. |
There was a problem hiding this comment.
Is there a hidden assumption within the implementation about the resulting order (and object returned)? Consider documenting what that might be. Specifically I'm wondering if we load images with this class, do we get back the "correctly ordered" version of the sets, or only what the filesystem decided to send to us?
Description
This PR adds the loaders needed for ZedProfiler's featurization process
What kind of change(s) are included?
Checklist
Please ensure that all boxes are checked before indicating that this pull request is ready for review.