Re: [Freesurfer] autoreg-sess and spmregister-sess problem
Hi Reza, I need more information that you have supplied. Please look over the instructions in surfer.nmr.mgh.harvard.edu/fswiki/BugReporting thanks doug Reza Rajimehr wrote: Hi, In the FS-FAST analysis stream (dev environment), I used autoreg-sess command as follows: autoreg-sess -s mvp022106 -df df.txt It successfully generated a register.dat file in the bold directory. Then I used tkregister-sess as follows: tkregister-sess -s mvp022106 -df df.txt -rsd t1epi When tkregsiter window comes, the structural volume (anatomical T1) is OK but t1epi volume is completely corrupted. However, running tkregister-sess with '-rsd t1epi' generates another register.dat file in the directory above the bold directory. When I use this register.dat file in the tkregister-sess command, t1epi volume looks fine and almost in the appropriate location as T1 volume. I also tried spmregister-sess instead of autoreg-sess: spmregister-sess -s mvp022106 -df df.txt -fsd bold A register.dat file is generated by this command in the bold directory. Then I used tkregister-sess as follows: tkregsiter-sess -s mvp022106 -df df.txt -fsd bold In the tkregsiter window, the functional volume looks fine but it is largely displaced. I could finally register it manually. I might do something wrong with autoreg-sess and spmregister-sess or is there a bug for these commands? Thanks, Reza Reza Rajimehr, MD NMR Athinoula A. Martinos Center Department of Radiology Massachusetts General Hospital (MGH) Building 149, 13th St. Charlestown, MA 02129 Email: [EMAIL PROTECTED] ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer -- Douglas N. Greve, Ph.D. MGH-NMR Center [EMAIL PROTECTED] Phone Number: 617-724-2358 Fax: 617-726-7422 In order to help us help you, please follow the steps in: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Re: [Freesurfer] tcl script - rotate and save graphics
Hi Kevin, I tried this alterate command, however, the main window continues to display the orig surface, given tksurfer -subjid rh orig It doesn't automatically update the view for the new data in $field. Using the 'UpdateAndRedraw' command and the 'redraw' commands do not change the surface view. Take care, Darren Kevin Teich wrote: Sorry, there's no way to change the resolution of the TIFF images. However, we don't supersample when taking screen shots, so just make the window as big as you can, take the TIFF, and then you can use an image conversion program to change the DPI. I don't think you want to use read_binary_surf. If you're just trying to load a single vertex set in addition to the ones you've already loaded, use this function: read_surface_vertex_set field fileName Reads a set of vertices from the fle in fileName. field should be one of the following: 0 Main vertices 1 Inflated vertices 2 White vertices 3 Pial vertices 4 Orig vertices I was having your problem until I replaced read_binary_surf with read_surface_vertex_set, then labl_load works as expected. On Sun, Feb 26, 2006 at 07:19:22PM -0800, Darren Weber wrote: Hi Daniel et al., thanks for the rotate and save_tiff script. I've installed the dev version (redhat 9 download onto Debian sarge) and the script works well. I would like to set the resolution of the .tif output files (eg, 600 dpi), can we do that? I have a problem when using a label in the tcl script (see example.tcl below). I can startup tksurfer from the csh prompt, create a label, save it, exit, start again, load the label, and it displays correctly. So I assume all the label tools are working. When I restart with -tcl example.tcl, tksurfer draws an entirely blue surface after loading the label (any label). Have you seen this before? Am I doing something wrong? Should I source the tksurfer.tcl script, at the beginning of this script, to get all the lighting etc. correct? I tried to startup tksurfer normally, with no explicit -tcl option, and then "source example.tcl" at the tcl prompt, but the entire surface turns blue after the script loads a label. Can you replicate this or advise me how to avoid it? Is it possible to create a shell script or a tcl script that can startup tksurfer and run a specific tcl script across a group of subjects? Thanks, Darren ## # START EXAMPLE.TCL SCRIPT set SUBJECTS_DIR "/usr/local/freesurfer/subjects" set subjID "ucsf_cj" set subjPath [ file join ${SUBJECTS_DIR} ${subjID} ] set subjSurfPath [ file join ${subjPath} surf ] set subjLabelPath [ file join ${subjPath} label ] set subjTiffPath [ file join ${subjPath} rgb ] foreach h {lh} { # --- # load the inflated surface, with curvature set insurf [file join ${subjSurfPath} ${h}.inflated] read_binary_surf set curv [file join ${subjSurfPath} ${h}.curv] read_binary_curv UpdateAndRedraw # --- # load and display relevant .label files set labels [ glob -directory ${subjLabelPath} "${h}_test.label" ] foreach l $labels { puts "loading label: $l" labl_load "$l" # AT THIS POINT WE HAVE AN ENTIRELY BLUE SURFACE } # now rotate and save the views ... } # END TCL SCRIPT ## Best, Darren Daniel Goldenholz wrote: Hi Darren and other Freesurfers I wrote a tcl script to do just what was described. The one I made gives the flexibility to name the tiff files based on a prefix that you specify before running the script. This way you run the same exact script for as many pictures as you like, simply changing the prefix before running the script. Here is what you do. In tksurfer, after you have set up whatever overlays and/or labels and/or surfaces etc that you like, you enter at the command prompt set pre (where the stuff inside the < > is any file prefix... for instance, set pre bold_contrast1 ) then you run the following tcl script via the menu for running a script... UpdateAndRedraw puts "Taking Snapshots..." make_lateral_view rotate_brain_y 90 redraw set tiff "${pre}_bck.tif" save_tiff $tiff make_lateral_view redraw set tiff "${pre}_lat.tif" save_tiff $tiff rotate_brain_y 180 redraw set tiff "${pre}_med.tif" save_tiff $tiff make_lateral_view rotate_brain_x 90 redraw set tiff "${pre}_inf.tif" save_tiff $tiff rotate_brain_x 180 redraw set tiff "${pre}_sup.tif" save_tiff $tiff make_lateral_view rotate_brain_y 270 redraw set tiff "${pre}_front.tif" save_tiff $tiff Darren Weber wrote: Hi Bruce etal, I would like a short tcl script to rotate each hemisphere through all the main views (lateral, medial, dorsal, ventral, anterior, posterior) and output a graphics file with the name of the subject
[Freesurfer] nearest Talairach point
Dear Bruce etal, Let's say we have a list of Talairach coordinates from a database of fMRI results, in a text file. Can we create a tcl script to read those values and then find the nearest surface point for any subject to each xyz Talairach value? The tcl script should just return a list of vertex indices for each Talairach coordinate. Even better would be a small patch for each Talairach coordinate, based on growing from the nearest vertex found. Matlab has a function called dsearchn and Alex Wade sent me some useful c code for the same process, do you have something like that in the tcl commands? This tcl command below looks related, but it's not clear what it will do when the x y z values do not fall precisely on a vertex. /select_talairach_point/ /*x y z*/ Takes the given talairach coordinate, writes it to the /edit.dat/ file, and then sets the cursor to that point. *x* *y* and *z* are floating point talairach values. Best, Darren -- Darren L. Weber, Ph.D. Visiting Postdoctoral Scholar Dynamic Neuroimaging Laboratory, Department of Radiology, University of California, San Francisco, 185 Berry Street, Suite 350, Box 0946, San Francisco, CA 94107, USA. Tel: +1 415 353-9444 Fax: +1 415 353-9421 www: http://dnl.ucsf.edu/users/dweber "To explicate the uses of the brain seems as difficult a task as to paint the soul, of which it is commonly said, that it understands all things but itself." --Thomas Willis (The Anatomy of the Brain and Nerves, 1664) ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Re: [Freesurfer] tcl script - rotate and save graphics
Hi Kevin et al, it's great to have these options for scripting. I want to loop over subjects. Will read_surface_vertex_set work in this context? I can't see that it provides a way to change the subjid. I'm trying to do this: ## # BEGIN script to loop over subjects set FREESURFER_HOME "/home/dweber/freesurfer/home" set SUBJECTS_DIR "/home/dweber/freesurfer/subjects" set subjects [ glob -directory ${SUBJECTS_DIR} "ucsf_??" ] set subjects [ lsort $subjects ] set surfaces {inflated pial} foreach subject $subjects { if ![ file isdirectory $subject ] { continue } set subjID [ file tail $subject ] puts $subjID set subjPath [ file join ${SUBJECTS_DIR} ${subjID} ] set subjSurfPath [ file join ${subjPath} surf ] set subjTiffPath [ file join ${subjPath} rgb ] foreach h {lh rh} { foreach surf $surfaces { # --- # load the surface, with curvature # this invocation doesn't work #tksurfer -$subjID $h $surf set insurf [file join ${subjSurfPath} ${h}.${surf} ] read_binary_surf set curv [file join ${subjSurfPath} ${h}.curv] read_binary_curv UpdateAndRedraw # etc. } } } # END script to loop over subjects ## This script works, but I have to call it using tksurfer -subjid rh orig -tcl subjloop.tcl I would prefer to invoke tksurfer inside the tcl script and run the whole thing from csh. I'm a little puzzled about how to invoke tksurfer inside a tcl script. From csh: $ tksurfer -subjid rh orig will automatically call the tksurfer.tcl script. I get the same result within wish (or tclsh): $ wish % tksurfer -subjid rh orig % exit # close tksurfer % exit # exit wish $ That works fine, so tksurfer is in the tclsh and wish path and tksurfer finds tksurfer.tcl OK. However, almost the same invocation does not work like this: $ cat > fs_test.tcl #!/bin/sh # the next line restarts using tclsh \ exec tclsh "$0" "$@" tksurfer -subjid rh orig exit exit CNT-D $ chmod +x fs_test.tcl $ ./fs_test.tcl This gives the error: invalid command name "tksurfer" while executing "tksurfer -$subjID $h $surf" It makes no difference if the call to tksurfer is a full path to tksurfer. How do you invoke tksurfer from within a tcl script? Essentially I want a script that will loop over subjects, hemispheres and surfaces. I can put the loops into one tcl script and call it by using the -tcl option, eg: tksurfer -subjid rh orig -tcl subjloop.tcl. However, I am wondering if the initialization for the input -subjid screws up the loops over other subjects in the tcl script? Maybe I should be using a shell script to loop over subjects, hemisphere and surfaces, using a new tksurfer invocation for each. The problem is that the initialization of tksurfer has complexity built into tksurfer.tcl, which implements a lot of initialization. It's not clear to me how this interacts with a custom script. So, what happens to tksurfer.tcl when a custom script is invoked with the -tcl option, does it still get called? Best, Darren Kevin Teich wrote: Sorry, there's no way to change the resolution of the TIFF images. However, we don't supersample when taking screen shots, so just make the window as big as you can, take the TIFF, and then you can use an image conversion program to change the DPI. I don't think you want to use read_binary_surf. If you're just trying to load a single vertex set in addition to the ones you've already loaded, use this function: read_surface_vertex_set field fileName Reads a set of vertices from the fle in fileName. field should be one of the following: 0 Main vertices 1 Inflated vertices 2 White vertices 3 Pial vertices 4 Orig vertices I was having your problem until I replaced read_binary_surf with read_surface_vertex_set, then labl_load works as expected. On Sun, Feb 26, 2006 at 07:19:22PM -0800, Darren Weber wrote: Hi Daniel et al., thanks for the rotate and save_tiff script. I've installed the dev version (redhat 9 download onto Debian sarge) and the script works well. I would like to set the resolution of the .tif output files (eg, 600 dpi), can we do that? I have a problem when using a label in the tcl script (see example.tcl below). I can startup tksurfer from the csh prompt, create a label, save it, exit, start again, load the label, and it displays correctly. So I assume all the label tools are working. When I restart with -tcl example.tcl, tksurfer draws an entirely blue surface after loading the label (any label). Have you seen this before? Am I doing something wrong? Should I source the tksurfer.tcl script, at the beginning of this script, to get all the lightin
Re: [Freesurfer] Freesurfer tutorial
Hi Gabe, What version of freesurfer are you using? The -autorecon-all, -autorecon1, and -i flags should work with a current version - but are relatively new. If you are using an older version these flags will not work. Could you also send the specific command line and error message you are receiving. When reporting bugs it's really helpful if you included some pertinent information so we can better help you: https://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting Thanks, Jenni On Mon, 27 Feb 2006, Gabe Castillo wrote: Hello, I am new to using freesurfer. I have installed it successfully and am attempting to go through the tutorial. The tutorial seems to be out of date. I am at the "Data Conversion" step of the tutorial with the tutorial_subjs directory from the gzipped buckner_data tarball. If I try to run "recon-all -i 014-anon/001.dcm -i 015-anon/001.dcm -s anon" it complains about the "-i" flag. It also complained about the "-autorecon-all" and "-autrecon1" flags. Looking through the usage output, I'm guessing that these have been replaced by "-all" and "-stage1" respectively. What has the "-i" flag been changed too. Forgive my ignorance, if anybody has a changelog or can point me to one, I'd be happy to dig around for this info. Thanks, Gabe Castillo ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
[Freesurfer] Freesurfer tutorial
Hello, I am new to using freesurfer. I have installed it successfully and am attempting to go through the tutorial. The tutorial seems to be out of date. I am at the "Data Conversion" step of the tutorial with the tutorial_subjs directory from the gzipped buckner_data tarball. If I try to run "recon-all -i 014-anon/001.dcm -i 015-anon/001.dcm -s anon" it complains about the "-i" flag. It also complained about the "-autorecon-all" and "-autrecon1" flags. Looking through the usage output, I'm guessing that these have been replaced by "-all" and "-stage1" respectively. What has the "-i" flag been changed too. Forgive my ignorance, if anybody has a changelog or can point me to one, I'd be happy to dig around for this info. Thanks, Gabe Castillo ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
[Freesurfer] autoreg-sess and spmregister-sess problem
Hi, In the FS-FAST analysis stream (dev environment), I used autoreg-sess command as follows: autoreg-sess -s mvp022106 -df df.txt It successfully generated a register.dat file in the bold directory. Then I used tkregister-sess as follows: tkregister-sess -s mvp022106 -df df.txt -rsd t1epi When tkregsiter window comes, the structural volume (anatomical T1) is OK but t1epi volume is completely corrupted. However, running tkregister-sess with '-rsd t1epi' generates another register.dat file in the directory above the bold directory. When I use this register.dat file in the tkregister-sess command, t1epi volume looks fine and almost in the appropriate location as T1 volume. I also tried spmregister-sess instead of autoreg-sess: spmregister-sess -s mvp022106 -df df.txt -fsd bold A register.dat file is generated by this command in the bold directory. Then I used tkregister-sess as follows: tkregsiter-sess -s mvp022106 -df df.txt -fsd bold In the tkregsiter window, the functional volume looks fine but it is largely displaced. I could finally register it manually. I might do something wrong with autoreg-sess and spmregister-sess or is there a bug for these commands? Thanks, Reza Reza Rajimehr, MD NMR Athinoula A. Martinos Center Department of Radiology Massachusetts General Hospital (MGH) Building 149, 13th St. Charlestown, MA 02129 Email: [EMAIL PROTECTED] ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Re: [Freesurfer] tcl script - rotate and save graphics
Sorry, there's no way to change the resolution of the TIFF images. However, we don't supersample when taking screen shots, so just make the window as big as you can, take the TIFF, and then you can use an image conversion program to change the DPI. I don't think you want to use read_binary_surf. If you're just trying to load a single vertex set in addition to the ones you've already loaded, use this function: read_surface_vertex_set field fileName Reads a set of vertices from the fle in fileName. field should be one of the following: 0 Main vertices 1 Inflated vertices 2 White vertices 3 Pial vertices 4 Orig vertices I was having your problem until I replaced read_binary_surf with read_surface_vertex_set, then labl_load works as expected. On Sun, Feb 26, 2006 at 07:19:22PM -0800, Darren Weber wrote: > > Hi Daniel et al., > > thanks for the rotate and save_tiff script. I've installed the dev > version (redhat 9 download onto Debian sarge) and the script works > well. I would like to set the resolution of the .tif output files (eg, > 600 dpi), can we do that? > > I have a problem when using a label in the tcl script (see example.tcl > below). I can startup tksurfer from the csh prompt, create a label, > save it, exit, start again, load the label, and it displays correctly. > So I assume all the label tools are working. When I restart with -tcl > example.tcl, tksurfer draws an entirely blue surface after loading the > label (any label). Have you seen this before? Am I doing something > wrong? Should I source the tksurfer.tcl script, at the beginning of > this script, to get all the lighting etc. correct? I tried to startup > tksurfer normally, with no explicit -tcl option, and then "source > example.tcl" at the tcl prompt, but the entire surface turns blue after > the script loads a label. Can you replicate this or advise me how to > avoid it? > > Is it possible to create a shell script or a tcl script that can startup > tksurfer and run a specific tcl script across a group of subjects? > > Thanks, Darren > > > > ## > # START EXAMPLE.TCL SCRIPT > > set SUBJECTS_DIR "/usr/local/freesurfer/subjects" > > set subjID "ucsf_cj" > set subjPath [ file join ${SUBJECTS_DIR} ${subjID} ] > > set subjSurfPath [ file join ${subjPath} surf ] > set subjLabelPath [ file join ${subjPath} label ] > set subjTiffPath [ file join ${subjPath} rgb ] > > foreach h {lh} { > ># --- ># load the inflated surface, with curvature > >set insurf [file join ${subjSurfPath} ${h}.inflated] >read_binary_surf > >set curv [file join ${subjSurfPath} ${h}.curv] >read_binary_curv > >UpdateAndRedraw > ># --- ># load and display relevant .label files > >set labels [ glob -directory ${subjLabelPath} "${h}_test.label" ] >foreach l $labels { >puts "loading label: $l" >labl_load "$l" ># AT THIS POINT WE HAVE AN ENTIRELY BLUE SURFACE >} > ># now rotate and save the views ... > } > # END TCL SCRIPT > ## > > > > Best, Darren > > > > Daniel Goldenholz wrote: > > >Hi Darren and other Freesurfers > > > >I wrote a tcl script to do just what was described. The one I made > >gives the flexibility to name the tiff files based on a prefix that > >you specify before > >running the script. This way you run the same exact script for as many > >pictures as you like, simply changing the prefix before running the > >script. > > > > > > > >Here is what you do. In tksurfer, after you have set up whatever > >overlays and/or labels and/or surfaces etc that you like, you enter at > >the command prompt > >set pre > > > >(where the stuff inside the < > is any file prefix... for instance, > >set pre bold_contrast1 ) > > > >then you run the following tcl script via the menu for running a > >script... > > > > > >UpdateAndRedraw > >puts "Taking Snapshots..." > >make_lateral_view > >rotate_brain_y 90 > >redraw > >set tiff "${pre}_bck.tif" > >save_tiff $tiff > >make_lateral_view > >redraw > >set tiff "${pre}_lat.tif" > >save_tiff $tiff > >rotate_brain_y 180 > >redraw > >set tiff "${pre}_med.tif" > >save_tiff $tiff > >make_lateral_view > >rotate_brain_x 90 > >redraw > >set tiff "${pre}_inf.tif" > >save_tiff $tiff > >rotate_brain_x 180 > >redraw > >set tiff "${pre}_sup.tif" > >save_tiff $tiff > >make_lateral_view > >rotate_brain_y 270 > >redraw > >set tiff "${pre}_front.tif" > >save_tiff $tiff > > > > > > > >Darren Weber wrote: > > > >>Hi Bruce etal, > >> > >>I would like a short tcl script to rotate each hemisphere through all > >>the main views (lateral, medial, dorsal, ventral, anterior, > >>posterior) and output a graphics file with the name of the subject > >>and the vi
[Freesurfer] cannot locate talairach.xfm
I have some path problems when using tksurfer, eg dnlweber:/data/freesurfer/subjects> tksurfer -ucsf_cj rh inflated surfer: current subjects dir: /home/dweber/freesurfer/subjects surfer: not in "scripts" dir ==> using cwd for session root surfer: session root data dir ($session) set to: surfer: /data/freesurfer/subjects can't find talairach file '/home/dweber/freesurfer/subjects/ucsf_cj/mri/T1/COR-.info/../transforms/talairach.xfm' surfer: Reading header info from /home/dweber/freesurfer/subjects/ucsf_cj/mri/T1/COR-.info INFO: NOT fixing vertex area surfer: vertices=154539, faces=309074 can't find talairach file '/home/dweber/freesurfer/subjects/ucsf_cj/surf/../mri/orig/COR-.info/../transforms/talairach.xfm' surfer: single buffered window surfer: using interface /home/dweber/freesurfer/home/lib/tcl/tksurfer.tcl Reading /home/dweber/freesurfer/home/lib/tcl/tkm_common.tcl Reading /home/dweber/freesurfer/home/lib/tcl/tkm_wrappers.tcl Reading /home/dweber/freesurfer/home/lib/tcl/fsgdfPlot.tcl Reading /home/dweber/freesurfer/home/lib/tcl/tkUtils.tcl Successfully parsed tksurfer.tcl The .xfm file exists, ie dnlweber:/data/freesurfer/subjects> ls ucsf_cj/mri/transforms/ talairach.xfm So the question is, how can I work around this failure to find the talairach.xfm file? Do I need to edit the tksurfer.tcl script? It seems to have a strange way of using relative paths (..) to find the talairach.xfm file. In case it makes any difference, this is my set up: Setting up environment for FreeSurfer/FS-FAST (and FSL) FREESURFER_HOME /home/dweber/freesurfer/home FSFAST_HOME /home/dweber/freesurfer/home/fsfast SUBJECTS_DIR/home/dweber/freesurfer/subjects FUNCTIONALS_DIR /home/dweber/freesurfer/sessions MINC_BIN_DIR/home/dweber/freesurfer/home/mni/bin MINC_LIB_DIR/home/dweber/freesurfer/home/mni/lib PERL5LIB/home/dweber/freesurfer/home/mni/lib/perl5/5.8.0 GSL_DIR /home/dweber/freesurfer/home/lib/gsl QTDIR /home/dweber/freesurfer/home/lib/qt TCLLIBPATH /home/dweber/freesurfer/home/lib/tcltktixblt/lib FSL_DIR /usr/local/fsl where the /home/dweber/freesurfer contains symlinks (please don't ask me why), eg: dnlweber:/data/freesurfer/subjects> ls -l /home/dweber/freesurfer/ total 0 lrwxrwxrwx 1 dweber dnl 25 2006-02-24 20:26 functionals -> /data/freesurfer/sessions lrwxrwxrwx 1 dweber dnl 21 2006-02-24 20:26 home -> /usr/local/freesurfer lrwxrwxrwx 1 dweber dnl 25 2006-02-24 20:26 sessions -> /data/freesurfer/sessions lrwxrwxrwx 1 dweber dnl 25 2006-02-24 20:26 subjects -> /data/freesurfer/subjects -- Darren L. Weber, Ph.D. Visiting Postdoctoral Scholar Dynamic Neuroimaging Laboratory, Department of Radiology, University of California, San Francisco, 185 Berry Street, Suite 350, Box 0946, San Francisco, CA 94107, USA. Tel: +1 415 353-9444 Fax: +1 415 353-9421 www: http://dnl.ucsf.edu/users/dweber "To explicate the uses of the brain seems as difficult a task as to paint the soul, of which it is commonly said, that it understands all things but itself." --Thomas Willis (The Anatomy of the Brain and Nerves, 1664) ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Re: [Freesurfer] tcl script - rotate and save graphics
Hi Daniel et al., thanks for the rotate and save_tiff script. I've installed the dev version (redhat 9 download onto Debian sarge) and the script works well. I would like to set the resolution of the .tif output files (eg, 600 dpi), can we do that? I have a problem when using a label in the tcl script (see example.tcl below). I can startup tksurfer from the csh prompt, create a label, save it, exit, start again, load the label, and it displays correctly. So I assume all the label tools are working. When I restart with -tcl example.tcl, tksurfer draws an entirely blue surface after loading the label (any label). Have you seen this before? Am I doing something wrong? Should I source the tksurfer.tcl script, at the beginning of this script, to get all the lighting etc. correct? I tried to startup tksurfer normally, with no explicit -tcl option, and then "source example.tcl" at the tcl prompt, but the entire surface turns blue after the script loads a label. Can you replicate this or advise me how to avoid it? Is it possible to create a shell script or a tcl script that can startup tksurfer and run a specific tcl script across a group of subjects? Thanks, Darren ## # START EXAMPLE.TCL SCRIPT set SUBJECTS_DIR "/usr/local/freesurfer/subjects" set subjID "ucsf_cj" set subjPath [ file join ${SUBJECTS_DIR} ${subjID} ] set subjSurfPath [ file join ${subjPath} surf ] set subjLabelPath [ file join ${subjPath} label ] set subjTiffPath [ file join ${subjPath} rgb ] foreach h {lh} { # --- # load the inflated surface, with curvature set insurf [file join ${subjSurfPath} ${h}.inflated] read_binary_surf set curv [file join ${subjSurfPath} ${h}.curv] read_binary_curv UpdateAndRedraw # --- # load and display relevant .label files set labels [ glob -directory ${subjLabelPath} "${h}_test.label" ] foreach l $labels { puts "loading label: $l" labl_load "$l" # AT THIS POINT WE HAVE AN ENTIRELY BLUE SURFACE } # now rotate and save the views ... } # END TCL SCRIPT ## Best, Darren Daniel Goldenholz wrote: Hi Darren and other Freesurfers I wrote a tcl script to do just what was described. The one I made gives the flexibility to name the tiff files based on a prefix that you specify before running the script. This way you run the same exact script for as many pictures as you like, simply changing the prefix before running the script. Here is what you do. In tksurfer, after you have set up whatever overlays and/or labels and/or surfaces etc that you like, you enter at the command prompt set pre (where the stuff inside the < > is any file prefix... for instance, set pre bold_contrast1 ) then you run the following tcl script via the menu for running a script... UpdateAndRedraw puts "Taking Snapshots..." make_lateral_view rotate_brain_y 90 redraw set tiff "${pre}_bck.tif" save_tiff $tiff make_lateral_view redraw set tiff "${pre}_lat.tif" save_tiff $tiff rotate_brain_y 180 redraw set tiff "${pre}_med.tif" save_tiff $tiff make_lateral_view rotate_brain_x 90 redraw set tiff "${pre}_inf.tif" save_tiff $tiff rotate_brain_x 180 redraw set tiff "${pre}_sup.tif" save_tiff $tiff make_lateral_view rotate_brain_y 270 redraw set tiff "${pre}_front.tif" save_tiff $tiff Darren Weber wrote: Hi Bruce etal, I would like a short tcl script to rotate each hemisphere through all the main views (lateral, medial, dorsal, ventral, anterior, posterior) and output a graphics file with the name of the subject and the view in the file name. I've found rotate_brain_[xyz] and save_rgb, but the latter does not permit a file name for the output graphics. I would like high-resolution graphics for publications, but the save_rgb outputs about 85-90 dpi images. Is there an option for vector graphics or high resolution tiff or png images? Best, Darren ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer -- Darren L. Weber, Ph.D. Visiting Postdoctoral Scholar Dynamic Neuroimaging Laboratory, Department of Radiology, University of California, San Francisco, 185 Berry Street, Suite 350, Box 0946, San Francisco, CA 94107, USA. Tel: +1 415 353-9444 Fax: +1 415 353-9421 www: http://dnl.ucsf.edu/users/dweber "To explicate the uses of the brain seems as difficult a task as to paint the soul, of which it is commonly said, that it understands all things but itself." --Thomas Willis (The Anatomy of the Brain and Nerves, 1664) ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfe
Re: [Freesurfer] tkregister2 woes
Sebastian, Which platform are you running the centos4_x86_64 release upon? Also, can you send me the output of this command: ldd `which tkregister2` Also, if not running on a 64bit Centos4 platform, then you could attempt the following: cd $FREESURFER_HOME/lib mv tcltktixblt backup-tcltktixblt open a new terminal and source freesurfer and retry tkregister2 The freesurfer distribution contains Tcl/Tk/Tix/BLT libs which are tested to work with the freesurfer gui apps, but maybe you are experiencing some compatibility issue. By moving this libs dir, freesurfer will use whatever is installed already on your system (which may or may not work with tkregister2). Nick On Mon, 2006-02-27 at 12:05 -0500, Doug Greve wrote: > Hmmm, I have not seen anything like this around here. Does it only > happen with your monkey data? What are the sizes of the volumes you are > trying to run? Can you send all your command lines? > > doug > > Sebastian Moeller wrote: > > > Aloha fellow Surfers, > > > > while testing the dev20060224 centos4_x86_64 release I stumbled upon > > some issues with tkregister2. That is tkregister2 produces X errors > > leading to a black screen once the image window is clicked into. > > Since I try to cheat monkey data into the freesurfer chain I use > > tkregister2 to register my structurals with some atlas based > > assumptions (basically rotating the volume slightly around three > > axis). Then I use mri_vol2vol to reslice a new rotated volume. And > > this is where tkregister2 chokes: > > Received X error ! > > Error code : 10 > > Request code : 89 > > Minor code : 0 > > > > Error test : ´BadAccess (attempt to access private resource denied)´ > > > > There are plenty of these errors, and once the image window is clicked > > into the screen turns black, only the mouse survives. Remotly login in > > and killing the tkregister2 process gives back control over the > > machine. Any hints besides "don't do that then" ;)? > > > > ahoi > > Sebastian > > > > > ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Re: [Freesurfer] tkregister2 woes
Hmmm, I have not seen anything like this around here. Does it only happen with your monkey data? What are the sizes of the volumes you are trying to run? Can you send all your command lines? doug Sebastian Moeller wrote: Aloha fellow Surfers, while testing the dev20060224 centos4_x86_64 release I stumbled upon some issues with tkregister2. That is tkregister2 produces X errors leading to a black screen once the image window is clicked into. Since I try to cheat monkey data into the freesurfer chain I use tkregister2 to register my structurals with some atlas based assumptions (basically rotating the volume slightly around three axis). Then I use mri_vol2vol to reslice a new rotated volume. And this is where tkregister2 chokes: Received X error ! Error code : 10 Request code : 89 Minor code : 0 Error test : ´BadAccess (attempt to access private resource denied)´ There are plenty of these errors, and once the image window is clicked into the screen turns black, only the mouse survives. Remotly login in and killing the tkregister2 process gives back control over the machine. Any hints besides "don't do that then" ;)? ahoi Sebastian -- Douglas N. Greve, Ph.D. MGH-NMR Center [EMAIL PROTECTED] Phone Number: 617-724-2358 Fax: 617-726-7422 In order to help us help you, please follow the steps in: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
[Freesurfer] tkregister2 woes
Aloha fellow Surfers, while testing the dev20060224 centos4_x86_64 release I stumbled upon some issues with tkregister2. That is tkregister2 produces X errors leading to a black screen once the image window is clicked into. Since I try to cheat monkey data into the freesurfer chain I use tkregister2 to register my structurals with some atlas based assumptions (basically rotating the volume slightly around three axis). Then I use mri_vol2vol to reslice a new rotated volume. And this is where tkregister2 chokes: Received X error ! Error code : 10 Request code : 89 Minor code : 0 Error test : ´BadAccess (attempt to access private resource denied)´ There are plenty of these errors, and once the image window is clicked into the screen turns black, only the mouse survives. Remotly login in and killing the tkregister2 process gives back control over the machine. Any hints besides "don't do that then" ;)? ahoi Sebastian -- Sebastian Moeller Tel.: 04 21 - 2 18 - 78 38 oder 96 91 Fax.: 04 21 - 2 18 - 90 04 GSM: 01 62 - 3 25 45 59 [EMAIL PROTECTED] AG Kreiter / FB 2 Institut fuer Hirnforschung III Abteilung Theoretische Neurobiologie Universitaet Bremen Biogarten Hochschulring 16a Postfach 33 04 40 28359 Bremen ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer