*talairachの座標からinflated上のvertex番号を探す

MNEでvertex番号でadd_fociとかmne.grow_labelsとか作業ができますが、talairachとかの座標からvertexの番号への対応がパッと見わからなかったので、その記述

流れ

    • tksurferでコマンドを走らせます

    • 端末上に表示されるvertex noを読み取ります

    • tksurferでvertex noを入力してそれっぽい結果になることを確認します.

もう少し詳しい記述

1. tksurferでコマンドを走らせます

参照: TkSurferGuide-TkSurferScripting-TkSurferIntroToScripting

# my_script.tclはカレントディレクトリにあるファイル名としてつけます. tksurfer fsaverage rh inflated -tcl my_script.tcl

my_script.tclの中身は以下のようになります.1行で十分のようです.

参照:TkSurferGuide-TkSurferScripting-TkSurferScriptingReference#Commands

print_nearest_vertex_to_talairach_point 38 -78 -12

説明: 38, -78,-12がtalairachのxyz(RAS)になります.上記座標は右OFA付近を参考に示しています.

2. 端末上に表示されるvertex noを読み取ります

[me@mypc]$ tksurfer fsaverage rh inflated -tcl sample.tcl subject is fsaverage hemi is rh surface is inflated surfer: current subjects dir: /subjects_dir surfer: not in "scripts" dir ==> using cwd for session root surfer: session root data dir ($session) set to: surfer: /subjects_dir/fsaverage/mri checking for nofix files in 'inflated' Reading image info (/subjects_dir/fsaverage) Reading /subjects_dir/fsaverage/mri/orig.mgz surfer: Reading header info from /subjects_dir/fsaverage/mri/orig.mgz surfer: vertices=163842, faces=327680 surfer: single buffered window surfer: tkoInitWindow(fsaverage) surfer: using interface /opt/freesurfer/tktools/tksurfer.tcl Reading /opt/freesurfer/tktools/tkm_common.tcl Reading /opt/freesurfer/tktools/tkm_wrappers.tcl Reading /opt/freesurfer/lib/tcl/fsgdfPlot.tcl Reading /opt/freesurfer/tktools/tkUtils.tcl Successfully parsed tksurfer.tcl reading white matter vertex locations... tksurfer: run tcl script: sample.tcl surfer: vertex 36000

上記のような調子でメッセージが出てきて最後付近の行でvertex 36000という風にvertex noが取得できます.

3. tksurferでvertex noを入力してそれっぽい結果になることを確認します.

step 2でtksurferが開きますので、そこでCursorのVertex Indexに先ほど得られた番号(ここでは36000)を入力します.

tksurfer

Enterキーを押すと画面に青い点で示されるようにvertex noに対応する点が表示されます.大まかに期待する場所にあるかわかります.

Vertex RASはおそらくvertexの座標(talarirach?)ということになると思います. 下のVertex Talairachはちと離れた座標を示してますが、こちらの方が正しいのでしょうか...

またわかることが増えたら追記します.