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.

According to your recommendation, I reviewed the file you sent. However, since it was in slide format, the explanations were brief, and it wasnā€™t a very comprehensive document. So, I attempted to gather more information from GitHub, the internet, and AI. I did my best to implement the points you requested, however, I am uncertain about the success of my attempts. This was my first serious experience working with GitHub so Iā€™d appreciate your feedback on my work and any corrections you suggest, as well as guidance on the next steps. I understand that the tasks you outlined were relatively straightforward, but as a beginner, they took me longer than expected. I apologize for any delay.

Hello professor Pinter

I just wanted to follow up on my previous message to ensure it was seen. I am still looking forward to any feedback or guidance you could provide to me.

I gave all the pointers that I could. The alternative is for us to do this for you, but I am extremely busy these days with funded projects and grant submissions. If you have some funding towards this development, please let me know, otherwise I suggest doing again the Slicer programming tutorial and understand the basics well. On this level it is really not that hard.

Unfortunately, I donā€™t have any founding

That project was a part of my masterā€™s thesis and I just wanted to continue my work by making it into a module for software that I have good memories with and I think, with the programming knowledge I had, I had good courage in taking this on. Now I have graduated and Iā€™m on my own. Also, according to the Doller rate in my country, I canā€™t afford to pay.

Iā€™m surprised to hear about funding from you after 37messages between us. Iā€™ve always been honest in my messages and said that Iā€™m a beginner in programming. My simple questions also showed that Iā€™m not a Python programmer or a Slicer programmer. I can understand that I was slow in completing the tasks you asked of me, and this may have affected your opinion but I was completely sincere in my messages and requests for help.

I was very happy that you gave me a roadmap

and I could learn many things with your guidance. (like that and many other things)

Anyway, Iā€™ll make my effort to continue and solve the fourth step in the roadmap, but not now because I feel discouraged and need time to recover.

Thank you for the time youā€™ve spent helping me.

Best regard

Please understand that you cannot expect university professors and company directors to actually implement Slicer modules for you. Maybe you will realize this at a later stage of your carreer. I spent a lot of time trying to help you (much more than usual), and itā€™s unfortunate that it is not enough. Your module is just a little bit more complicated than the example in the tutorialā€¦