This PR fixes an issue where disc 1 was removed from the ground truth even when present in the original data, therefore making the hourglass unable to identify this disc.
The error came from the function mask2label where a condition prevented this label to be kept.
Moreover, due to its high complexity, the function was rewritten using the method getNonZeroCoordinates available with the Image object from spinalcordtoolbox
Description
This PR fixes an issue where disc 1 was removed from the ground truth even when present in the original data, therefore making the hourglass unable to identify this disc.
The error came from the function
mask2label
where a condition prevented this label to be kept.Moreover, due to its high complexity, the function was rewritten using the method
getNonZeroCoordinates
available with the Image object from spinalcordtoolboxFixed issue
issue https://github.com/spinalcordtoolbox/disc-labeling-hourglass/issues/6