Skip to content

Conversation

@Jo-Byr
Copy link

@Jo-Byr Jo-Byr commented Jul 3, 2025

Problem

The current nifti exporter creates one nifti file per slot and label, it would be useful to generate one multi-label nifti per slot.

Solution

This solution merges all generated nifti file into one, while maintaining the previous ones, with the suffix "Segments".

Modified nifti exporter to do the above.
Added unit test comparing produced multi-label nifti's array to a manually generated nifti

Changelog

Add multi-segment nifti export support

@Jo-Byr Jo-Byr marked this pull request as draft July 3, 2025 14:05
Modify nifti exporter to create an additional nifti file that contains
all segments of the annotated volume
@Jo-Byr Jo-Byr force-pushed the nifti-multi-segment branch from 0964482 to 071bd28 Compare July 4, 2025 14:48
Jo-Byr added 2 commits July 9, 2025 10:04
Fix pixel offset in anisotropic test data
Add sagittal and axial test data
Add test ensuring correct import of multi-label nifti file, by asserting
no error is produced in the process, and that the number of unique
values in the produced array is coherent with the nifti file
@Jo-Byr Jo-Byr marked this pull request as ready for review July 10, 2025 14:19
@vvihorev vvihorev changed the title Add multi-segment nifti export support [External] Add multi-segment nifti export support Jul 24, 2025
@vvihorev
Copy link
Contributor

Closing and moving to a copy of this PR opened from a branch in origin: #1086

@vvihorev vvihorev closed this Jul 24, 2025
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