feat(segmentation): add island segmentation effect#51
feat(segmentation): add island segmentation effect#51Thibault-Pelletier merged 2 commits intomainfrom
Conversation
| assert effect.is_active | ||
|
|
||
| # Should do nothing | ||
| effect.apply(segment_id, None, minimum_size=0, split=False) |
There was a problem hiding this comment.
Please break the unit test in multiple unit tests instead of undo / redo.
As for other parts of the code, unit tests should follow the single responsibility principle and test only one feature at a time.
There was a problem hiding this comment.
Thanks for the split.
To make the test better, it's better to make the test name explicit (given / when / then structure).
A better name would be : test_with_0_min_voxel_size_remove_small_islands_does_nothing (please update the different test names)
Please also update the tests to use the specialized API and not a generic apply.
There was a problem hiding this comment.
Can you review the test again ?
702c5ba to
0095647
Compare
| max_number_of_segments=1, | ||
| split=False, | ||
| ) | ||
| elif self._typed_state.data.mode == IslandsSegmentationMode.REMOVE_SMALL_ISLANDS.value: |
There was a problem hiding this comment.
Linked comment with the IslandState dataclass, the typed state mode should be a IslandsSegmentationMode instance directly and not a raw int.
There was a problem hiding this comment.
I ended up needing to use encode rather than checking direct equality
de44948 to
6c7f175
Compare
af13c49 to
5ac8142
Compare
5ac8142 to
a66d642
Compare
a66d642 to
75f176a
Compare
Add logic and unit test for island segmentation Add button for island segmentation in medical example Bump test data submodule version
75f176a to
e60a649
Compare
Add logic and unit test for island segmentation
Add button for island segmentation in medical example