Presentation is loading. Please wait.

Presentation is loading. Please wait.

Multi-Purpose Particle and Heavy Ion Transport code System

Similar presentations


Presentation on theme: "Multi-Purpose Particle and Heavy Ion Transport code System"— Presentation transcript:

1 Multi-Purpose Particle and Heavy Ion Transport code System
PHITS Multi-Purpose Particle and Heavy Ion Transport code System 強度変調放射線治療のシミュレーション 2017年1月改訂 title 1

2 本実習の目標 時間変化を考慮した複数回のPHITSを連続実行することにより、強度変調放射線治療(IMRT; intensity-modulated radiotherapy)のシミュレーションができるようになる。 時間変化するマルチリーフコリメーターを通して 水ファントムにX線を照射した場合の吸収線量分布 Purpose 2

3 実習内容 体系の確認 コリメーターのモデリング 線源の設定 吸収線量の空間分布の評価 Sumtallyによるタリー結果の足しあわせ
スクリプト言語を用いたPHITSの連続実行 強度変調放射線治療シミュレーションにおける線量分布 Table of contents 3

4 IMRT.inp 初期設定の体系 Input file 4 Water phantom Photon 8 MeV 半径5cm幅の
一様なビーム (上流部分を簡略化) 30 cm Collimator 10 cm 20 cm 5 cm Input file 4

5 体系の確認 はじめに、このインプットファイルで構築している3次元体系を描画機能を用いて把握しましょう。
Icntl=8としてPHITSを実行すると2つの[t-track]から2次元平面図がそれぞれ出力され、 icntl=11として実行すると[t-3dshow]の結果が出力されます。 [ T - T r a c k ] title = Track in xyz mesh ・ ・ ・ ・ ・ ・ axis = xz file = track_xz.out axis = yz file = track_yz.out [ T - 3Dshow ] title = Geometry check using [T-3dshow] file = 3dshow.out ・ ・ ・ ・ ・ ・ Geometry 5

6 体系の確認 水ファントム track_xz.eps コリメーター 3dshow.eps Geometry 6

7 実習内容 体系の確認 コリメーターのモデリング 線源の設定 吸収線量の空間分布の評価 Sumtallyによるタリー結果の足しあわせ
スクリプト言語を用いたPHITSの連続実行 強度変調放射線治療シミュレーションにおける線量分布 Table of contents 7

8 課題1 サイズを変えたドーナツ型のコリメーターをz=-78~-70cmの位置に追加してみましょう。 Geometry 8 IMRT.inp
[ C e l l ] ・ ・ ・ ・ ・ ・ [ S u r f a c e ] pz pz cz cz 8 cm コピーしてコリメーターを追加 *円柱の厚さや内半径、外半径がどの数字と対応するのかを考える track_xz.eps Geometry 8

9 課題1の答え合わせ サイズを変えたドーナツ型のコリメーターをz=-78~-70cmの位置に追加してみましょう。 Geometry 9
IMRT.inp 10 cm 30 cm [ C e l l ] ・ ・ ・ ・ ・ ・ [ S u r f a c e ] pz pz cz cz pz pz cz cz track_xz.eps Geometry 9

10 課題2 マルチリーフコリメーターをz=-60cmの位置に追加してみましょう。 Geometry 10
/MultiLeafCollimator/フォルダにあるスクリプトPHITS-IMRTを使って、マルチリーフコリメーターに関するファイルを作成する。( [Windows] step.txtをPHITS-IMRT.batドラッグ&ドロップ。[Mac]PHITS-IMRT_mac.commandをダブルクリックし”step.txt”を入力。) 作成されたCell.inp, RemovedCell.inp, Surfacex1.inp, Surfacex9.inpをIMRT.inpのあるフォルダにコピーする。 IMRT.inpにある5つのinflを有効にし、 Cell.inp, RemovedCell.inp, Surfacex1.inp, Surfacey.inp, Surfacez.inpを読み込む。 Geometry 10

11 Cell.inp, RemovedCell.inp, Surfacex1(y,z).inp:
治療計画装置により得られたある状態にあるマルチリーフコリメーターの情報(step.txt)を基にPHITS形式に変換したデータファイル Surfacex1(y,z).inp Cell.inp 1001 px -3.00*(-1)*c1-c2 2001 px -3.00*(-1)*c1 ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ 3000 py c3+c4*0 3001 py c3+c4*1 ・ ・ ・ ・ ・ ・ 追加したセルを空気の領域(セル番号998)より取り除くため 4001 pz c6 4002 pz c6+c2 RemovedCell.inp 変数c1~c6 #1001 #1002 #1003 ・ ・ ・ ・ ・ ・ set: c1[50/100] $ Scaling factor set: c2[10] $ width of leaves [cm] set: c4[0.25] $ thickness of leaves [cm] set: c5[120] $ Number of leaves set: c3[-c4*c5/4] $ y-coordinate of the first leaf [cm] set: c6[-65] $ z-coordinate of multi-leaf collimator Geometry 11

12 課題2の答え合わせ マルチリーフコリメーターをz=-60cmの位置に追加してみましょう。 Geometry 12 IMRT.inp
file = IMRT.inp ・ ・ ・ ・ ・ ・ [ C e l l ] e #1 #11 #12 infl: {RemovedCell.inp} infl: {cell.inp} [ S u r f a c e ] ・ ・ ・ ・ ・ ・ cz cz set: c1[50/100] $ Scaling factor set: c2[10] $ width of leaves [cm] set: c4[0.25] $ thickness of leaves [cm] set: c5[120] $ Number of leaves set: c3[-c4*c5/4] $ y-coordinate of the first leaf [cm] set: c6[-65] $ z-coordinate of multi-leaf collimator infl: {surfacex1.inp} infl: {surfacey.inp} infl: {surface.zinp} Geometry 12

13 課題2の答え合わせ マルチリーフコリメーターをz=-60cmの位置に追加してみましょう。 track_xz.eps Geometry 13

14 課題3 マルチリーフコリメーターの状態をxy断面図で見てみましょう。
axis=xzの[t-track]をコピー&ペーストして、axis=xyの[t-track]を追加する xとyの範囲を-10cmから+10cmとし、nxとnyは100とする zの範囲は-65cmから-60cmとし、nzは1とする ファイル名をtrack_xy-1.outに変更 この位置の断面図 Geometry 14

15 課題3の答え合わせ マルチリーフコリメーターの状態をxy断面図で見てみましょう。 Geometry 15 IMRT.inp
[ T - T r a c k ] title = Track in xyz mesh mesh = xyz x-type = 2 xmin = xmax = nx = 100 y-type = 2 ymin = ymax = ny = z-type = 2 zmin = zmax = nz = 1 ・ ・ ・ ・ ・ ・ axis = xy file = track_xy-1.out track_xy.eps Geometry 15

16 実習内容 体系の確認 コリメーターのモデリング 線源の設定 吸収線量の空間分布の評価 Sumtallyによるタリー結果の足しあわせ
スクリプト言語を用いたPHITSの連続実行 強度変調放射線治療シミュレーションにおける線量分布 Table of contents 16

17 課題4 エネルギー分布をもつ線源を設定してみましょう。 [source]セクションにおいてs-typeを4に変更 e0の行をコメントアウト
e-type = 1とし、ne = 28とする その下の行にinflコマンドを用いてspectrum.inpを読み込む icntl=0として輸送計算を実行 スペクトル(spectrum.inp) Source 17

18 課題4の答え合わせ エネルギー分布をもつ線源を設定してみましょう。 Source 18 IMRT.inp
s-type = 4 proj = photon $ e0 = 8.0 r0 = 5.00 x0 = 0.0 y0 = 0.0 z0 = z1 = dir = 1.0 e-type = 1 ne = 28 infl:{spectrum.inp} track_xz.eps(2ページ目) Source 18

19 実習内容 体系の確認 コリメーターのモデリング 線源の設定 吸収線量の空間分布の評価 Sumtallyによるタリー結果の足しあわせ
スクリプト言語を用いたPHITSの連続実行 強度変調放射線治療シミュレーションにおける線量分布 Table of contents 19

20 課題5 [t-deposit]を用いて水ファントムの表面付近における吸収線量を調べてみましょう
IMRT.inp axis=xyの[t-track]セクションをコピー&ペーストし、セクション名を[t-deposit]とする。 xとyの範囲はそのままで、nxとnyは60とする。 zの範囲は-15cmから0cmとし、nzは1とする。 e-typeサブセクションはコメントアウト。 fileはdeposit_xy-1.outとする。 partはallに変更する。 [ T - T r a c k ] ・ ・ ・ ・ ・ ・ nx = 100 y-type = 2 ymin = ymax = ny = 100 z-type = 2 zmin = zmax = nz = e-type = 1 ne = 1 unit = 1 axis = xy file = track_xy-1.out part = electron ・ ・ ・ この領域を タリーする Dose distribution 20

21 課題5の答え合わせ [t-deposit]を用いて水ファントムの表面付近における吸収線量を調べてみましょう
IMRT.inp [ T - deposit ] ・ ・ ・ ・ ・ ・ nx = 60 y-type = 2 ymin = ymax = ny = 60 z-type = 2 zmin = zmax = 0.0 nz = $ e-type = 1 $ ne = 1 $ unit = 1 axis = xy file = deposit_xy-1.out part = all コリメーターの隙間と対応している deposit_xy-1.eps Dose distribution 21

22 課題6 マルチリーフコリメーターが別の状態にある場合の吸収線量を調べてみましょう
[surface]セクションでinflしているsurfacex1.inpをsurfacex9.inpに変更 axis=xyとしている[t-track]のfileをtrack_xy-9.outに変更 axis=xyとしている[t-deposit]のfileをdeposit_xy-9.outに変更 まずはicntl=8としてtrack_xy-9.epsを見てマルチリーフコリメーターの形状を確認し、次にicntl=0としてdeposit_xy-9.epsの吸収線量の分布を調べる Dose distribution 22

23 課題6の答え合わせ マルチリーフコリメーターが別の状態にある場合の吸収線量を調べてみましょう Dose distribution 23
IMRT.inp track_xy-9.eps [ S u r f a c e ] ・ ・ ・ ・ ・ ・ infl: {surfacex9.inp} infl: {surfacey.inp} infl: {surface.zinp} [ T - T r a c k ] axis = xy file = track_xy-9.out [ T - deposit ] file = deposit_xy-9.out part = all deposit_xy-9.eps コリメーターの隙間と対応している Dose distribution 23

24 実習内容 体系の確認 コリメーターのモデリング 線源の設定 吸収線量の空間分布の評価 Sumtallyによるタリー結果の足しあわせ
スクリプト言語を用いたPHITSの連続実行 強度変調放射線治療シミュレーションにおける線量分布 Table of contents 24

25 課題7 Sumtally機能を使って、2つのマルチリーフコリメーターの結果を足しあわせましょう
[t-deposit]の最後でsumtally.inpをinflコマンドを用いることでsumtally subsectionを設定する [parameters]セクションにおいてicntlを13とする Sumtally.inp sumtally start isumtally = 2 nfile = 2 deposit_xy-1.out 3.0 deposit_xy-9.out 1.0 sfile = result.out sumfactor = 1.0 sumtally end 足し合わせるファイル数 Sumtally subsectionの始まりと終わり 足し合わせるファイル名と重み付けの値 足し合わせた結果のファイル名 規格化定数 sumtally 25

26 課題7の答え合わせ Sumtally機能を使って、2つのマルチリーフコリメーターの結果を足しあわせましょう sumtally 26
IMRT.inp [ P a r a m e t e r s ] icntl = ・ ・ ・ ・ ・ ・ [ T - deposit ] axis = xy file = deposit_xy-9.out part = all gshow = 1 epsout = 1 infl: {sumtally.inp} result.eps Surfacex1.inpとSurfacex9.inpの結果が3:1で足しあわせられている sumtally 26

27 実習内容 体系の確認 コリメーターのモデリング 線源の設定 吸収線量の空間分布の評価 Sumtallyによるタリー結果の足しあわせ
スクリプト言語を用いたPHITSの連続実行 強度変調放射線治療シミュレーションにおける線量分布 Table of contents 27

28 課題8 スクリプト言語によるプログラムautorun.batを用いて、複数回PHITSを実行しましょう
PHITSで計算した結果をコピーするためにoutputという名前のフォルダを作成する [surface]セクションでinflしているsurfacex9.inpをsurfacex.inpに変更 axis=xyとしている[t-deposit]のfileをdeposit_xy.outに変更 icntlを0に戻す autrun.batを実行 (Windowsの場合)autrun.batをダブルクリック (Macの場合) autorun_mac.commandをダブルクリック Auto-run program 28

29 autrun.bat (autorun_mac.command):
フォルダ”MultiLeafCollimator”にあるsurfacex***.inpをコピー その情報を用いてPHITSを実行 PHITSの計算終了後、出力ファイルであるphits.outとdeposit_xy.outをフォルダ”output”に移動 autorun.bat @echo off SET PHITSEXE=“C:\phits\bin\phits274_win.exe" SET OUTDIR="output" copy MultiLeafCollimator\cell.inp . copy MultiLeafCollimator\sumtally.inp . copy MultiLeafCollimator\RemovedCell.inp . for /l %%i in (1, 1, 9) do ( For文の中は→ ) pause exit echo Calculating %%i ... copy MultiLeafCollimator\surfacex%%i.inp surfacex.inp %PHITSEXE% < IMRT.inp move phits.out %OUTDIR%\phits-%%i.out move deposit_xy.out %OUTDIR%\deposit_xy-%%i.out move deposit_xy_err.out %OUTDIR%\deposit_xy-%%i_err.out 初期値1、変化量1として、9まで変数%%iの数字を変えながら動作する Auto-run program 29

30 課題8の答え合わせ スクリプト言語によるプログラムautorun.batを用いて、複数回PHITSを実行しましょう
Outputフォルダ内 deposit_xy-1.out deposit_xy-1_err.out deposit_xy-2.out deposit_xy-2_err.out deposit_xy-3.out ・ ・ ・ ・ ・ ・ deposit_xy-9_err.out phits-1.out phits-2.out phits-3.out phits-4.out phits-5.out phits-9.out 9個のdeposit_xy.outとdeposit_xy_err.out、phits.outが出力されていればOK もし時間が掛かるようであれば、IMRT.inpのmaxcasを100にして実行してみてください Auto-run program 30

31 実習内容 体系の確認 コリメーターのモデリング 線源の設定 吸収線量の空間分布の評価 Sumtallyによるタリー結果の足しあわせ
スクリプト言語を用いたPHITSの連続実行 強度変調放射線治療シミュレーションにおける線量分布 Table of contents 31

32 課題9 Sumtally機能を使って、autorun.batにより得られた複数のタリー結果を加重平均により足し合わせましょう
[parameters]セクションにおいてicntlを13とする sumtally.inpが更新されているのを確認する Sumtally.inp sumtally start isumtally = 2 nfile = 9 output/deposit_xy-1.out output/deposit_xy-2.out output/deposit_xy-3.out ・ ・ ・ ・ ・ ・ output/deposit_xy-9.out sfile = result.out sumfactor = 1.0 sumtally end sumtally 32

33 課題9の答え合わせ Sumtally機能を使って、autorun.batにより得られた複数のタリー結果を加重平均により足し合わせましょう
Sumtally.inp sumtally start isumtally = 2 nfile = 9 output/deposit_xy-1.out output/deposit_xy-2.out output/deposit_xy-3.out ・ ・ ・ ・ ・ ・ output/deposit_xy-9.out sfile = result.out sumfactor = 1.0 sumtally end これらの重み付けで 各マルチリーフコリメーターの計算結果が足しあわせられている result.eps sumtally 33

34 まとめ マルチリーフコリメーターをモデリングし、時間変化により様々な形状をとった場合の計算ができるようになった。
Sumtally機能を用いて複数のタリー結果を足し合わせることにより、強度変調放射線治療を模擬した吸収線量の空間分布を求めた。 スクリプト言語を用いて、複数回のPHITS計算を実行した。 《休憩はさむ》 まとめ Summary 34


Download ppt "Multi-Purpose Particle and Heavy Ion Transport code System"

Similar presentations


Ads by Google