Python dose calculation

2,909 views
Skip to first unread message

Darcy Mason

unread,
Jan 4, 2011, 2:01:58 PM1/4/11
to Python in Medical Physics
Python-medphys'ers:

I'm interested in opinions on free radiotherapy dose calculation
(external beam) solutions called from python code.

My use cases are for plan optimization, and calcing 3D dose from 2D
IMRT fluence measurements. For plan optimization, final dose calc
would be done in a commercial system, so the one from my code does not
need to be extremely accurate, just accurate enough that the optimized
plans do not degrade too much on final dose calculation.

The dose calc needs to handle MLC segments (and 2D intensities), so
that probably means superposition or convolution-style. Monte Carlo is
too much for my needs. The calc should work with CT data, ideally
including at least a crude inhomo correction.

The speed needs to be reasonable but I don't mind starting with
something slow that works and later optimizing for speed.

The options as I see them:
1. "pure"(*) python (with Numpy of course). (*) or nearly pure,
with very small amount in C for key parts
2. Something in another language that might be reasonably translated
to python/Numpy.
3. Something in C that can be wrapped and called from python.

Code that could be fairly easily parallelized (for CUDA) would be a
bonus. Then the speed becomes much less of an issue.

Does anyone have any experience or knowledge of good solutions? If
there is nothing in option 1, then does anyone have good experience
with open source dose calc software in another language?

Thanks and Happy New Year,
Darcy

Adit Panchal

unread,
Jan 11, 2011, 8:12:44 PM1/11/11
to python-...@googlegroups.com
Hi Darcy,

You may want to take a look at this article: http://www.ncbi.nlm.nih.gov/pubmed/14528953

My own thesis advisor used it for his work in IMRT optimization, but converted the code to Matlab. I am sure you should be able to either wrap it or convert it to Python.

I downloaded the source from: http://medschool.umaryland.edu/departments/radiationoncology/pencilbeam/ at one point, but it seems that the school's website structure has changed.

You can find a copy of the paper here: http://pages.cs.wisc.edu/~ferris/papers/MPH-toolbox.pdf as well.

I can zip the source code that I downloaded and send it to you if you want.

Good luck,

Adit

Jothy

unread,
Jan 11, 2011, 11:30:35 PM1/11/11
to python-...@googlegroups.com
Hi Adit,

Please send the src code.

Thank you

Jothy

Adit Panchal

unread,
Jan 12, 2011, 1:56:39 PM1/12/11
to python-...@googlegroups.com
Hi Darcy and Jothy,

Here is a link to the source code: http://db.tt/I9F2Ap8

I have not tested it myself, but I just zipped up whatever I had downloaded some time ago.

Please post back your results, as I am curious myself how it works out.

Thanks,

Adit

On Wed, Jan 12, 2011 at 12:33, Darcy Mason <darcy...@gmail.com> wrote:
Hi Adit,

I recognize this paper, and in fact had downloaded the paper (but not
the source code apparently) years ago. The calc is limited to a
cylindrical phantom, but perhaps that is actually an advantage in this
case, making it easier to start with and later adapt as needed.

If you can post the code somewhere or email it, that would be great --
I did a quick search and it does not seem to be available anywhere
online any more.

Darcy


On Jan 11, 11:30 pm, Jothy <jothyb...@gmail.com> wrote:
> Hi Adit,
>
> Please send the src code.
>
>
> On Tue, Jan 11, 2011 at 5:12 PM, Adit Panchal <apanc...@bastula.org> wrote:
> > Hi Darcy,
>
> > You may want to take a look at this article:
> >http://www.ncbi.nlm.nih.gov/pubmed/14528953
>
> > My own thesis advisor used it for his work in IMRT optimization, but
> > converted the code to Matlab. I am sure you should be able to either wrap it
> > or convert it to Python.
>
> > I downloaded the source from:
> >http://medschool.umaryland.edu/departments/radiationoncology/pencilbeam/at
> > one point, but it seems that the school's website structure has changed.
>
> > You can find a copy of the paper here:

>
> > I can zip the source code that I downloaded and send it to you if you want.
>
> > Good luck,
>
> > Adit
>

kaneh...@gmail.com

unread,
Apr 5, 2014, 5:47:11 AM4/5/14
to python-...@googlegroups.com
Hi Adit!

I am a student majored in Medical Physics. I am looking for a source code of IMRT optimization, and try to download the website you posted before, but it seemed to be changed.
If you still have the source code of IMRT optimization, could  you send it to me? 

Thank you so much!

Taka

Patrice Munger

unread,
Apr 5, 2014, 9:10:33 AM4/5/14
to python-...@googlegroups.com
Hi all, 


It's a Matlab based S/C TPS and should be relased open-source in the near future. It would certainly be intersting to see if this can be adapted to python.

Patrice


--
--
Python in Medical Physics resources can be found at:
https://sites.google.com/site/pythonmedphys/

---
You received this message because you are subscribed to the Google Groups "Python in Medical Physics" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-medphy...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Patrice Munger

jker...@gmail.com

unread,
May 25, 2016, 9:15:42 PM5/25/16
to Python in Medical Physics
It's unfortunately only in matlab, but this looks pretty cool. Maybe we can make some Python bindings? http://e0404.github.io/matRad/

Darcy Mason

unread,
May 26, 2016, 11:22:44 AM5/26/16
to Python in Medical Physics, jker...@gmail.com
I just came across matRad recently too.  Looks interesting. They have a presentation listed in the ICCR meeting program.

Simon Biggs

unread,
May 27, 2016, 3:43:05 AM5/27/16
to Python in Medical Physics, jker...@gmail.com
At a first glance that does look very interesting. I wonder if it would be possible to tweak it until it is compatible with octave, and then wrap python around the octave? I would be very keen to be involved in this if someone else was also.

Cheers,
Simon

Roy K

unread,
May 28, 2016, 12:30:06 AM5/28/16
to python-...@googlegroups.com

Who's planning to file a github issue "please port to Python"? 😂

Roy

To post to this group, send email to python-...@googlegroups.com.
Visit this group at https://groups.google.com/group/python-medphys.

Adit Panchal

unread,
May 28, 2016, 4:22:06 PM5/28/16
to python-...@googlegroups.com
I'll +1 it if someone does it 😆

Sent from my iPhone

markb...@gmail.com

unread,
Dec 2, 2016, 7:02:59 PM12/2/16
to Python in Medical Physics, jker...@gmail.com
Hi Simon,

no tweaking necessary to have matRad functions run in Octave 4. We tested it and things run out of the box. However, there is no GUI suport in Octave and if you want to work with large dose influence matrices - which you certainly would want to do for particles - you need to recompile Octave's linear algebra libraries from scratch to have 64bit support. Also running a DICOM import without GUI support might be a pain - but it should work ;)

Cheers / Mark

Simon Biggs

unread,
Nov 12, 2017, 8:39:43 PM11/12/17
to Python in Medical Physics
Hi Darcy,

I am embarking on writing a python module for dose calculation based on the collapsed cone convolution algorithm. The aim is to license it under the AGPLv3+. Is there a group of people who would be willing to build this with me? I imagine breaking it up into separate modules something along the line of the following:
  • Dicom CT to electron density module (very small)
  • Water equivalent radiation depth calculation for a voxel array given source coordinate and an electron density grid. Needs ray tracing here.
  • MLC, dose rate, leaf speed, conversion to a spectral energy fluence out of the head.
  • TERMA calculation. Needs equivalent radiation depth, and spectral energy fluence.
  • A data module, containing the CCC analytical kernels, and energy spectrum results from various linac designs, energies and flattening filters.
  • The collapsed cone convolution module itself that takes a TERMA input, electron density grid, and the kernels and produces a dose grid.
Each module would have its own repo and pypi package.

What are others thoughts?

Simon Biggs

unread,
Nov 12, 2017, 9:10:07 PM11/12/17
to Python in Medical Physics
The following paper seems like a good place to start:

Darcy Mason

unread,
Nov 15, 2017, 9:52:10 AM11/15/17
to Python in Medical Physics
It would be great to have a CCC dose calculation algorithm available in python.  I'd contribute where I can, although realistically that would be quite limited for at least the next few months. At a minimum, I would try to help review some of the design and/or review some code.

I like the modules you've laid out, that looks like a good process that fits together and can be tackled reasonably independently.

Is there source code available from the paper you linked to?  Or good code (that makes sense for translation to python) for any/all of the separate pieces?  

Darcy

Simon Biggs

unread,
Nov 15, 2017, 10:35:58 PM11/15/17
to Python in Medical Physics
Hi Darcy,

Source code wasn't available from the paper. I have contacted the authors but I have not yet heard back. 

My thought is to initially make a sort of "tracer bullet" (http://www.artima.com/intv/tracer.html). This will allow me to make something that has some usefulness relatively quickly. I would do this by removing the need for most of the modules initially and focus on square fields, block phantom, all water, case. That way I don't initially need the electron density module, the water equivalent depth or even really much of the collapsed cone itself since collapsed cone benefits pay off when there are inhomogeneities.

The paper has good suggestions to model spectrum and spectrum differences off axis due to the flattening filter (horn effect). So for the data module initially all I would need is some kernels. The following paper was referenced for that purpose:

Unfortunately I don't have access to Phys Med Biol, so I haven't got to reading that paper yet. But if anyone had a good data set of kernels that would help kick this off to a flying start.

For the calculation of the spectral energy fluence the paper recommended a 3 source model and referenced the following two papers:

Unfortunately I don't have access to those either.

Then the collapsed cone module initially could just use the basic fourier convolution within scipy (https://docs.scipy.org/doc/scipy-0.19.1/reference/generated/scipy.signal.fftconvolve.html). (This isn't collapsed cone at all, but it fulfills the same purpose until it gets expanded on).

From there I would have a basic basic working model that I can then take a standard set of PDDs and profiles to fine tune the fluence and spectrum model.

Lastly I could then update it to be able to have varied MLC shapes at which point it would be usable as a coarse plan check tool. Hopefully by that point there will be enough interested people to run with it as we flesh it out into a CCC model.

What do you think?

Cheers,
Simon

Simon Biggs

unread,
Nov 15, 2017, 10:44:55 PM11/15/17
to Python in Medical Physics
And when I say kernel data, they would need to be monoenergetic kernels for a range of energies that exist over the range of a linac spectrum. These monoenergetic kernels could then be combined according to the spectrum as needed.

Stephen Terry

unread,
Nov 16, 2017, 9:36:07 AM11/16/17
to Python in Medical Physics
I've been working on a plugin for dicompyler that will send DICOM data to MatRad for calculation using Octave and Oct2Py.  Getting the Python data into the right Matlab data types for MatRad has been challenging for me, but I'm getting close to a minimal working example.  This would have the advantage of piggybacking off of the effort the MatRad guys have already put in.  However, the disadvantage is that installing Octave would be required.

I've already had to reimplement some of the MatRad functionality in Python due to the limitations of Octave.  It should be possible to port everything in MatRad to Python if desired.  My idea right now is to use MatRad as a back end calculation engine and focus on building a good graphical interface to it in dicompyler.

Steve

Simon Biggs

unread,
Nov 17, 2017, 1:08:02 AM11/17/17
to Python in Medical Physics
Unfortunately for our purposes Voxel Monte Carlo and the MatRad code base isn't the way we want to go.

We're keen on having an easy to understand algorithm that doesn't have too many parameters guiding the show. For us vmc++ doesn't fit the bill. That's why we have decided on convolution methods.

Our treatment planning system (Monaco) uses a Voxel Monte Carlo algorithm and we are keen to have our independent check be a different algorithm. And "simple" is key. Having the algorithm be simple but effective is the aim.

We aren't focused on anything graphical. Our purpose for building a dose calculation tool in python is to have an automated comparison between Monaco, Mosaiq, and Elekta's high resolution machine trf logfiles. Having the comparison be based on calculated dose makes the most sense to me. The aim is to have our final system be entirely automated based on metadata and config files, no GUI by design. It should also produce reports and send email alerts as required.

Simon Biggs

unread,
Nov 17, 2017, 5:10:37 PM11/17/17
to Python in Medical Physics
Steve,

Out of interest, what sort of design choices on my end would help be able to have the calculation engine I build be pluggable into your system?

I imagine for quite a few people it would be nice to be able to use your dicompyler GUI and have the option to swap between MatRad and other calculation engines.

Stephen Terry

unread,
Nov 20, 2017, 3:05:16 PM11/20/17
to python-...@googlegroups.com
I've thought about it a bit, and the answer is that I don't know. :)   I haven't even started to worry about the front end yet, but I'm going into it assuming that it will work by manipulating dicom RT Plan objects.  So the ability to work straight from dicom files with some other parameters given would be ideal.

The pencil beam calculation in MatRad returns a matrix with the dose from each "bixel", which can then be used for optimization.  I was planning on doing any future optimization routines in Python using those results, so something similar would be nice.

Other than that, I'm not sure.  Hopefully it will come more into focus once I start writing the dicompyler plugin.

Steve
 
--

You received this message because you are subscribed to the Google Groups "Python in Medical Physics" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-medphy...@googlegroups.com.
To post to this group, send email to python-...@googlegroups.com.
Visit this group at https://groups.google.com/group/python-medphys.

Simon Biggs

unread,
Nov 20, 2017, 9:06:39 PM11/20/17
to Python in Medical Physics
As much as possible my plan was to have inputs be either standard python objects or numpy arrays. 3D dose grids, or 3D electron density grids work well as numpy arrays. An easy enough tool could be written which imports these base functions and pulls in pydicom to transform dicom files into what is required. That sounds quite reasonable.

Another input/output object I have been considering is xarray:

They have the benefit of aligning associated arrays in their respective dimensions. This might remove a lot of ambiguity.

muta...@gmail.com

unread,
Apr 9, 2018, 11:32:53 AM4/9/18
to Python in Medical Physics
HI All, 

Is this project still on ? I can work to provide kernels from monte carlo simulation.

It would be nice to have a pure python dose calc engine.

Thanks



On Tuesday, January 4, 2011 at 2:01:58 PM UTC-5, Darcy Mason wrote:

Simon Biggs

unread,
Apr 9, 2018, 6:48:05 PM4/9/18
to Python in Medical Physics
It most certainly is. There are two projects ahead of this one on my list. But once they are working within the clinic this will be the next on my list.

If you can provide kernels from Monte Carlo simulations that would be perfect.

I have just now created a repository which we can centre this around:


If you are able to start making pull requests with kernels that will be a great way to boost my productivity to get an initial working prototype. I imagine we might want to fine tune the parameterisation of the kernels at a later date. But whatever you can do now I can build on and it can be used as a good starting point.

Simon Biggs

unread,
Apr 10, 2018, 7:39:52 PM4/10/18
to Python in Medical Physics
I had flagged the following as potentially worth looking in to when we got to the kernel creation stage:

Sangroh Kim

unread,
Apr 10, 2018, 11:07:43 PM4/10/18
to Python in Medical Physics
Simon,

You can start with Rock Mackie's original kernel data which Pinnacle is using in its CCC engine.

Simon Biggs

unread,
May 7, 2018, 10:24:35 PM5/7/18
to Python in Medical Physics
Hi Sangroh,

Thanks for that tip. I shall start there.

Unfortunately initial prototyping will be being done within our private gitlab repository. I do however have permission to invite people to be developers on that repository, so please contact me if you would like to be given access to that repository. The license of the code from the get go will be the same license that https://scriptedforms.com.au uses, (AGPLv3.0+ as well as additional terms from Apache 2.0). As such even though it will be in a private repo you are free to use that code under the license terms. However I do ask, for the time being, to keep the code confidential within your team. The aim will be to make the code publically accessible in due course.

The primary goal of this project initially is to create a python + numpy + scipy + pydicom collapsed cone algorithm in a short period of time. To achieve this within time constraints the scope will initially be significantly limited by the following:
  • Fluence will be not be calculated, fluence instead will be determined using planning system outputs. A dummy fluence package will created that takes RT Dicom files in a defined configuration and converts this to fluence for input into the collapsed cone algorithm.
    • Thin slab placed close to the head of the machine within the TPS calculated at G0 will be used to extract fluence information for that field from the TPS.
    • Of course at a later date a separate package can complete an independent fluence calculation.
  • The algorithm does not need to be fast, no thought to GPU usage will be given, however numpy vectorisation will be used where possible.
  • Dose will be calculated on a generic block phantom. No inhomogeneities will be handled.
    • This does mean strictly that collapsed cone is no longer required, a plain, true to the name, convolution method could be used. However collapsed cone will still be the algorithm used for implementation so that at a later date inhomogeneities can be handled.
  • Code understandability and simplicity is a priority.
So in short, I will beginning work on this this week. I desire collaborators. This will be a freely available open source tool in the future. Please contact me to either get involved as a developer or test user.

Kind regards,
Simon

Sangroh Kim

unread,
May 8, 2018, 12:40:51 AM5/8/18
to python-...@googlegroups.com
Hi Simon,

It seems like that the project will be interesting and fun. Please give me the access to the private gitlab repository.
I am not an expert on Python but I am familiar with the algorithm so I may be helpful for the project.

One question, are you starting from scratch or have some strategic plans on coding the CCC?

Best Regards,
Sangroh

--
You received this message because you are subscribed to the Google Groups "Python in Medical Physics" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-medphys+unsubscribe@googlegroups.com.
To post to this group, send email to python-medphys@googlegroups.com.

T Mutanga

unread,
May 8, 2018, 12:35:00 PM5/8/18
to python-...@googlegroups.com
HI Simon,

It seems interesting and things are looking promising. Please give me access to the repo. I will like to participate with kernel development via monte carlo with GATE; I may need someone to work with. I have a local 40 core cluster setup here. I am just curious, what is the reason for not doing a fully independent dose calc starting from fluence  modelling ? 

Theo




To post to this group, send email to python-...@googlegroups.com.

Simon Biggs

unread,
May 8, 2018, 11:57:15 PM5/8/18
to Python in Medical Physics
Hi Theo and Sangroh,

The plan was to use the paper found at https://link.springer.com/article/10.3938/jkps.61.2073 as a good guide to get going.

The reasoning for not including fluence was to try and get a usable model in the smallest amount of time. In the language of "The Pragmatic Progammer", we want to make a 'Tracer Bullet'. See page 48 of the following pdf:


By having the fluence be an input into the CCC algorithm via another package it will be very easy for someone else, or us at a later stage, to fill in that need.

Cheers,
Simon 
To unsubscribe from this group and stop receiving emails from it, send an email to python-medphy...@googlegroups.com.

To post to this group, send email to python-...@googlegroups.com.
Visit this group at https://groups.google.com/group/python-medphys.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Python in Medical Physics" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-medphy...@googlegroups.com.

Simon Biggs

unread,
May 8, 2018, 11:58:26 PM5/8/18
to Python in Medical Physics
Hi All,

If you would like to be added to the private repository please contact me off list with your GitLab account details.

Cheers,
Simon

Sangroh Kim

unread,
May 9, 2018, 8:45:27 AM5/9/18
to python-...@googlegroups.com
My GitLab account is same as my Gmail account - sangr...@gmail.com

Sangroh

To unsubscribe from this group and stop receiving emails from it, send an email to python-medphys+unsubscribe@googlegroups.com.
To post to this group, send email to python-medphys@googlegroups.com.

Simon Biggs

unread,
May 11, 2018, 12:49:21 AM5/11/18
to Python in Medical Physics
So there are now reference "fluence" and dose files sitting at https://gitlab.com/CCA-Physics/monorepo/tree/master/Applications/not-in-regular-use/collapsed-cone

The aim is to make one look like the other :)

Sangroh Kim

unread,
May 12, 2018, 3:50:26 AM5/12/18
to python-...@googlegroups.com
I don't have a permission to view the website. 

To unsubscribe from this group and stop receiving emails from it, send an email to python-medphys+unsubscribe@googlegroups.com.
To post to this group, send email to python-medphys@googlegroups.com.

Simon Biggs

unread,
May 12, 2018, 6:06:09 PM5/12/18
to Python in Medical Physics
Can you try again now?

Sangroh Kim

unread,
May 14, 2018, 3:52:01 PM5/14/18
to python-...@googlegroups.com
It works now. Thank you!!!

On Sat, May 12, 2018 at 5:06 PM, Simon Biggs <amongt...@gmail.com> wrote:
Can you try again now?

TPhysicist

unread,
Jun 29, 2018, 2:43:54 PM6/29/18
to Python in Medical Physics
Ok guys I am just checking in to see what we need to move forward.

Simon Biggs

unread,
Jun 29, 2018, 7:03:06 PM6/29/18
to Python in Medical Physics
Priorities were shuffled to make way for my accreditation exam. So moving forward has once again been time constrained. Will update when this project is able to be prioritised back to the top for me personally.

Simon Biggs

unread,
Jul 1, 2018, 8:31:25 PM7/1/18
to Python in Medical Physics
I should also highlight that it appears that the raytracing portion of the code may already have an efficient numba implementation in python 3 at the following location:

Sangroh Kim

unread,
Jul 2, 2018, 10:51:06 AM7/2/18
to python-...@googlegroups.com
Great! I talked with Rock (Dr. Thomas R. Mackie) about the convolution kernels a few months ago and he gave me the permission in using his kernels for the study.
So, we don't need to create our own kernels which can save some times.

I will try to find his old convolution kernels and upload them sooner or later.

Sangroh

--

Simon Biggs

unread,
Jul 2, 2018, 5:48:04 PM7/2/18
to Python in Medical Physics
Wonderful!

T Mutanga

unread,
Jul 2, 2018, 8:53:31 PM7/2/18
to python-...@googlegroups.com
Sweet ! I am not sure if I will need any further simulions then.?

On Monday, July 2, 2018, Simon Biggs <amongt...@gmail.com> wrote:
Wonderful!


--
You received this message because you are subscribed to the Google Groups "Python in Medical Physics" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-medphy...@googlegroups.com.
To post to this group, send email to python-...@googlegroups.com.

Sangroh Kim

unread,
Jul 2, 2018, 9:02:38 PM7/2/18
to python-...@googlegroups.com
Hi Theodore,

If we want to make finer resolution convolution kernels for the future, yes, we still need your helps on that.
For the initiation of the study, I think using Dr. Mackie's kernels will be fine.

Best Regards,
Sangroh

On Mon, Jul 2, 2018 at 7:53 PM, T Mutanga <muta...@gmail.com> wrote:
Sweet ! I am not sure if I will need any further simulions then.?


On Monday, July 2, 2018, Simon Biggs <amongt...@gmail.com> wrote:
Wonderful!

--
You received this message because you are subscribed to the Google Groups "Python in Medical Physics" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-medphys+unsubscribe@googlegroups.com.
To post to this group, send email to python-medphys@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python in Medical Physics" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-medphys+unsubscribe@googlegroups.com.
To post to this group, send email to python-medphys@googlegroups.com.

Sangroh Kim

unread,
Jul 3, 2018, 1:16:04 AM7/3/18
to python-...@googlegroups.com
Hi Simon,

Please find the attached file (dsa.zip - dose spray array zip file) in this email.
Please read the conv_kernel.txt file to understand the structure of the kernel format.

Thanks.

Best Regards,
Sangroh 

On Mon, Jul 2, 2018 at 8:02 PM, Sangroh Kim <sangr...@gmail.com> wrote:
Hi Theodore,

If we want to make finer resolution convolution kernels for the future, yes, we still need your helps on that.
For the initiation of the study, I think using Dr. Mackie's kernels will be fine.

Best Regards,
Sangroh
On Mon, Jul 2, 2018 at 7:53 PM, T Mutanga <muta...@gmail.com> wrote:
Sweet ! I am not sure if I will need any further simulions then.?


On Monday, July 2, 2018, Simon Biggs <amongt...@gmail.com> wrote:
Wonderful!

--
You received this message because you are subscribed to the Google Groups "Python in Medical Physics" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-medphys+unsubscribe@googlegroups.com.
To post to this group, send email to python-...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python in Medical Physics" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-medphys+unsubscribe@googlegroups.com.
To post to this group, send email to python-...@googlegroups.com.
dsa.zip

Simon Biggs

unread,
Jul 3, 2018, 10:52:44 PM7/3/18
to Python in Medical Physics
Hi Sangroh,

How best would Dr Mackie like to be acknowledged for the kernels? As in something to write at this location:


Cheers,
Simon

On Tuesday, 3 July 2018 15:16:04 UTC+10, Sangroh Kim wrote:
Hi Simon,

Please find the attached file (dsa.zip - dose spray array zip file) in this email.
Please read the conv_kernel.txt file to understand the structure of the kernel format.

Thanks.

Best Regards,
Sangroh 
On Mon, Jul 2, 2018 at 8:02 PM, Sangroh Kim <sangr...@gmail.com> wrote:
Hi Theodore,

If we want to make finer resolution convolution kernels for the future, yes, we still need your helps on that.
For the initiation of the study, I think using Dr. Mackie's kernels will be fine.

Best Regards,
Sangroh
On Mon, Jul 2, 2018 at 7:53 PM, T Mutanga <muta...@gmail.com> wrote:
Sweet ! I am not sure if I will need any further simulions then.?


On Monday, July 2, 2018, Simon Biggs <amongt...@gmail.com> wrote:
Wonderful!

--
You received this message because you are subscribed to the Google Groups "Python in Medical Physics" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-medphy...@googlegroups.com.

To post to this group, send email to python-...@googlegroups.com.
Visit this group at https://groups.google.com/group/python-medphys.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Python in Medical Physics" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-medphy...@googlegroups.com.

Simon Biggs

unread,
Jul 3, 2018, 10:55:11 PM7/3/18
to Python in Medical Physics
Also Sangroh and Theo,

Would you be able to provide me your details so that I can add you to the contributor team listed at:

Sangroh Kim

unread,
Jul 4, 2018, 8:44:09 AM7/4/18
to python-...@googlegroups.com
I think the acknowledgement looks good to me.

Best Regards,
Sangroh

To unsubscribe from this group and stop receiving emails from it, send an email to python-medphys+unsubscribe@googlegroups.com.
To post to this group, send email to python-medphys@googlegroups.com.

Simon Biggs

unread,
Nov 1, 2018, 8:38:06 PM11/1/18
to Python in Medical Physics
Hi All,

I wanted to give a shoutout to the following repository:


Samuel has made great progress on an open source collapsed cone algorithm. As such, for the time being, all further development will occur under his repository.

Thank you all for all of your help.

Cheers,
Simon

kim...@gmail.com

unread,
May 4, 2019, 12:41:49 PM5/4/19
to Python in Medical Physics
Hi Everyone:

I hope this finds you wherever you are well.  I want to develop a simple Monte Carlo code in python to calculate or simulate the dose distribution in a water phantom and enable me to plot all the beam parameters such as PDD, TMR TPR etc.  Has anyone done this and is willing to share?

I appreciate your help

Sincerely

Honour

Randle Taylor

unread,
May 4, 2019, 5:58:22 PM5/4/19
to python-...@googlegroups.com
Not sure anything like this exists at the moment.  Are you looking to do this as a teaching/learning tool? That would be quite cool!

For quite a while I thought about writing some sort of Python wrapper for EGSnrc/egs++ (or a tool for generating egs++ geometries and egsinp files) but never found/made the time.

Randy



--

Kimal Honour Djam

unread,
May 4, 2019, 6:04:53 PM5/4/19
to python-...@googlegroups.com
This is just for educational purposes. 

Sent from my iPhone

Dominique

unread,
May 5, 2019, 1:37:27 AM5/5/19
to python-...@googlegroups.com
Hello,

There is an project (https://www.primoproject.net/primo/main), but I don’t know if it is written in Python.   But the software is “easy” tu use....   You can even made patients calculations!  The most difficult part is to choose the MC parameters ;-)

Best regards
Dominique Belge

DJAM ACADEMY

unread,
May 5, 2019, 2:22:00 AM5/5/19
to python-...@googlegroups.com
Thanks Dominque:

I am looking for a simple python code for demonstration purposes. I am working on one now but is wondering if someone is working on the same project
   Kimal Honour Djam

*PhD, MSc Physics, MA Educ Admin ( Assessment Specialists). 
  1. Once all village People decided to pray for rain, on the day of prayers all assembled, only one boy came with an umbrella. That' called Confidence.
  1. The road to success is not straight... there is a curve called failure, a loop called confusion, speed bumps called bad friends, red lights called enemies, caution lights called family, u'll have flat tire called jobs. But if u have a spare wheel called determination, an engine called perseverance, insurance called faith & a driver called GOD; u'll make it to a place called SUCCESS
** PHD Senior Student (Candidate) in Applied Physics, Wichita State University

amongt...@gmail.com

unread,
May 5, 2019, 6:10:36 PM5/5/19
to Python in Medical Physics
It's not maintained, but a while ago I made a docker image that installed all of the Geant4 python bindings and then exposed them within a Jupyter Notebook server. See the result:

https://nbviewer.jupyter.org/github/SimonBiggs/ipython-geant4-linac/blob/master/main.ipynb

And here's the instructions:

https://github.com/SimonBiggs/ipython-geant4-linac

I haven't tested to see if it still works today... It'd be pretty amazing if it still works as is 5 years later :)

If you're keen to use it, I might be able to pull the tool into https://pymedphys.com and keep it maintained...

Jack Peng

unread,
Mar 18, 2022, 12:02:53 PM3/18/22
to Python in Medical Physics
Hi all,
        Glad to find a forum with discussions about python dose calculation. Now I'm doing a project with needs open source code to calculate dose from dicom plan which is a 3D field-in-filed plan. Are there any solutions? I see above codes whose doses are not calculated in the body.

Tonio

Simon Biggs

unread,
Feb 2, 2023, 1:01:52 AM2/2/23
to Python in Medical Physics
Hi All,

A crazy idea which I thought someone on here might be interested in seeing if it is plausible. I have been told that Pinnacle is being wound down. Given Philips is no longer in the radiotherapy space, does anyone know someone who might know someone (such as Rock Mackie maybe?) who might be able to ask if Philips might be interested in releasing the entire source code of Pinnacle on GitHub under an Apache License?

It would be an amazing resource to help support use cases like the one being discussed within this thread and could potentially kick-start a whole new radiotherapy open source community.

Kind regards,
Simon

Reply all
Reply to author
Forward
0 new messages