Hello: FS experts:
I am now integrating to use tksurfer to take snapshot from command line automatically, and my command is like this:
```
cmd = "tksurfer %s %s inflated -tcl %s" % (subject, hemi, os.path.join(os.path.dirname(sys.argv[0]), "snap_tksurfer.tcl"))
```
so i use -tcl to define the behavior of tksurfer, but I go t a bug inside the tickle script,
##curv puts "shitaaaaa" puts stdout [pwd] puts stdout $env(SUBJECT_NAME) puts [trace vinfo lablpth] read_binary_curv puts "shittttttttt!!!, has bug here"
I debug it and found that it can not really run this command: read_binary_curv, before, it can take some snapshots and save it to be rgb format, and i will also give you the output from the terminal:
Successfully parsed tksurfer.tcl shitaaaaa /Users/junhao.wen/Hao/Dataset/test-data/recon-alled-result-1sub/analysis-series-default/subjects/analysis-series-default/subjects/sub-PREVDEMALS0010001BE/ses-M0/t1/freesurfer-cross-sectional sub-PREVDEMALS0010001BE_ses-M0
subject is sub-PREVDEMALS0010001BE_ses-M0 hemi is lh surface is inflated surfer: current subjects dir: /Users/junhao.wen/Hao/Dataset/test-data/recon-alled-result-1sub/analysis-series-default/subjects/analysis-series-default/subjects/sub-PREVDEMALS0010001BE/ses-M0/t1/freesurfer-cross-sectional surfer: not in "scripts" dir ==> using cwd for session root surfer: session root data dir ($session) set to: surfer: /Users/junhao.wen/Hao/Dataset/test-data/recon-alled-result-1sub/analysis-series-default/subjects/analysis-series-default/subjects/sub-PREVDEMALS0010001BE/ses-M0/t1/freesurfer-cross-sectional checking for nofix files in 'inflated' Reading image info (/Users/junhao.wen/Hao/Dataset/test-data/recon-alled-result-1sub/analysis-series-default/subjects/analysis-series-default/subjects/sub-PREVDEMALS0010001BE/ses-M0/t1/freesurfer-cross-sectional/sub-PREVDEMALS0010001BE_ses-M0) Reading /Users/junhao.wen/Hao/Dataset/test-data/recon-alled-result-1sub/analysis-series-default/subjects/analysis-series-default/subjects/sub-PREVDEMALS0010001BE/ses-M0/t1/freesurfer-cross-sectional/sub-PREVDEMALS0010001BE_ses-M0/mri/orig.mgz surfer: Reading header info from /Users/junhao.wen/Hao/Dataset/test-data/recon-alled-result-1sub/analysis-series-default/subjects/analysis-series-default/subjects/sub-PREVDEMALS0010001BE/ses-M0/t1/freesurfer-cross-sectional/sub-PREVDEMALS0010001BE_ses-M0/mri/orig.mgz surfer: vertices=98465, faces=196926 surfer: single buffered window surfer: tkoInitWindow(sub-PREVDEMALS0010001BE_ses-M0) setting percentile thresholds (-1.00, 0.00, 0.00) surfer: using interface /Applications/freesurfer/tktools/tksurfer.tcl tksurfer: run tcl script: /Users/junhao.wen/Hao/Project/clinica_realted/CAPS_qa_clinica/snap_tksurfer.tcl Reading /Applications/freesurfer/tktools/tkm_common.tcl Reading /Applications/freesurfer/tktools/tkm_wrappers.tcl Reading /Applications/freesurfer/lib/tcl/fsgdfPlot.tcl Reading /Applications/freesurfer/tktools/tkUtils.tcl Successfully parsed tksurfer.tcl reading white matter vertex locations...
I will also attach you the tcl file, any suggestion will be appreciated:)
PS: I know that FS right now recommand us to use freeview, do you have the similar behavior like using tcl file to define the behavior of freeview to take the snapshots???
Good day Hao
Hello:
Anyone can help me?
________________________________ De : Hao wen Envoyé : dimanche 5 février 2017 10:28 À : freesurfer@nmr.mgh.harvard.edu Objet : Problem with using tksurfer to take snap shot with .tcl
Hello: FS experts:
I am now integrating to use tksurfer to take snapshot from command line automatically, and my command is like this:
```
cmd = "tksurfer %s %s inflated -tcl %s" % (subject, hemi, os.path.join(os.path.dirname(sys.argv[0]), "snap_tksurfer.tcl"))
```
so i use -tcl to define the behavior of tksurfer, but I go t a bug inside the tickle script,
##curv puts "shitaaaaa" puts stdout [pwd] puts stdout $env(SUBJECT_NAME) puts [trace vinfo lablpth] read_binary_curv puts "shittttttttt!!!, has bug here"
I debug it and found that it can not really run this command: read_binary_curv, before, it can take some snapshots and save it to be rgb format, and i will also give you the output from the terminal:
Successfully parsed tksurfer.tcl shitaaaaa /Users/junhao.wen/Hao/Dataset/test-data/recon-alled-result-1sub/analysis-series-default/subjects/analysis-series-default/subjects/sub-PREVDEMALS0010001BE/ses-M0/t1/freesurfer-cross-sectional sub-PREVDEMALS0010001BE_ses-M0
subject is sub-PREVDEMALS0010001BE_ses-M0 hemi is lh surface is inflated surfer: current subjects dir: /Users/junhao.wen/Hao/Dataset/test-data/recon-alled-result-1sub/analysis-series-default/subjects/analysis-series-default/subjects/sub-PREVDEMALS0010001BE/ses-M0/t1/freesurfer-cross-sectional surfer: not in "scripts" dir ==> using cwd for session root surfer: session root data dir ($session) set to: surfer: /Users/junhao.wen/Hao/Dataset/test-data/recon-alled-result-1sub/analysis-series-default/subjects/analysis-series-default/subjects/sub-PREVDEMALS0010001BE/ses-M0/t1/freesurfer-cross-sectional checking for nofix files in 'inflated' Reading image info (/Users/junhao.wen/Hao/Dataset/test-data/recon-alled-result-1sub/analysis-series-default/subjects/analysis-series-default/subjects/sub-PREVDEMALS0010001BE/ses-M0/t1/freesurfer-cross-sectional/sub-PREVDEMALS0010001BE_ses-M0) Reading /Users/junhao.wen/Hao/Dataset/test-data/recon-alled-result-1sub/analysis-series-default/subjects/analysis-series-default/subjects/sub-PREVDEMALS0010001BE/ses-M0/t1/freesurfer-cross-sectional/sub-PREVDEMALS0010001BE_ses-M0/mri/orig.mgz surfer: Reading header info from /Users/junhao.wen/Hao/Dataset/test-data/recon-alled-result-1sub/analysis-series-default/subjects/analysis-series-default/subjects/sub-PREVDEMALS0010001BE/ses-M0/t1/freesurfer-cross-sectional/sub-PREVDEMALS0010001BE_ses-M0/mri/orig.mgz surfer: vertices=98465, faces=196926 surfer: single buffered window surfer: tkoInitWindow(sub-PREVDEMALS0010001BE_ses-M0) setting percentile thresholds (-1.00, 0.00, 0.00) surfer: using interface /Applications/freesurfer/tktools/tksurfer.tcl tksurfer: run tcl script: /Users/junhao.wen/Hao/Project/clinica_realted/CAPS_qa_clinica/snap_tksurfer.tcl Reading /Applications/freesurfer/tktools/tkm_common.tcl Reading /Applications/freesurfer/tktools/tkm_wrappers.tcl Reading /Applications/freesurfer/lib/tcl/fsgdfPlot.tcl Reading /Applications/freesurfer/tktools/tkUtils.tcl Successfully parsed tksurfer.tcl reading white matter vertex locations...
I will also attach you the tcl file, any suggestion will be appreciated:)
PS: I know that FS right now recommand us to use freeview, do you have the similar behavior like using tcl file to define the behavior of freeview to take the snapshots???
Good day Hao
what is your tksurfer command line? No wildcards or variables, just the command that you end up running
On 02/06/2017 03:34 PM, Hao wen wrote:
Hello:
Anyone can help me?
*De :* Hao wen *Envoyé :* dimanche 5 février 2017 10:28 *À :* freesurfer@nmr.mgh.harvard.edu *Objet :* Problem with using tksurfer to take snap shot with .tcl
Hello: FS experts:
I am now integrating to use tksurfer to take snapshot from command line automatically, and my command is like this:
cmd ="tksurfer %s %s inflated -tcl %s" % (subject, hemi, os.path.join(os.path.dirname(sys.argv[0]), "snap_tksurfer.tcl"))so i use -tcl to define the behavior of tksurfer, but I go t a bug inside the tickle script,
##curv puts "shitaaaaa" puts stdout [pwd] puts stdout $env(SUBJECT_NAME) puts [trace vinfo lablpth] read_binary_curv puts "shittttttttt!!!, has bug here" I debug it and found that it can not really run this command: read_binary_curv, before, it can take some snapshots and save it to be rgb format, and i will also give you the output from the terminal:
*/Successfully parsed tksurfer.tcl/* */shitaaaaa/* *//Users/junhao.wen/Hao/Dataset/test-data/recon-alled-result-1sub/analysis-series-default/subjects/analysis-series-default/subjects/sub-PREVDEMALS0010001BE/ses-M0/t1/freesurfer-cross-sectional/* */sub-PREVDEMALS0010001BE_ses-M0/* */ /* */subject is sub-PREVDEMALS0010001BE_ses-M0/* */hemi is lh/* */surface is inflated/* */surfer: current subjects dir: /Users/junhao.wen/Hao/Dataset/test-data/recon-alled-result-1sub/analysis-series-default/subjects/analysis-series-default/subjects/sub-PREVDEMALS0010001BE/ses-M0/t1/freesurfer-cross-sectional/* */surfer: not in "scripts" dir ==> using cwd for session root/* */surfer: session root data dir ($session) set to:/* */surfer: /Users/junhao.wen/Hao/Dataset/test-data/recon-alled-result-1sub/analysis-series-default/subjects/analysis-series-default/subjects/sub-PREVDEMALS0010001BE/ses-M0/t1/freesurfer-cross-sectional/* */checking for nofix files in 'inflated'/* */Reading image info (/Users/junhao.wen/Hao/Dataset/test-data/recon-alled-result-1sub/analysis-series-default/subjects/analysis-series-default/subjects/sub-PREVDEMALS0010001BE/ses-M0/t1/freesurfer-cross-sectional/sub-PREVDEMALS0010001BE_ses-M0)/* */Reading /Users/junhao.wen/Hao/Dataset/test-data/recon-alled-result-1sub/analysis-series-default/subjects/analysis-series-default/subjects/sub-PREVDEMALS0010001BE/ses-M0/t1/freesurfer-cross-sectional/sub-PREVDEMALS0010001BE_ses-M0/mri/orig.mgz/* */surfer: Reading header info from /Users/junhao.wen/Hao/Dataset/test-data/recon-alled-result-1sub/analysis-series-default/subjects/analysis-series-default/subjects/sub-PREVDEMALS0010001BE/ses-M0/t1/freesurfer-cross-sectional/sub-PREVDEMALS0010001BE_ses-M0/mri/orig.mgz/* */surfer: vertices=98465, faces=196926/* */surfer: single buffered window/* */surfer: tkoInitWindow(sub-PREVDEMALS0010001BE_ses-M0)/* */setting percentile thresholds (-1.00, 0.00, 0.00)/* */surfer: using interface /Applications/freesurfer/tktools/tksurfer.tcl/* */tksurfer: run tcl script: /Users/junhao.wen/Hao/Project/clinica_realted/CAPS_qa_clinica/snap_tksurfer.tcl/* */Reading /Applications/freesurfer/tktools/tkm_common.tcl/* */Reading /Applications/freesurfer/tktools/tkm_wrappers.tcl/* */Reading /Applications/freesurfer/lib/tcl/fsgdfPlot.tcl/* */Reading /Applications/freesurfer/tktools/tkUtils.tcl/* */Successfully parsed tksurfer.tcl/* */reading white matter vertex locations.../*
I will also attach you the tcl file, any suggestion will be appreciated:)
PS: I know that FS right now recommand us to use freeview, do you have the similar behavior like using tcl file to define the behavior of freeview to take the snapshots???
Good day Hao
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
can you use freeview instead? The -help text is pretty extensive and includes information on saving snapshots with -ss
cheers Bruce On Mon, 6 Feb 2017, Hao wen wrote:
Hello:
Anyone can help me?
De : Hao wen Envoyé : dimanche 5 février 2017 10:28 À : freesurfer@nmr.mgh.harvard.edu Objet : Problem with using tksurfer to take snap shot with .tcl
Hello: FS experts:
I am now integrating to use tksurfer to take snapshot from command line automatically, and my command is like this:
cmd = "tksurfer %s %s inflated -tcl %s" % (subject, hemi, os.path.join(os.path.dirname(sys.argv[0]), "sn ap_tksurfer.tcl"))so i use -tcl to define the behavior of tksurfer, but I go t a bug inside the tickle script,
##curv puts "shitaaaaa" puts stdout [pwd] puts stdout $env(SUBJECT_NAME) puts [trace vinfo lablpth] read_binary_curv puts "shittttttttt!!!, has bug here" I debug it and found that it can not really run this command: read_binary_curv, before, it can take some snapshots and save it to be rgb format, and i will also give you the output from the terminal:
Successfully parsed tksurfer.tcl shitaaaaa /Users/junhao.wen/Hao/Dataset/test-data/recon-alled-result-1sub/analysis-series-default/subjects/analys is-series-default/subjects/sub-PREVDEMALS0010001BE/ses-M0/t1/freesurfer-cross-sectional sub-PREVDEMALS0010001BE_ses-M0
subject is sub-PREVDEMALS0010001BE_ses-M0 hemi is lh surface is inflated surfer: current subjects dir:/Users/junhao.wen/Hao/Dataset/test-data/recon-alled-result-1sub/analysis-series-default/subjects/analys is-series-default/subjects/sub-PREVDEMALS0010001BE/ses-M0/t1/freesurfer-cross-sectional surfer: not in "scripts" dir ==> using cwd for session root surfer: session root data dir ($session) set to: surfer: /Users/junhao.wen/Hao/Dataset/test-data/recon-alled-result-1sub/analysis-series-default/subjects/analys is-series-default/subjects/sub-PREVDEMALS0010001BE/ses-M0/t1/freesurfer-cross-sectional checking for nofix files in 'inflated' Reading image info(/Users/junhao.wen/Hao/Dataset/test-data/recon-alled-result-1sub/analysis-series-default/subjects/analy sis-series-default/subjects/sub-PREVDEMALS0010001BE/ses-M0/t1/freesurfer-cross-sectional/sub-PREVDEMALS 0010001BE_ses-M0) Reading/Users/junhao.wen/Hao/Dataset/test-data/recon-alled-result-1sub/analysis-series-default/subjects/analys is-series-default/subjects/sub-PREVDEMALS0010001BE/ses-M0/t1/freesurfer-cross-sectional/sub-PREVDEMALS0 010001BE_ses-M0/mri/orig.mgz surfer: Reading header info from/Users/junhao.wen/Hao/Dataset/test-data/recon-alled-result-1sub/analysis-series-default/subjects/analys is-series-default/subjects/sub-PREVDEMALS0010001BE/ses-M0/t1/freesurfer-cross-sectional/sub-PREVDEMALS0 010001BE_ses-M0/mri/orig.mgz surfer: vertices=98465, faces=196926 surfer: single buffered window surfer: tkoInitWindow(sub-PREVDEMALS0010001BE_ses-M0) setting percentile thresholds (-1.00, 0.00, 0.00) surfer: using interface /Applications/freesurfer/tktools/tksurfer.tcl tksurfer: run tcl script: /Users/junhao.wen/Hao/Project/clinica_realted/CAPS_qa_clinica/snap_tksurfer.tcl Reading /Applications/freesurfer/tktools/tkm_common.tcl Reading /Applications/freesurfer/tktools/tkm_wrappers.tcl Reading /Applications/freesurfer/lib/tcl/fsgdfPlot.tcl Reading /Applications/freesurfer/tktools/tkUtils.tcl Successfully parsed tksurfer.tcl reading white matter vertex locations...
I will also attach you the tcl file, any suggestion will be appreciated:)
PS: I know that FS right now recommand us to use freeview, do you have the similar behavior like using tcl file to define the behavior of freeview to take the snapshots???
Good day Hao
freesurfer@nmr.mgh.harvard.edu