Segmentation features needed for intracranial mask computation#46
Open
Segmentation features needed for intracranial mask computation#46
Conversation
…, to be used in intracranial mask computation
for more information, see https://pre-commit.ci
…cientificcomputing/mri-toolkit into cecile/segmentation_refinement
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
finsberg
requested changes
Apr 23, 2026
…entation.py (as suggested by Henrik)
…Data anymore and have its own from_file function, for the sake of consistency. csf_segmentation is moved to a dedicated CSFSegmentation class
for more information, see https://pre-commit.ci
Collaborator
Author
|
@finsberg Thanks for all the suggestions. They have been taken into account in the last commits. I have tried to use a smaller portion of the dataset as you did in |
…_refinement Various fixes
…lkit into cecile/segmentation_refinement
finsberg
reviewed
Apr 25, 2026
Member
finsberg
left a comment
There was a problem hiding this comment.
Looks very good. I still have a few more comments
Comment on lines
+96
to
+99
| mri: MRIData | ||
| rois: np.ndarray | ||
| lut: pd.DataFrame | ||
| label_name: str |
Member
There was a problem hiding this comment.
I don't understand why we need these lines? We could make Segmentation into a dataclass (in which case we can keep this and possible add a __post_init__ method). Otherwise I think we can remove this.
|
|
||
| # @dataclass | ||
| class CSFSegmentation: | ||
| segmentation: MRIData |
Member
There was a problem hiding this comment.
I think it is a bit confusing that a segmentation is a MRIData and not a Segmentation.
for more information, see https://pre-commit.ci
…cientificcomputing/mri-toolkit into cecile/segmentation_refinement
for more information, see https://pre-commit.ci
…cientificcomputing/mri-toolkit into cecile/segmentation_refinement
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These functions and the corresponding tests have been added.
The test for segmentation refinement is skipped because it takes quite some time, but I have tested it locally and it reproduces the data from the Gonzo dataset.