How to Create shadows of the segments?

Dear Developers and Users

I want to create an image, with a certain matrix and pixel sizes, of the shadows of the segments in RTSTRUCTURE (one of the inputs used in SlicerRT) on a plan at a distance of 160 cm from the target and perpendicular to the central axis of beam.

Please suppose that I want the matrix size of this image to be equal to 1024x1024 and pixel size to be equal to 0.4x0.4 mm.

It is assumed that the source of producing these shadows is the target of the linear accelerator (LINAC).
I have shown this in the following figure.

In this figure, the radiation field (Beam) is seen in green. The plane I talked about is displayed in yellow.

At this figure, the segments that I want shadows to be created on this plan include the following:

CTVCTNormal and

I want the pixel value of each shadow area of the segments to be specific and different from the other.

Please guide me.

Best regards.


Hi Shahrokh,

This is an interesting problem. The first thing that occurs me is to check out the implementation of the “Markups perspective projection on the imager plane” part of the DRR Image Computation module, maybe it is easy to extend it to projections of segments.

FYI there is an RT planar image class in SlicerRT, probably it would make sense to use that instead of the model node.

Hi Csaba

Thank you very much for your advice.
I will definitely check this issue, tomorrow.

I want to calculate the dose distribution inside the shadows of the segments at the EPID position and then plot the curve of dose versus area.

I converted DRR and EPID images to absorbed dose distribution.

Best regards.

I’m not sure if it helps, but you can add segments to a volume (using Mask volume effect) and then simulate an EPID image using DRR.

Hello Andras

This is also an interesting and creative method. Based on this, I can create (or projects) from the segments added to volume.

Best regards.

Hello Csaba and Andras

Thank you very much again for your guidance.

As you suggested, I tried to use the DRR Image Computation module. I have the SlicerRT module on Slicer version 5.0.2 r30822.
Unfortunately, I do not find Markups perspective projection on the imager plane part in the module of DRR Image Computation.

Anyway at first, I used Andras’ guide by converting the Segment to Volume with the Mask Volume Effect in the Segment Editor module, as shown in below:

Then I converted LabelMapVolumeCTVCTNormal to Volume in the Volumes module. I renamed LabelMapVolumeCTVCTNormal to CTVCTNormalVolume.

In the last step, I used the DRR Image Computation module. The settings made in this module are shown in the figure below:

As you can see in the above figure, I don’t see an the part of Markups perspective projection on the imager plane in this module.
In this regard, where can I use (or tick) this part in this module?

Anyway, I get the following DRR image.

The pixel value range in this DRR image is between -255 and zero.

Because I want an the accurate shadow of the segments in the form of a binary image (with sharp edges and no penumbra), the only way I can think of is to use Effects in the Segment Editor module; as following:

1- Threshold Effect
Threshold range -255 to -255
2- Logical Operators
Operation: Invert
3- Mask Volume.
Outside fill value: 0
Inside fill value: 1


Here is a question for me:

Can this final image be the geometric shadow of the segment of CTVCTNormal?

Please guide me.
Best regards.

You use a Slicer version that is years old, so many features we now have are missing. Please update.

Hi Csaba

Thank you very much for your advice.
Unfortunately, I did not succeed. I am trying to create the desired segment shadow in the imager position according to your guidance using Markups perspective projection on the imager plane part of the DRR Image Computation module.