e0404 / matRad

An open source multi-modality radiation treatment planning sytem developed by e0404 @ DKFZ
http://www.matRad.org
Other
224 stars 176 forks source link

resultGUI.w to dij #713

Open Mariam950-wp opened 6 months ago

Mariam950-wp commented 6 months ago

Dear friends,

As it is mentioned in matRad documentation dij variable includes information about number of each bixel in each Ray in a beam.

But, weights created after optimization is stored in resultGui.w. how can I reconstruct one to one mapping from weights to bixel ID?

I did some such kind of mapping so that firsk element in resultGui.w corresponds to a first element in dij.bixelnumber, but the issue is that low energetic bixel has higher intensity (like it is shown on picture) and it not logical.

Thanks, Mariam Screenshot from 2024-04-30 17-46-58

wahln commented 6 months ago

Your mapping seems correct, and I don't agree that this is not "logical". matRad does not use an analytic SOBP-Formula to determine weights, which would give you monotonic increasing weights, but performs full IMPT optimization. Thus, there is no "strict" rule that the weights should increase. However, you still see the trend that intensities increase towards higher energies (if the last value is the weight).

Mariam950-wp commented 6 months ago

Thanks Niklas,

I have one question about ct data in mat files. does it contain HU units or stopping powers? in case of matrad default TG119 file.

I guess this 3D matrix includes stopping powers


From: Niklas Wahl @.> Sent: 03 May 2024 18:31 To: e0404/matRad @.> Cc: Mariam Abuladze @.>; Author @.> Subject: Re: [e0404/matRad] resultGUI.w to dij (Issue #713)

Your mapping seems correct, and I don't agree that this is not "logical". matRad does not use an analytic SOBP-Formula to determine weights, which would give you monotonic increasing weights, but performs full IMPT optimization. Thus, there is no "strict" rule that the weights should increase. However, you still see the trend that intensities increase towards higher energies (if the last value is the weight).

— Reply to this email directly, view it on GitHubhttps://github.com/e0404/matRad/issues/713#issuecomment-2093140304, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASBXGRH75GAHQOT3MSQUF53ZAONSRAVCNFSM6AAAAABHAKEST2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJTGE2DAMZQGQ. You are receiving this because you authored the thread.Message ID: @.***>

Mariam950-wp commented 6 months ago

Sorry, I already got an answer for previous question,

file consists ct cube and HU cube too.

But There is now way how to guess with which materials dies voxel consist of. Is there any way to guess it? As I need it to simulate phantom in Geant4.

Thanks, Mariam


From: Mariam Abuladze @.> Sent: 04 May 2024 00:04 To: e0404/matRad @.> Subject: Re: [e0404/matRad] resultGUI.w to dij (Issue #713)

Thanks Niklas,

I have one question about ct data in mat files. does it contain HU units or stopping powers? in case of matrad default TG119 file.

I guess this 3D matrix includes stopping powers


From: Niklas Wahl @.> Sent: 03 May 2024 18:31 To: e0404/matRad @.> Cc: Mariam Abuladze @.>; Author @.> Subject: Re: [e0404/matRad] resultGUI.w to dij (Issue #713)

Your mapping seems correct, and I don't agree that this is not "logical". matRad does not use an analytic SOBP-Formula to determine weights, which would give you monotonic increasing weights, but performs full IMPT optimization. Thus, there is no "strict" rule that the weights should increase. However, you still see the trend that intensities increase towards higher energies (if the last value is the weight).

— Reply to this email directly, view it on GitHubhttps://github.com/e0404/matRad/issues/713#issuecomment-2093140304, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASBXGRH75GAHQOT3MSQUF53ZAONSRAVCNFSM6AAAAABHAKEST2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJTGE2DAMZQGQ. You are receiving this because you authored the thread.Message ID: @.***>

wahln commented 6 months ago

matRad has no builtin function to do that, only for HU -> rSP / rED lookup. You should look into Schneider et al (2000) to figure out how to do it. When we forward to Monte Carlo codes like MCsquare or TOPAS, we rely on such conversion schemes provided by those codes (or do water-equivalent simulations).

Mariam950-wp commented 6 months ago

Dear Niklas,

Thanks for your answers.

Although there are some issues still. as it is visible on screeshot, HU units of TG119 are mostly close to -1000 which is considered to be air. but proton energies in optimized beams in matRad are between 80 and 110 MeV, so according to Geant4 simulations proton with these energies can not be stopped in air Phantom of this size, as the densities of voxels are close to 0.026 according to octave.

Is there something wrong with matRad simulations? Or I might have a mistake.

Thanks so much, Mariam Abuladze


From: Niklas Wahl @.> Sent: 05 May 2024 04:01 To: e0404/matRad @.> Cc: Mariam Abuladze @.>; Author @.> Subject: Re: [e0404/matRad] resultGUI.w to dij (Issue #713)

matRad has no builtin function to do that, only for HU -> rSP / rED lookup. You should look into Schneider et al (2000)https://doi.org/10.1088/0031-9155/45/2/314 to figure out how to do it. When we forward to Monte Carlo codes like MCsquare or TOPAS, we rely on such conversion schemes provided by those codes (or do water-equivalent simulations).

— Reply to this email directly, view it on GitHubhttps://github.com/e0404/matRad/issues/713#issuecomment-2094505695, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASBXGREVF3XQMALO62MLOY3ZAVZHHAVCNFSM6AAAAABHAKEST2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJUGUYDKNRZGU. You are receiving this because you authored the thread.Message ID: @.***>

wahln commented 6 months ago

The TG119 phantom image includes a lot of air (which is at ~-1000), but the water phantom itself has consistently values a bit higher than 0 (between 0-30 HU). This command, for example, shows the distribution of HU in the "body" contour (i.e. the outer phantom contour):

figure; hist(ct.cubeHU{1}(cst{3,4}{1}))

image

So I don't really understand how you end up with TG119 having mostly air?

github-actions[bot] commented 4 months ago

This issue was automatically marked as stale because it has been sitting there for 14 days without activity. It will be closed in 14 days if no further activity occurs.