Hi, I'm writing a script to make manual editing a bit more convenient, and want to call tksurfer and tkmedit with all the parameters of csurf's "Edit Segmentation" option, and using T1 as the aux volume. Right now, I have:
tksurfer $s $h inflated &
tkmedit $s wm $h.orig -aux T1
However, I'm not sure how to make the curvature load automatically. Is there a flag I can add for that? Also, is there anything else that should be added/changed?
Thanks,
-Aaron-
Aaron L. Goldman
Post-Bacc IRTA
Genes, Cognition and Psychosis Program, NIMH
Building 10, Room 3C108
Phone: (301) 435-0944
Email: mailto:aarong@mail.nih.gov aarong@mail.nih.gov
On Wed, 12 Jan 2005, Goldman, Aaron (NIH/NIMH) shaped the electrons to say:
Hi, I'm writing a script to make manual editing a bit more convenient, and want to call tksurfer and tkmedit with all the parameters of csurf's "Edit Segmentation" option, and using T1 as the aux volume. Right now, I have:
tksurfer $s $h inflated & tkmedit $s wm $h.orig -aux T1
However, I'm not sure how to make the curvature load automatically. Is there a flag I can add for that?
You can script tksurfer by putting tcl commands in a file and then invoking it with "tksurfer [args] -tcl myscript.tcl". To load the curvature (say lh.curv) in tksurfer, you'd put these commands in myscript.tcl:
set curv lh.curv; read_binary_curv
hope that helps! -Brendan
you can do a lot more than that with a -tcl flag, but here is what one would need to look like for loading curvature (binary):
read_binary_curv
i've included some info you can use to load tkmedit with both volumes (wm and T1) and both surfaces (rh and lh). also, it will load the talairach and display it in 3 views, and then unload it. it's ready to edit voxels, and set to display edited voxels. you may want to turn that off as it slows things down. it will also open the brightness/contrast window and edit volume brush window. for tksurfer, it turns the brightness up (and i added the line to load the curvature as well).
setenv SUBJECT_NAME $s tksurfer $s rh inflated -tcl editsurf.tcl & tksurfer $s lh inflated -tcl editsurf.tcl & tkmedit $s wm lh.orig -aux T1 -tcl edit.tcl
****editsurf.tcl open_window do_lighting_model 0.4 0.0 0.6 0.2 0.7 make_lateral_view read_binary_curv redraw
****edit.tcl LoadMainSurface 1 $env(SUBJECTS_DIR)/$env(SUBJECT_NAME)/surf/rh.orig SetTool 2 SetZoomLevel 1 SetBrushShape 1 1 0 SetDisplayFlag $gnFlagIndex(flag_UndoVolume) 1 LoadVolumeDisplayTransform 0 $env(SUBJECTS_DIR)/$env(SUBJECT_NAME)/mri/transforms/talairach.xfm RedrawScreen set systemTime [clock seconds] while {[expr $systemTime+2] > [clock seconds]} {set foo 0} SetOrientation 2 RedrawScreen set systemTime [clock seconds] while {[expr $systemTime+2] > [clock seconds]} {set foo 0} SetOrientation 1 RedrawScreen set systemTime [clock seconds] while {[expr $systemTime+2] > [clock seconds]} {set foo 0} SetOrientation 0 SetZoomLevel 2 UnloadVolumeDisplayTransform 0 DoVolumeColorScaleInfoDlog DoBrushInfoDlog set gbDisplayFlag(flag_OriginalSurface) 0 SendDisplayFlagValue flag_OriginalSurface
-- brian t. quinn
On Wed, 12 Jan 2005, Goldman, Aaron (NIH/NIMH) wrote:
Hi, I'm writing a script to make manual editing a bit more convenient, and want to call tksurfer and tkmedit with all the parameters of csurf's "Edit Segmentation" option, and using T1 as the aux volume. Right now, I have:
tksurfer $s $h inflated &
tkmedit $s wm $h.orig -aux T1
However, I'm not sure how to make the curvature load automatically. Is there a flag I can add for that? Also, is there anything else that should be added/changed?
Thanks,
-Aaron-
Aaron L. Goldman
Post-Bacc IRTA
Genes, Cognition and Psychosis Program, NIMH
Building 10, Room 3C108
Phone: (301) 435-0944
Email: mailto:aarong@mail.nih.gov aarong@mail.nih.gov
freesurfer@nmr.mgh.harvard.edu