The existing version works perfectly in cases of there is no hole in the mask. However it is not correct if a hole existed (i.e. in a slice, there is more than one contours). I found a simply way to address the issue by modify line 48 in dcmrtstruct2nii/adapters/convert)/rtstructcontour2mask.py by three lines of code as follows:
A somewhat similar approach has been implemented through PR #37. Please upgrade to v3 to enable the new approach that supports holes out-of-the-box. pip install --upgrade dcmrtstruct2nii==5.
The existing version works perfectly in cases of there is no hole in the mask. However it is not correct if a hole existed (i.e. in a slice, there is more than one contours). I found a simply way to address the issue by modify line 48 in dcmrtstruct2nii/adapters/convert)/rtstructcontour2mask.py by three lines of code as follows: