zapaishchykova / SegmentationReview

Slicer3D extension for rating using Likert-type score Deep-learning generated segmentations, with segment editor functionality. Created to speed up the validation process done by a clinician - the dataset loads in one batch with no need to load masks and volumes separately.
MIT License
25 stars 9 forks source link

Fixing the mapping bug #12

Closed vprudente closed 1 year ago

vprudente commented 1 year ago

This should fix the mappings bug.

Now the newly added function _construct_full_path(), checks if the input path is a full path and, if not, converts it to it. The assumption is that the relative path takes as cwd the selected directory (i.e. self.directory).

zapaishchykova commented 1 year ago

i think this version explicitly asks for the presence of the mapping.csv file? edit: i'll work on finalizing it this week to have both options

vprudente commented 1 year ago

Not necessarily, I made it so that if the file mappings.csv exists (if clause in line 195) then uses that for mapping images and masks, otherwise (else clause in line 205) uses the original fetching logic, i.e. files need to be named correctly with the suffixes _img.nii and mask.nii.

zapaishchykova commented 1 year ago

restructured logic a bit in the new commit - with support of no masks, closing the PR https://github.com/zapaishchykova/SegmentationReview/commit/a22eb7b5d2c1b1d348520bd24eb875f1c7ac70db