I've implemented the functionality of adding ROIs from polygons (mentioned in #77 ). I tried to keep the modifications as less as possible and keep it backward-compatitable.
added a Polygon2D class to handle polygon data
Changed ROIData init function to accepts polygon data
update the logic in RTStruct.add_roi to selectively construct ROI from mask or polygon
add validate_polygon for RTStruct
Potential bugs on existing codes:
Since I changed the init function of ROIData, existing code with positional args may cause errors.
I've implemented the functionality of adding ROIs from polygons (mentioned in #77 ). I tried to keep the modifications as less as possible and keep it backward-compatitable.
Polygon2D
class to handle polygon dataRTStruct.add_roi
to selectively construct ROI from mask or polygonvalidate_polygon
forRTStruct
Potential bugs on existing codes:
Since I changed the init function of
ROIData
, existing code with positional args may cause errors.