-
-
Save asim-shrestha/d31b9b40307994d12632110d04efe633 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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