Re: [Freesurfer] Re: tcl command to raise tksurfer window
I'm guessing the reason for this question is because a snapshot image is needed? If so, will a refresh and save image command be sufficient? D Kevin Teich wrote: how do we raise the tksurfer window into the foreground in a tcl script (in case it is obscured by other windows)? Sorry, there's no way to do that. There's also no way to set the backgroud color in the window. -- Daniel Goldenholz - Cell: 617-935-9421 http://people.bu.edu/danielg/ Mavet v'chaim b'yad halashon Life and death are in the hands of language - Proverbs 18:21 ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Re: [Freesurfer] Faster and Parallel recon-all
Sarah I am a little confused. Are you saying that recon-all has a bug, or that super-recon has a bug? If you are saying recon-all has a bug, you should start a new thread so others who don't care about faster and parallel... are aware. If super-recon is screwed up, please tell me what you think needs to be added/changed, or send a code snippet. Thanks Daniel [EMAIL PROTECTED] wrote: hi there, i'm actually working on parallelizing recon-all on a grid...i *think* the script won't work all the way thru bcs calling recon-all with the -normalization2 flag is supposed to call both mri_normalize AND mri_mask (according to the DevTable); but it looks as if the recon-all script only calls mri_normalize with that flag...this means mri_mask is never called and brain.finalsurfs.mgz is not produced...so when you get to -finalsurfs it can't find the file...alas i just changed the recon-all script to call mri_mask when it gets the -norm2 flag...this seems to have worked. sarah Original message Date: Wed, 22 Mar 2006 18:09:11 -0500 From: Daniel Goldenholz [EMAIL PROTECTED] Subject: Re: [Freesurfer] Faster and Parallel recon-all To: Goradia, Dhruman D [EMAIL PROTECTED] Cc: freesurfer@nmr.mgh.harvard.edu Hi again, I have totally revamped the script in light of the fact that recon-all -notify did not do what I thought it did at all! The new and improved (version 1.02) super-recon is quite a bit fancier. Now, I leave all notifcations and waiting and emailing to super-recon itself, so that recon-all assumptions are reduced. If you want to run a complete recon-all -all but have the hemisphere parts run in parallel, you run a command like this one: super_recon all $SUBJECTS_DIR $SUBJECT /space/dicom/file1 /space/dicom/file2 [EMAIL PROTECTED] Using this new and improved command, if you have a cluster with daul processors, then you should be able to run multiple subjects faster than a standard recon-all command. The script in all mode will run the same stuff as recon- all -all. If you wish to run a subset of the full set of commands, you can simply comment out a specific line you don't want. There are also several other ways to call the script now, since in reality it calls itself recursively with different options. Hopefully this one will do what the original one intended to do. Good luck, Daniel Goradia, Dhruman D wrote: Hi Daniel, The script is ok but it still does not make it to the end. As the script is designed to send me an email at the end of the last step, I got an email within 15 min after I executed the script saying that recon-all 14777 finished with errors at Tue Mar 21 18:46:15 EST 2006. However it went on the complete the gcareg step. I have attached the status and log files for your reference. If you get a chance have a look at it. I believe this problem is not due to super-recon script but due to recon-all script. Please let me know. I am very interested in the super-recon script, as it takes about 30 hrs to process 1 scan currently. -Dhruman -Original Message- From: Daniel Goldenholz [mailto:[EMAIL PROTECTED] Sent: Tuesday 21 March 2006 17:09 To: Goradia, Dhruman D Cc: freesurfer@nmr.mgh.harvard.edu Subject: Re: [Freesurfer] Faster and Parallel recon-all Dhruman Thanks for catching that. Spelling was never my strong point. I have corrected the script on my website. As for you second problem, did you properly remove the waitfor step1-00.done from the motion correction step, since you say you skipped step1-00, i.e. the invol step? I mention this in a comment near the top of the script. D Goradia, Dhruman D wrote: Hi Daniel, I was having a second look at the script and apparently the script is fine with a small spelling error. The STAT variable which is set at 3 different instances has spelling error in scripts where t is missing. Once this was corrected the script is fine but it's still not working. It initiates all the processes and then just sits idle. After waiting for half an hour it still does not make step1-00.done (I start directly with motion cor) keeping all the other processes waiting. I am still probing into this. If you can think of something that might be of help then let me know. -Dhruman -Original Message- From: Daniel Goldenholz [mailto:[EMAIL PROTECTED] Sent: Tuesday 21 March 2006 11:25 To: Goradia, Dhruman D Subject: Re: [Freesurfer] Faster and Parallel recon-all Dhruman That's confusing. I think you should take one line of executable code from your script that produces that behavior and then email
[Freesurfer] still trouble with this motioncor problem
6 -ref /autofs/space/megraid_043/seder/freesurfer/nmr00069/mri/tmp-mri_motion_correct.fsl-11962/cor-1.hdr -omat /autofs/space/megraid_043/seder/freesurfer/nmr00069/mri/tmp-mri_motion_correct.fsl-11962/resampled.fslmat WARNING: Both reference and input images have an sform matrix set The output image will use the sform from the reference image Started at Thu Mar 23 11:37:43 EST 2006 Ended at Thu Mar 23 11:43:33 EST 2006 fsl_rigid_register Done To check results, run: tkmedit -f /autofs/space/megraid_043/seder/freesurfer/nmr00069/mri/tmp-mri_motion_correct.fsl-11962/cor-1.img -aux /autofs/space/megraid_043/seder/freesurfer/nmr00069/mri/tmp-mri_motion_correct.fsl-11962/resampled.img mv /autofs/space/megraid_043/seder/freesurfer/nmr00069/mri/tmp-mri_motion_correct.fsl-11962/resampled.img /autofs/space/megraid_043/seder/freesurfer/nmr00069/mri/tmp-mri_motion_correct.fsl-11962/cor-2.img - Averaging Thu Mar 23 11:43:33 EST 2006 /autofs/space/megraid_043/seder/freesurfer/nmr00069 inhibiting isotropic volume interpolation 1 of 2: reading /autofs/space/megraid_043/seder/freesurfer/nmr00069/mri/tmp-mri_motion_correct.fsl-11962/cor-1.img... 2 of 2: reading /autofs/space/megraid_043/seder/freesurfer/nmr00069/mri/tmp-mri_motion_correct.fsl-11962/cor-2.img... INFO: analyzeRead(): min = 0, max = 1543 ERROR: premature end of file ERROR: Success (0) frame = 0, slice = 158, k=158, row = 0 nread = 0, nexpected = 256 fname = height = 256 width = 256 depth = 160 nframe = 1 imnr0 = 1 imnr1 = 160 xnum = 256 ynum = 256 fov = 256.00 thick = 1.00 xstart = -128.00 xend = 128.00 ystart = -128.00 yend = 128.00 zstart = -80.00 zend = 80.00 type = 3 xsize = 1.00 ysize = 1.00 zsize = 1.00 x ras = 0.00 -1.00 -0.00 y ras = -0.040132 0.00 -0.999194 z ras = -0.999194 0.00 0.040132 c ras = 5.572693 0.674698 -8.076317 det(xyz_ras) = -1.00 ras_good_flag = 1 brightness = 1 subject_name = path_to_t1 = fname_format = analyzeRead2(): error reading from file /autofs/space/megraid_043/seder/freesurfer/nmr00069/mri/tmp-mri_motion_correct.fsl-11962/cor-2.img mri_average: MRIread(/autofs/space/megraid_043/seder/freesurfer/nmr00069/mri/tmp-mri_motion_correct.fsl-11962/cor-2.img) failed Linux rerun 2.6.9-22.0.2.106.unsupportedsmp #1 SMP Fri Jan 20 04:48:30 CST 2006 x86_64 x86_64 x86_64 GNU/Linux recon-all exited with ERRORS at Thu Mar 23 11:43:38 EST 2006 -- Daniel Goldenholz - Cell: 617-935-9421 http://people.bu.edu/danielg/ Mavet v'chaim b'yad halashon Life and death are in the hands of language - Proverbs 18:21 ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Re: [Freesurfer] Faster and Parallel recon-all
Hi again, I have totally revamped the script in light of the fact that recon-all -notify did not do what I thought it did at all! The new and improved (version 1.02) super-recon is quite a bit fancier. Now, I leave all notifcations and waiting and emailing to super-recon itself, so that recon-all assumptions are reduced. If you want to run a complete recon-all -all but have the hemisphere parts run in parallel, you run a command like this one: super_recon all $SUBJECTS_DIR $SUBJECT /space/dicom/file1 /space/dicom/file2 [EMAIL PROTECTED] Using this new and improved command, if you have a cluster with daul processors, then you should be able to run multiple subjects faster than a standard recon-all command. The script in all mode will run the same stuff as recon-all -all. If you wish to run a subset of the full set of commands, you can simply comment out a specific line you don't want. There are also several other ways to call the script now, since in reality it calls itself recursively with different options. Hopefully this one will do what the original one intended to do. Good luck, Daniel Goradia, Dhruman D wrote: Hi Daniel, The script is ok but it still does not make it to the end. As the script is designed to send me an email at the end of the last step, I got an email within 15 min after I executed the script saying that recon-all 14777 finished with errors at Tue Mar 21 18:46:15 EST 2006. However it went on the complete the gcareg step. I have attached the status and log files for your reference. If you get a chance have a look at it. I believe this problem is not due to super-recon script but due to recon-all script. Please let me know. I am very interested in the super-recon script, as it takes about 30 hrs to process 1 scan currently. -Dhruman -Original Message- From: Daniel Goldenholz [mailto:[EMAIL PROTECTED] Sent: Tuesday 21 March 2006 17:09 To: Goradia, Dhruman D Cc: freesurfer@nmr.mgh.harvard.edu Subject: Re: [Freesurfer] Faster and Parallel recon-all Dhruman Thanks for catching that. Spelling was never my strong point. I have corrected the script on my website. As for you second problem, did you properly remove the waitfor step1-00.done from the motion correction step, since you say you skipped step1-00, i.e. the invol step? I mention this in a comment near the top of the script. D Goradia, Dhruman D wrote: Hi Daniel, I was having a second look at the script and apparently the script is fine with a small spelling error. The STAT variable which is set at 3 different instances has spelling error in scripts where t is missing. Once this was corrected the script is fine but it's still not working. It initiates all the processes and then just sits idle. After waiting for half an hour it still does not make step1-00.done (I start directly with motion cor) keeping all the other processes waiting. I am still probing into this. If you can think of something that might be of help then let me know. -Dhruman -Original Message- From: Daniel Goldenholz [mailto:[EMAIL PROTECTED] Sent: Tuesday 21 March 2006 11:25 To: Goradia, Dhruman D Subject: Re: [Freesurfer] Faster and Parallel recon-all Dhruman That's confusing. I think you should take one line of executable code from your script that produces that behavior and then email it to the freesurfer list. It sounds to me like the recon-all script ASSUMES that the log file exists if you specify a name. I thought it actually creates one first, but I could have been mistaken there, and if so I will need to add a few extra lines of code. PLEASE follow up on this. It will help others. The other thing to try is to create a text file first, such as like this: echo #Starting recon-all manually... /Applications/freesurfer/subjects/ddg6/scripts/recon-all-status.log and then see if my script is ok. Keep me posted. D Goradia, Dhruman D wrote: Hi Daniel, I tried to use the script super-recon on mac OX S using bash shell. I made the necessary changes to make it operable in bash. However when I run the script its gives me the following error: Tcsh:/Applications/freesurfer/subjects/ddg6/scripts/recon-all-status.l o g :not a file or directory. I tried to run the first 3 steps of the script (motioncor, nuintensitycor, talairach) and it gives the above error. However if I remove the log and status flags, the first 3 steps executes properly. Do you have any idea why? Do you see any problem if I delete the log and status flags from the whole script and use it? -Dhruman -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Daniel Goldenholz Sent: Thursday 16 March 2006 15:17 Cc: Freesurfer Mailing List; Nick Schmansky Subject: Re: [Freesurfer] Faster and Parallel recon-all Ah. Silly me, I didn't notice the -log and -status options. Thanks Nick. I have now included
Re: [Freesurfer] Faster and Parallel recon-all
Dhruman Thanks for catching that. Spelling was never my strong point. I have corrected the script on my website. As for you second problem, did you properly remove the waitfor step1-00.done from the motion correction step, since you say you skipped step1-00, i.e. the invol step? I mention this in a comment near the top of the script. D Goradia, Dhruman D wrote: Hi Daniel, I was having a second look at the script and apparently the script is fine with a small spelling error. The STAT variable which is set at 3 different instances has spelling error in scripts where t is missing. Once this was corrected the script is fine but it's still not working. It initiates all the processes and then just sits idle. After waiting for half an hour it still does not make step1-00.done (I start directly with motion cor) keeping all the other processes waiting. I am still probing into this. If you can think of something that might be of help then let me know. -Dhruman -Original Message- From: Daniel Goldenholz [mailto:[EMAIL PROTECTED] Sent: Tuesday 21 March 2006 11:25 To: Goradia, Dhruman D Subject: Re: [Freesurfer] Faster and Parallel recon-all Dhruman That's confusing. I think you should take one line of executable code from your script that produces that behavior and then email it to the freesurfer list. It sounds to me like the recon-all script ASSUMES that the log file exists if you specify a name. I thought it actually creates one first, but I could have been mistaken there, and if so I will need to add a few extra lines of code. PLEASE follow up on this. It will help others. The other thing to try is to create a text file first, such as like this: echo #Starting recon-all manually... /Applications/freesurfer/subjects/ddg6/scripts/recon-all-status.log and then see if my script is ok. Keep me posted. D Goradia, Dhruman D wrote: Hi Daniel, I tried to use the script super-recon on mac OX S using bash shell. I made the necessary changes to make it operable in bash. However when I run the script its gives me the following error: Tcsh:/Applications/freesurfer/subjects/ddg6/scripts/recon-all-status.lo g :not a file or directory. I tried to run the first 3 steps of the script (motioncor, nuintensitycor, talairach) and it gives the above error. However if I remove the log and status flags, the first 3 steps executes properly. Do you have any idea why? Do you see any problem if I delete the log and status flags from the whole script and use it? -Dhruman -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Daniel Goldenholz Sent: Thursday 16 March 2006 15:17 Cc: Freesurfer Mailing List; Nick Schmansky Subject: Re: [Freesurfer] Faster and Parallel recon-all Ah. Silly me, I didn't notice the -log and -status options. Thanks Nick. I have now included those into my super-recon script as well. Problem solved. (if you have seen my script already, you may need to hit RELOAD on your browser to see the new version) Daniel Nick Schmansky wrote: The script looks good. The one thing it needs though is for the right and left hemi steps to log to separate files, otherwise output to recon- all.log will be interleaved, making debugging impossible. On Thu, 2006-03-16 at 12:15 -0500, Daniel Goldenholz wrote: Ooops. I sent the below with the wrong subject tag. Here it is again: Daniel Goldenholz wrote: Freesurfers I was hoping someone else would do this, but well, it seems that no one did. So I went ahead and made this myself. Amusingly, I don't NEED to reconstruct any brains right now, so I don't have anything to test this out with. Please someone try it, and let me know if it is helpful. What I did was write a script that runs each and every part of the recon-all -all stream, one command at a time. (based on the NEW version 3 stream). Each one is loaded with -waitfor and -notify so that the dependency structure is intact. However, ALL of the commands start running in the background! If you have a 2 more processor system, then recon-all should complete in about HALF the time as it usually does, since all the hemisphere specific stuff can be done in parallel. At the completion of each hemipshere, it will email you. I included a command for each minute step so that people can easily fiddle with options and commands and so forth. Obviously, if you run recon-all -autoreon1, then you can then run my script (after deleting the step1-??.done lines). If you run recon-all -autorecon2, then you can run my script (after deleting the step1-??.done and step2-??.done lines) And so forth. To see the script, go here: http
Re: [Freesurfer] Faster and Parallel recon-all
Nick I completely agree with you. However, I didn't want to edit recon-all itself, since it has this funny tendency to change from time to time. If there is a way to get those logs separated somehow, it would be a good thing. What about redirecting stdout to a hemisphere specific file? Will that cover everything? D Nick Schmansky wrote: The script looks good. The one thing it needs though is for the right and left hemi steps to log to separate files, otherwise output to recon- all.log will be interleaved, making debugging impossible. On Thu, 2006-03-16 at 12:15 -0500, Daniel Goldenholz wrote: Ooops. I sent the below with the wrong subject tag. Here it is again: Daniel Goldenholz wrote: Freesurfers I was hoping someone else would do this, but well, it seems that no one did. So I went ahead and made this myself. Amusingly, I don't NEED to reconstruct any brains right now, so I don't have anything to test this out with. Please someone try it, and let me know if it is helpful. What I did was write a script that runs each and every part of the recon-all -all stream, one command at a time. (based on the NEW version 3 stream). Each one is loaded with -waitfor and -notify so that the dependency structure is intact. However, ALL of the commands start running in the background! If you have a 2 more processor system, then recon-all should complete in about HALF the time as it usually does, since all the hemisphere specific stuff can be done in parallel. At the completion of each hemipshere, it will email you. I included a command for each minute step so that people can easily fiddle with options and commands and so forth. Obviously, if you run recon-all -autoreon1, then you can then run my script (after deleting the step1-??.done lines). If you run recon-all -autorecon2, then you can run my script (after deleting the step1-??.done and step2-??.done lines) And so forth. To see the script, go here: http://www.nmr.mgh.harvard.edu/~daniel click on fMRI scripts click on super-recon Enjoy, and PLEASE email me if you use this. If there are corrections I can easily post them. Daniel -- Daniel Goldenholz - Cell: 617-935-9421 http://people.bu.edu/danielg/ Mavet v'chaim b'yad halashon Life and death are in the hands of language - Proverbs 18:21 ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Re: [Freesurfer] Faster and Parallel recon-all
Ah. Silly me, I didn't notice the -log and -status options. Thanks Nick. I have now included those into my super-recon script as well. Problem solved. (if you have seen my script already, you may need to hit RELOAD on your browser to see the new version) Daniel Nick Schmansky wrote: The script looks good. The one thing it needs though is for the right and left hemi steps to log to separate files, otherwise output to recon- all.log will be interleaved, making debugging impossible. On Thu, 2006-03-16 at 12:15 -0500, Daniel Goldenholz wrote: Ooops. I sent the below with the wrong subject tag. Here it is again: Daniel Goldenholz wrote: Freesurfers I was hoping someone else would do this, but well, it seems that no one did. So I went ahead and made this myself. Amusingly, I don't NEED to reconstruct any brains right now, so I don't have anything to test this out with. Please someone try it, and let me know if it is helpful. What I did was write a script that runs each and every part of the recon-all -all stream, one command at a time. (based on the NEW version 3 stream). Each one is loaded with -waitfor and -notify so that the dependency structure is intact. However, ALL of the commands start running in the background! If you have a 2 more processor system, then recon-all should complete in about HALF the time as it usually does, since all the hemisphere specific stuff can be done in parallel. At the completion of each hemipshere, it will email you. I included a command for each minute step so that people can easily fiddle with options and commands and so forth. Obviously, if you run recon-all -autoreon1, then you can then run my script (after deleting the step1-??.done lines). If you run recon-all -autorecon2, then you can run my script (after deleting the step1-??.done and step2-??.done lines) And so forth. To see the script, go here: http://www.nmr.mgh.harvard.edu/~daniel click on fMRI scripts click on super-recon Enjoy, and PLEASE email me if you use this. If there are corrections I can easily post them. Daniel -- Daniel Goldenholz - Cell: 617-935-9421 http://people.bu.edu/danielg/ Mavet v'chaim b'yad halashon Life and death are in the hands of language - Proverbs 18:21 ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Re: [Freesurfer] Translate label file from average subject to all subjects
Freesurfers I was hoping someone else would do this, but well, it seems that no one did. So I went ahead and made this myself. Amusingly, I don't NEED to reconstruct any brains right now, so I don't have anything to test this out with. Please someone try it, and let me know if it is helpful. What I did was write a script that runs each and every part of the recon-all -all stream, one command at a time. (based on the NEW version 3 stream). Each one is loaded with -waitfor and -notify so that the dependency structure is intact. However, ALL of the commands start running in the background! If you have a 2 more processor system, then recon-all should complete in about HALF the time as it usually does, since all the hemisphere specific stuff can be done in parallel. At the completion of each hemipshere, it will email you. I included a command for each minute step so that people can easily fiddle with options and commands and so forth. Obviously, if you run recon-all -autoreon1, then you can then run my script (after deleting the step1-??.done lines). If you run recon-all -autorecon2, then you can run my script (after deleting the step1-??.done and step2-??.done lines) And so forth. To see the script, go here: http://www.nmr.mgh.harvard.edu/~daniel click on fMRI scripts click on super-recon Enjoy, and PLEASE email me if you use this. If there are corrections I can easily post them. Daniel ___ 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 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 whatever-you-want (where the stuff inside theis 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 -- Daniel Goldenholz - Cell: 617-935-9421 http://people.bu.edu/danielg/ Mavet v'chaim b'yad halashon Life and death are in the hands of language - Proverbs 18:21 ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
[Freesurfer] Multiple warnings and errors in autorecon1
Hi Freesurfers, It has been a long time since I had the pleasure of recon-all'ing anything. Many things have changed. I ran recon-all today (based on the dev installation) and I got all sorts of interesting warnings. Should I care? If so, what should I do? Below are a few selected lines from the huge pile of output from autorecon1... ... $Id: fsl_rigid_register,v 1.13 2006/01/24 19:51:34 greve Exp $ Sun Jan 29 12:44:41 EST 2006 /autofs/space/megraid_043/seder/freesurfer/nmr00036/mri/tmp-mri_motion_correct.fsl-2184/resampled.img Reference is analyze, not converting Input is analyze, not converting Output is analyze, not converting -- /autofs/space/megraid_043/seder/freesurfer/nmr00036 calling eval flirt -in /autofs/space/megraid_043/seder/freesurfer/nmr00036/mri/tmp-mri_motion_correct.fsl-2184/cor-2.hdr -out /autofs/space/megraid_043/seder/freesurfer/nmr00036/mri/tmp-mri_motion_correct.fsl-2184/resampled.hdr -bins 256 -cost corratio -searchrx -90 90 -searchry -90 90 -searchrz -90 90 -interp trilinear -dof 6 -ref /autofs/space/megraid_043/seder/freesurfer/nmr00036/mri/tmp-mri_motion_correct.fsl-2184/cor-1.hdr -omat /autofs/space/megraid_043/seder/freesurfer/nmr00036/mri/tmp-mri_motion_correct.fsl-2184/resampled.fslmat WARNING: Both reference and input images have an sform matrix set The output image will use the sform from the reference image ... mri_convert orig.mgz ./tmp.mri_nu_correct.mni.2831/nu0.mnc Can't find the talairach xform '/autofs/space/megraid_043/seder/freesurfer/nmr00036/mri/transforms/talairach.xfm' Transform is not loaded into mri reading from orig.mgz... Talairach transform /autofs/space/megraid_043/seder/freesurfer/nmr00036/mri/transforms/talairach.xfm does not exist ... ... trying /autofs/space/megraid_043/seder/freesurfer/nmr00036/mri/transforms/talairach.xfm ...which does not exist Iteration 1 Sun Jan 29 12:53:19 EST 2006 nu_correct -clobber ./tmp.mri_nu_correct.mni.2831/nu0.mnc ./tmp.mri_nu_correct.mni.2831/nu1.mnc Not implemented yet in cache_volume_range_has_changed() Mode: atlas analysis VALIDATION*** THE SEGMENTATION IS PROBABLY NOT CORRECT -- Daniel Goldenholz - Cell: 617-935-9421 http://people.bu.edu/danielg/ Mavet v'chaim b'yad halashon Life and death are in the hands of language - Proverbs 18:21 ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
[Freesurfer] Other parcellations
Hi. I was wondering if anybody out there has made other parcellations of the entire brain besides the standard freesurfer one with 81 named regions? For instance, did anybody go to the painful trouble of making a 4 lobe parcellation? Thanks Daniel Goldenholz ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Re: [Freesurfer] Group analysis
Hello. I used paint-sess-new and surf-sess-new, and they opened a nice overlay without trouble. When I selected the configure overlay command from the menu, I get an error - 'error! expression didn't have a numeric value' The details are below. What can I do? expression didn't have numeric value expression didn't have numeric value (processing -coords option) invoked from within $iWidget marker create line -coords [list $gaLinkedVars(fthresh) -Inf $gaLinkedVars(fthresh) Inf] -name thresh -outline red (procedure SetMin line 7) invoked from within SetMin $gbwHisto $gaLinkedVars(fthresh) (procedure DoConfigOverlayDisplayDlog line 222) invoked from within DoConfigOverlayDisplayDlog invoked from within .w.fwMenuBar.mbwView.mw.cmw5 invoke active (uplevel body line 1) invoked from within uplevel #0 [list $w invoke active] (procedure tk::MenuInvoke line 47) invoked from within tk::MenuInvoke .w.fwMenuBar.mbwView.mw.cmw5 1 (command bound to event) Doug Greve wrote: I don't think it will matter. Sunaina Fotedar wrote: Dear all, Would it be feasible to do a group analysis with the present developmental release of freesurfer on the subjects which were individually analyzed on the previous(old) version of freesurfer? In other words, is the Group analysis module of present version sensitive to the version in which the data was preprocessed/ reconstructed ? Thanks Sunaina Fotedar Disclaimer: The materials in this e-mail are private and may contain Protected Health Information. Please note that e-mail is not necessarily confidential or secure. Your use of e-mail constitutes your acknowledgment of these confidentiality and security limitations. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying, distribution, or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender via telephone or return e-mail. ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer -- Daniel Goldenholz - Cell: 617-935-9421 http://people.bu.edu/danielg/ Mavet v'chaim b'yad halashon Life and death are in the hands of language - Proverbs 18:21 ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Re: [Freesurfer] Getting the resolution out
Hi Bruce I am not sure that I have the original dicom files. I did find a file called COR-.info in mri/orig/ This is the filedump... Perhaps this has the answer? imnr0 1 imnr1 256 ptype 2 x 256 y 256 fov 0.256000 thick 0.001000 psiz 0.001000 locatn 0.00 strtx -0.128000 endx 0.128000 strty -0.128000 endy 0.128000 strtz -0.128000 endz 0.128000 tr 0.00 te 0.00 ti 0.00 xform /local_mount/space/linus/7/users/sms/MRI/ips015c/mri/transforms/talairach.xfm ras_good_flag 1 x_ras -1.00 0.00 0.00 y_ras 0.00 0.00 -1.00 z_ras 0.00 1.00 0.00 c_ras -10.110786 29.012054 -11.469879 Bruce Fischl wrote: Hi Daniel, you need to look at your original data (e.g. dicom files). You can mri_info to tell you. Bruce On Tue, 20 Sep 2005, Daniel Goldenholz wrote: Hi. I was handed some data analyzed with freesurfer, and I would like to know what is the exact resolution of the T1 mri, i.e. 1.25mm x 3mm x 2mm for example. Where can I look in the freesurfer folder to find out? Thanks -- Daniel Goldenholz - Cell: 617-935-9421 http://people.bu.edu/danielg/ Mavet v'chaim b'yad halashon Life and death are in the hands of language - Proverbs 18:21 ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Re: [Freesurfer] freesurfer for MEG/EEG source imaging
Hello Zhongming 1. Freesurfer can do this, though it is not perfect. It is my understanding that the best (at least here at the NMR center) BEM segmentations can be obtained when running special pulse sequences called FLASH5 in the MRI to better visualize the skull boundaries. Matti can probably provide additional details. 2. The BEMs outputted are in the appropriate form for EEG/MEG source modeling. 3. The downsampling is a very serious issue that many people have brought up. If you are looking for a first approximation, you will have no problem at all. The freesurfer surfaces can simply be downsampled. However, the spacing between vertices is not uniform. Therefore, downsampling a non-uniformly spaced surface will result in another similarly non-uniformly spaced surface. If you downsample by a large number, you will become acutely aware of the problem. Conversely, if you downsample by a small number, the surface will still look very much like a surface, so perhaps you won't mind. Another possible solution to this problem, which is still not correct but may be closer, would be to establish a set of points that are uniformly distributed around a sphere, and then pick those points from the cortical surface in spherical coordinates. This solution will suffer from distortions inherent in the spherical morph. I have been in touch with the makers of SUMA, who are considering developing an option to prepare correctly down-sampled surface vertices based on surfaces Euclidean distances, and our own Doug Greve (also CCed) has also be considering options within the freesurfer environment. If you consider this issue important enough to solve, and are able to solve it, I encourage you to share it with others, because I have found that a number of people would like the correct solution available to them (myself included). Daniel On Tue, 9 Aug 2005, Zhongming Liu wrote: I am a new user of Freesurfer. My questions are related to the head modeling and MEG/EEG source modeling. 1.Can freesurfer generate the 3-shell boundary element model (BEM): 3 triangulated interfaces of air-scalp, scalp-skull, skull-brain? 2.Is it possible to generate a closed and folded cortical surface after the segmentation on MR images? Freesurfer seems to output two splitted hemispheres of cortex. I am particularly concerning this, because I will use the cortical surface to constrain the MEG/EEG source location and direction. 3.Is it possible to evenly (or nearly evenly) down-sample the vertices of a fine cortical surface into around 6,000 points, onto which the elementary dipole will be placed? Freesurfer generates the cortical surface with a huge number of triangles, which makes it impossible for MEG-based source imaging. Looking forward to your reply. Best regards, Zhongming Liu ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer -- Daniel Goldenholz - Cell: 617-935-9421 http://people.bu.edu/danielg/ Mavet v'chaim b'yad halashon Life and death are in the hands of language - Proverbs 18:21 begin:vcard fn:Daniel Goldenholz n:Goldenholz;Daniel org:Mass General Hospital;MGH/MIT/HMS Martinos Center adr;dom:;;149 13th St.;Charlestown;MA;02129 email;internet:[EMAIL PROTECTED] tel;work:617-726-1223 tel;cell:617-935-9421 x-mozilla-html:FALSE url:http://www.nmr.mgh.harvard.edu/~daniel/ version:2.1 end:vcard ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Re: [Freesurfer] MEG data and ASCII format
Hello Sarah Your easiest bet is to generate .w files. Freesurfer's home directory has a matlab directory, which can read and write .w files. These in turn can be displayed on brain surfaces within the tksurfer environment as an overlay. The down-side is if you want to do time-varying things, you will need to pick either a time point or collapse a series of time points using averaging, maximum value or some other tricks. Good luck Daniel Sarah Rugheimer wrote: Hello, I am trying to display MEG source location data on the surface. Does anybody have detailed information on this? I am looking at page 125 of the FreeSurfer manual and it describes converting from ASCII format to Curvature files, but I have a few questions. Right now, I have the MEG source waveforms and a program to compute the contours of activation through an inverse technique. Is there a specific format of the output for the MEG data? And when I make the ASCII file, what is the starting latency and the vertex index. I have the value and (x,y) coordinates for that value. Is the vertex index related to the coordinates? Thanks, any help is appreciated. Sarah Rugheimer ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer -- Daniel Goldenholz - Cell: 617-935-9421 http://people.bu.edu/danielg/ begin:vcard fn:Daniel Goldenholz n:Goldenholz;Daniel org:Mass General Hospital;MGH/MIT/HMS Martinos Center adr;dom:;;149 13th St.;Charlestown;MA;02129 email;internet:[EMAIL PROTECTED] tel;work:617-726-1223 tel;cell:617-935-9421 x-mozilla-html:FALSE url:http://www.nmr.mgh.harvard.edu/~daniel/ version:2.1 end:vcard ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
[Freesurfer] CSURF bugs and hint
Hi. I would like to report two bugs in CSURF, and also ask for a hint about using it. BUGS: 1. If you save an image to TIFF or RGB, the screen does not redraw itself before saving. Therefore, any menus or windows that might have drawn over the image will get saved into the file. This bug can be easily corrected by automatically redrawing the image in an off screen buffer that cannot be messed up with a intervening menu or window. 2. If you save a RGB file, the default location is the RGB directory. If you save a TIFF file, the default location is the RGB directory, not the TIFF directory. Also easily fixed. HINT Is there a one line command that I can give tksurfer to open a surface AND an overlay (*.w) file? This would save me lots of time because I often open such things... Thanks Daniel begin:vcard fn:Daniel Goldenholz n:Goldenholz;Daniel org:Mass General Hospital;MGH/MIT/HMS Martinos Center adr;dom:;;149 13th St.;Charlestown;MA;02129 email;internet:[EMAIL PROTECTED] tel;work:617-726-1223 tel;cell:617-935-9421 x-mozilla-html:FALSE url:http://www.nmr.mgh.harvard.edu/~daniel/ version:2.1 end:vcard ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
[Freesurfer] Re: remote VNC solution
I was just asked this same question twice in a short time, so I guess that is a sign that others might want to know the answer too. The short version of the question is: How can I get freesurfer to work from a remote VNC setup? The answer is, thanks to a hint from Paul Raines, very simple. When you set up your vncserver, use this command: vncserver.glx instead of the usual vncserver. If you do, then the needed software will be included to draw tksurfer images, and then you can freesurf remotely. Happy surfing! Daniel Tommi Raij wrote: Hi Daniel, I saw from the Freesurfer list that you asked Bruce about a year ago how to use tksurfer scripts from remote VNC. Bruce suggested you use setenv renderoffscreen 1 before running tksurfer, but also said that the function might be broken. I am trying the get some semi-massive visualization scripts to work from the other end of a VNC connection (on a Windows ME system) and cannot make this work, and keep receiving the kind of errors that you apparently encountered: surfer: single buffered window no glx extension! surfer: failed, trying double buffered window Xlib: extension GLX missing on display 1.0. Window type not found! surfer: failed, no suitable display found Were you succesful in making this work, and if so, how? Thanks, Tommi ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
[Freesurfer] Decimation?
Hi. I am going to need a sample of points distributed equally over the cortical surface, with a given spacing between them. I noticed that freesurfer has the capability to do this, but I am wondering HOW it is done, to see if indeed it does what I expect. (tools - decimate) In particular, I would like a surface distance measure of the spacing, not a 3D euclidean distance as a measure of the spacing, or some other measure. I did a little test, and it was strange. I decimated with a distance of 6, and with 10. I then asked matlab to find the minimum distance between vertices for all vertices in the decimated set, and got mean and median values of those. Here is the weird part. For the spacing of 6, the mean and median of the minimum distances were 8 and 9 or so. For the spacing of 10, the mean and median of the min distances were 15 and 13. Realizing that my technique of getting the minimum euclidean distance is WRONG, but it should provide a simple approximation. That is, my measure should be SMALLER than the surface distance measure. Therefore, it doesn't make sense to me that the decimation is doing what I was hoping it does, because for surface spacings of 6, I expect euclidean distances to be less than 6, and for surface spacings of 10, I expect euclidean distances to be less than 10. Thoughts from freesurfing fellows? -- Daniel Goldenholz - Cell: 617-935-9421 http://people.bu.edu/danielg/ ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Re: [Freesurfer] Making a patch of area A
Doug I was thinking of trying something like that. If I took all vertices which are a radius M or less from my centriod, aren't I basically done? (M is defined as the maximum euclidean distance between the centroid on the sphere and the ring of outer vertices. If my surface distance max is called R, I can use some geometry to figure out the relation between R and M) What tweaks would I need to do at the folded surface level? On Tue, 8 Mar 2005, Doug Greve wrote: You might try starting off with the ?h.sphere. It's easy to parameterize these things on the sphere. The sphere, of course, has some metric distortion, but if the patch is small, it might not be to bad. Once you've identified the vertices in the patch (or maybe a slightly bigger patch), then you can refine it in the folded space. doug Daniel Goldenholz wrote: Hi. I have a graph theory question: I would like to make a definition of a particular patch of cortex, that has a centroid at position (x,y,z) and has a total area of A. I thought that this was going to be somewhat hard, but I soon learned that it is very hard. First, I found some code for the Dijkstra algorithm, which can quickly tell me what is the minimum number of jumps needed from one vertex to another. IF the freesurfer surface triangles were all of EXACTLY the same euclidean distances on each side, then this alone could solve my problem. I could simply take all vertices which have a jump distance less than some number. However, because the side lengths of the triangles in a freesurfer surface are NOT the same, I need to get more sophisticated. Ideally, what I would like is the following: If I were an ant, walking along on the surface of the folded brain, I could walk from the centroid in any direction for a certain distance, and still be within my patch. Knowing that distance (radius), I could just use pi*r^2 and call that the area of the patch. But how do I find this idealized patch in real life? Thanks Daniel Goldenholz ___ 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 -- Daniel Goldenholz - Cell: 617-935-9421 http://people.bu.edu/danielg/ ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Re: [Freesurfer] labels to annot files?
Ok. Well I wouldn't mind whipping this up in matlab, but I need to know the format. Daniel On Thu, 22 Jul 2004, Doug Greve wrote: You'd also have to make sure that the labels did not overlap as there is no way to represent this in the annot file. doug Bruce Fischl wrote: no, I don't think so. I guess you'd need a color file as well. It would be pretty easy Bruce On Wed, 21 Jul 2004, Daniel Goldenholz wrote: Is there a command out there that converts a set of labels into an annot file automatically? It would be very useful... ___ Freesurfer mailing list [EMAIL PROTECTED] 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 -- Daniel Goldenholz - Cell: 617-935-9421 http://people.bu.edu/danielg/ ___ Freesurfer mailing list [EMAIL PROTECTED] https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer