Group Abstract Group Abstract

Message Boards Message Boards

Simulating brain tumor growth with diffusion-growth model

POSTED BY: Marco Thiel
10 Replies

enter image description here -- you have earned Featured Contributor Badge enter image description here Your exceptional post has been selected for our editorial column Staff Picks http://wolfr.am/StaffPicks and Your Profile is now distinguished by a Featured Contributor Badge and is displayed on the Featured Contributor Board. Thank you!

POSTED BY: EDITORIAL BOARD

Hi Marco, thank you for this excellent presentation. It has really helped me. I just need further explanation on the roles of the first two equations (of diffusion growth model) in this analysis and the final animation. I like to modify this equation slightly using the same image and hence, I need to be sure I am running the code in the correct context. Thank you.

POSTED BY: Dean Ezekiel
POSTED BY: Marco Thiel

Hello Marco,

thank you for your - as usual - very interesting post! I will study your code in detail.

For now just a minor remark: The slices you are showing are not from a CT but from a MRT (T1 contrast). In CT images one can not distinguish between white and gray matter.

Cheers, Henrik

POSTED BY: Henrik Schachner
Attachments:

Sorry for my late reply. I have not had time yet to try this. In the post I basically use the fact that the background is black and therefore blocks the diffusion. I will try to find out how to put this in with the boundary conditions. I have done that on another example so I hope that this is quite possible.

Cheers,

Marco

POSTED BY: Marco Thiel

Dear Jos,

I have just had a look at your code. As I suspected you are trying to use the ImplicitRegion function, which is very powerful and useful, but only works in Mathematica 10 - or in the Cloud.

I have tried your code on Mathematica 10 and it works just fine. It is also much quicker than the Mathematica 9 code. You should have access to the free version of the Wolfram Programming Cloud. If you want you can give it a try and run your code there. It should work.

Best wishes, Marco

POSTED BY: Marco Thiel

Dera Marco,

Thanks for your help. Yes, I will try the code in Wolfram Programming Cloud and when installed next month or in September the new Mathematica 10 version. Best Regards, Jos

POSTED BY: Jos Klaps

Dear Jos,

You are right that the code that I posted uses Mathematica 10 specific commands.

I will have a look at your code. But for the time being, I rewrote the code so that it runs in Mathematica 9 as well. You cannot run the region functions etc. You still need the img2 and img3 images, and then you execute:

sols = Quiet[
  NDSolve[{Div[
       1./500.*(diffcoeff[798.*x, 654*y])^4*
        Grad[u[t, x, y], {x, y}], {x, y}] - D[u[t, x, y], t] + 
      0.025*u[t, x, y] == 0, 
    u[0, x, y] == Exp[-1000. ((x - 0.6)^2 + (y - 0.6)^2)], 
    u[t, 0, y] == 0, u[t, 1, y] == 0, u[t, x, 0] == 0, 
    u[t, x, 1] == 0}, u[t, x, y], {t, 0, 20}, {x, 0, 1}, {y, 0, 1}]]

Plotting works like this:

ImageCompose[img3, {ContourPlot[
   u[t, x, y] /. sols /. t -> 8, {y, 0, 1}, {x, 0, 1}, 
   PlotRange -> {{0, 1}, {0, 1}, {0.01, All}}, PlotPoints -> 100, 
   Contours -> 200, ContourLines -> False, AspectRatio -> 798./654., 
   ColorFunction -> "Temperature"], 0.6}]

Please do refer to the attached notebook as well. Interestingly, I noted a couple of things:

1) The evaluation takes much (!) longer in Mathematica 9. So when you execute the attached notebook you might want to have a cup of tea. 2) I think that I ran the simulation with the same parameters, but the shape of the tumor is slightly different. This might be because of the different integration schemes. So if you want to use this, you need to investigate it. All comments are very welcome.

Here's the frame that corresponds to the one I put up in the original post.

enter image description here

Obviously, the edges are a bit different. The edges correspond to relatively low concentrations however. Also, looking at the frame that describe the progression, everything seems to look a bit different:

enter image description here

Just for the sake of completeness, here is the animation.

enter image description here

I hope that this helps, Marco

Attachments:
POSTED BY: Marco Thiel

Hi Marco, I'm very interesting in this kind of medical problems as brain canser, brain waves, EEG signal processing, etc. I tried to copy and studied your code but it seem not to work on my computer (Mathematica 9). Attached you will find a copy of my code which is based on your input. Please can you let me know what is wrong in my code. Your support will be highly appreciated! Jos

Attachments:
POSTED BY: Jos Klaps
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard