Export Segmentation in DICOM-RT format

Dear all,

What I would like to do is to export a clipped region (from Dynamic Modeler) into a DICOM-RT file. I have searched throughout the Forum with no answer. It has bothered me for a long time. Any help from your side will be much appreciated.

Operating system: Windows 10
Slicer version: 4.11.20210226
Expected behavior: Export a Segmentation in DICOM-RT format
Actual behavior:

My workflow is as follows:

  1. Imput a CT data set with some heart Segmentations (in RTSTRUCT format);
  2. “Export visible segments to models”;
  3. Generate a Segmentation (ClippedRegion) by Dynamic Modeler (using curve cut);
  4. “Convert model to segmentation node”;
  5. Right click this segmentation, then click “Export to DICOM…”;
  6. Get the error message “Must export the primar anatomical (CT/MR) image” (see the screenshot below).

Could you give me some support?

Thank you so much!

And it seems that the new Segmentation is not “linked” to the primary CT data set? When I click the CT data set in this Export window, the label of the original segmentation with the CT will turn green. I guess this means the original segmentation is “linked” with the CT. This is maby another problem.

1 Like

If I remember correctly, the segmentation needs to be a sibling of the CT under the study, and not under the CT. Please try that and let us know.

1 Like

Hi Csaba, I have tried and it works now. Thanks for your support!

1 Like

It is great that it works now. @cpinter is there a specific reason why the segmentation must be a directly under the study item? Should we make the export mechanism more robust (e.g., do a recursive search from the study level)? If we don’t implement a fix right now then we should at least add an issue to the tracker to remember to work on this later.

1 Like

Accepting more valid scenarios would be nice indeed. I added an issue More robust item discovery for export · Issue #185 · SlicerRt/SlicerRT · GitHub

2 Likes