Creating a module for electron bolus

Oh sorry !

The GitHub repository must be empty and first, a suitable framework should be built in it
I apologize for misunderstanding :pray:

I have created a repository on GitHub and invited you. I would be glad if you accepted the invitation

Thank you! Can you please rename it to SlicerElectronBolus? Youā€™d need to do that anyway during the acceptance process for extension.

Please see this for the list of requirements (I only found this list in actual PRs so this is of another extension). Some of which are basic settings of the GitHub repo, you can do some of these now

Iā€™ll generate the extension skeleton hopefully soon.

Yes, definitely.
Thank you for your guidance.
I will thoroughly study this link to learn more.
I am a beginner in Git and GitHub and have just started learning in this field. If I make any mistakes, I would appreciate it if you could guide me.
Thank you in advance for your help.

1 Like

Thank you very much for the quick rename. For the record the repository is

I generated the extension and the module skeleton. I think the user interface you suggested can be simplified, see

So weā€™d only have a selector for the RT plan, the isodose surface, and the skin segment.
It will be important to describe in the documentation how this module expects the isodose surface to be generated (i.e. what dose level needs to be entered, and to keep only one value).

Iā€™ll make this GUI soon and then Iā€™ll give you instructions on how to fill the class with your code.

Thanks a lot. I was so excited to see it !

I didnā€™t quite understand the point you mentioned about ā€œPlan contains referenceā€ and I may have misunderstood some of the concepts. When I add a patientā€™s Dicom data in 3d Slicer, I see that RTPlan, RTStructure, RTDose, and CT (reference volume) are each separate branches of the patient data. However, I donā€™t understand how the RTPlan contains a reference. This issue also applies to the PTV model. I used to import the PTV as a model from RTStructure.
I also have another question regarding segment and model. Previously, you suggested using a segment instead of the model. What changes need to be made in the code for this? Also, regarding the output, the current code I have outputs the bolus as a labelmap volume. What changes are required to have the segment instead?

Thank you for the reminder. Yes, this is an important point when working with the module

Iā€™m very grateful and delighted to have your valuable assistance by my side.

An RTPlan node, which is defined in SlicerRT, contains several properties and references. One of these references is the CT, and another one is the target segment. See the related module:

This takes us to step 4 in the list here. Iā€™ll give you guidance to do these changes, but letā€™s go step by step, I still need to create the module GUI.

1 Like

Thank you for your clear and insightful explanations.

I made the UI. As we discussed, it is quite simple:
image

The next steps are:

  • Go through the ElectronBolus.py file and change the obvious things:
    • Module category, contributors, acknowledgement, etc.
    • Differences due to the sample module and yours
      • There is no invertedOutputSelector
      • Argument list of the process function should be the list of inputs we need (see below)
  • Set the segmentation node from the RT plan to the skin segment selector widget (I think this can be done in _checkCanApply)
  • Modify _checkCanApply function to check all the inputs necessary:
    • RT plan plus the objects we need from its references:
      • CT
      • Target segment (segmentation node and segment)
    • Isodose model
    • Skin segment

hi Csaba
I apologize for the considerable delay.

Unfortunately, I couldnā€™t do all the steps you mention
I can just change categories, contributors, help and acknowledgment text. (very very obvious and easy things :pensive:)

about these parts, I am confused! and I dont know how should apply changes

Could you please guide me more and in greater detail

Please ask concrete questions and I will try to answer.

You mentioned that you had created the UI according to the image, but I couldnā€™t figure out exactly where the definitions and inputs were made. (for example I couldnā€™t find the RT plan or isodose surface in the widget function :roll_eyes:)

You asked me to modify the process and checkCanApply functions based on the inputs used in the code, but I donā€™t know how to define my inputs in these functions, especially since we agreed that only the RT plan would be described as a widget and that the CT and PTV would be extracted from the RT plan.

I havenā€™t worked with GUI codes and the functions used in them before, and my knowledge is very limited :frowning_face: . If there is an informational source that I could learn from, Iā€™d appreciate it if you could introduce it to me.

Hereā€™s the programming tutorial

Once you finish and understand that, and you still need to see how things are done, there are a lot of Python modules in Slicer and its extensions. Look at any of them for examples.