Cannot visualize dicom-rt ROIs

I’m trying to convert some of our own annotations (closed polygons) into dicom-rt format.

I created some dicom files with ROIs of random coordinates from scratch using pydicom. I can visualize the ROIs of created dicom files in Matlab.

Matlab code:

info = dicominfo("example/slice-01.dcm");
% info = dicominfo("rtstruct.dcm");
contour = dicomContours(info);


However, I cannot visualize the ROIs with Slicer. I have installed the SlicerRT extension and there is no error log when I load the dicom files.

System information:

Ubuntu: 22.04 + MacOS Ventura 13.0.1
Slicer: 5.2.1 r31317 / 77da381

Examplar generated dicom files can be downloaded from
Any help will be appreciated!

Thank you!

SlicerRT can process input that is similar to clinical RT data. Arbitrary polygon ROIs are not like this. An RT Structure Set (RTSTRUCT) references a CT image, and it defines closed polygons on slices of the CT image. If your RTSTRUCT is like that, then SlicerRT can probably load it.

It is strange that there were no errors. It could be helpful if you showed us the DICOM file you wanted to load and explain exactly how you tried to load it.