Skip to content

Instantly share code, notes, and snippets.

@asim-shrestha

asim-shrestha/rt-utils-new.py Secret

Last active Feb 2, 2021
Embed
What would you like to do?
from rt_utils import RTStructBuilder
rtstruct = RTStructBuilder.create_new(dicom_series_path="./testlocation")
# ...
# Create mask through means such as ML
# ...
# Add the 3D mask as an ROI.
# The colour, description, and name will be auto generated
rtstruct.add_roi(mask=MASK_FROM_ML_MODEL)
# Add another ROI, this time setting the color, description, and name
rtstruct.add_roi(
mask=MASK_FROM_ML_MODEL,
color=[255, 0, 255],
name="RT-Utils ROI!"
)
rtstruct.save('new-rt-struct')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment