I used dcmrtstruct2nii to convert RS in MR data into NII format. I found that when the length and width of the image are inconsistent, a warning (WARNING:root:Structure ... is out of bounds, ignoring contour!) will appear and the NII result will not be generated. While the length and width of the image are the same, everything is OK.
Excuse me, how can I solve this problem?
I have found the solution to the problem. Change 'filled_poly = self._poly2mask(pts[:, 0], pts[:, 1], [shape[0], shape[1]])' here to 'filled_poly = self._poly2mask(pts[:, 0], pts[:, 1], [shape[1], shape[0]])'.
I used dcmrtstruct2nii to convert RS in MR data into NII format. I found that when the length and width of the image are inconsistent, a warning (WARNING:root:Structure ... is out of bounds, ignoring contour!) will appear and the NII result will not be generated. While the length and width of the image are the same, everything is OK. Excuse me, how can I solve this problem?