Re: [Freesurfer] TkSurfer and new color table. Mislabelling
Hi Pedro, Have a look at this article: http://brainder.org/2011/07/05/freesurfer-brains-in-arbitrary-colours I think this is the same you'd like to do (or you can change some steps easily). Hope it helps! All the best, Anderson On 05/07/12 20:44, Pedro Paulo de Magalhães Oliveira Junior wrote: Doug, I did mri_annotation2label --subject bert --hemi lh --outdir $SUBJECTS_DIR/bert/label mri_annotation2label --subject bert --hemi rh --outdir $SUBJECTS_DIR/bert/label And then mris_label2annot --s bert --hemi lh --ctab $FREESURFER_HOME/FreeSurferColorLUT.txt --l lh.bankssts.label --l lh.caudalmiddlefrontal.label --l lh.entorhinal.label --l lh.paracentral.label --l lh.parstriangularis.label --l lh.postcentral.label --l lh.superiorfrontal.label --l lh.frontalpole.label --l lh.temporalpole.label --a myannot and mris_label2annot --s bert --hemi rh --ctab $FREESURFER_HOME/FreeSurferColorLUT.txt --l rh.bankssts.label --l rh.isthmuscingulate.label --l rh.medialorbitofrontal.label --l rh.parstriangularis.label --l rh.rostralanteriorcingulate.label --l rh.superiorparietal.label --l rh.frontalpole.label --a myannot If this is the right procedure I guess I'll have to modify the existing annot in matlab because all the surface is being labelled as Unknown. Thanks PPJ On Thu, Jul 5, 2012 at 4:01 PM, Douglas N Greve gr...@nmr.mgh.harvard.edu mailto:gr...@nmr.mgh.harvard.edu wrote: You can also break up the annot into labels ( mri_annotation2label) then recombine them with a new color table with mris_label2annot. doug On 07/05/2012 02:57 PM, Bruce Fischl wrote: Hi PPJ, I think the color lut is embedded in the aparc.annot. If you want to change it you have to change the one that's in the .annot. I would do it in matlab. cheers Bruce On Thu, 5 Jul 2012, Pedro Paulo de Magalhães Oliveira Junior wrote: I'm trying to generate an image to a paper and I have to colorize some areas of the cortex with specific colors. I have edited the FreeSurferColorLUT.txt changing the following lines: 1001 ctx-lh-bankssts 255 42 0 0 1003 ctx-lh-caudalmiddlefrontal 255 14 0 0 1006 ctx-lh-entorhinal 255 17 0 0 1017 ctx-lh-paracentral 255 43 0 0 1020 ctx-lh-parstriangularis 255 15 0 0 1022 ctx-lh-postcentral 255 14 0 0 1028 ctx-lh-superiorfrontal 255 79 0 0 1032 ctx-lh-frontalpole 255 17 0 0 1033 ctx-lh-temporalpole 255 14 0 0 2001 ctx-rh-bankssts 255 18 0 0 2010 ctx-rh-isthmuscingulate 255 39 0 0 2014 ctx-rh-medialorbitofrontal 255 60 0 0 2020 ctx-rh-parstriangularis 255 13 0 0 2026 ctx-rh-rostralanteriorcingulate 255 40 0 0 2029 ctx-rh-superiorparietal 255 48 0 0 2032 ctx-rh-frontalpole 255 106 0 0 all other regions are 127 127 127 0 When I load the surface for some case with: tksurfer bert lh pial -annot aparc -ctab FreeSurferColorLUT.txt I get the usual coloring scheme with the labels correct. TkSurfer seems to be ignoring FreeSurferColorLUT.txt, but the labels are placed in the right spots. When I try to manually force the FreeSurferColorLUT.txt I'm visualizing an all grey image. And the surface is completely mislabeled, there is a 4th ventricle in the surface, putamen in the surface, etc. What am I doing wrong? - Pedro Paulo de Magalhães Oliveira Junior Netfilter SpeedComm Telecom-- www.netfilter.com.br http://www.netfilter.com.br -- For mobile: http://itunes.apple.com/br/artist/netfilter/id365306441 ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu mailto:Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer -- Douglas N. Greve, Ph.D. MGH-NMR Center gr...@nmr.mgh.harvard.edu mailto:gr...@nmr.mgh.harvard.edu Phone Number: 617-724-2358 tel:617-724-2358 Fax: 617-726-7422 tel:617-726-7422 Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting FileDrop: www.nmr.mgh.harvard.edu/facility/filedrop/index.html http://www.nmr.mgh.harvard.edu/facility/filedrop/index.html ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu mailto:Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you
Re: [Freesurfer] Volume to surface
Hi Gabriel, This sounds like a problem with downloading. Are you copying and pasting the content of the scripts rather than downloading? Are you copying from a Windows computer? Gawk is just a replacement for awk with a more permissive license and more features. It is the default in Linux and its explicit use only makes a difference for Mac users, who have to get it from MacPorts or Fink. Also, the first script should work with bash. The sh can be ash, dash or even other depending on the system, being all with less features than bash itself. Ubuntu uses dash as sh for instance. Perhaps this one may work with any, but this isn't always the case. All the best! Anderson On 08/05/12 11:23, Gabriel Gonzalez Escamilla wrote: Well now the aseg2srf script is working perfectly, it was a thing of the shell (changed to: #!/bin/sh -f) and the format of the script when I'd downloaded it. Now I'm wanting to use the srf2obj script, and something similar happens, but since it is for gawk I have no idea how to change it or fix it to make it run, it gave me the same error as the last time: [root@localhost] srf2obj aseg_004.srf aseg_4.obj gawk: /root/freesurfer/bin/srf2obj:2: ' invalid on the expressionrfer/bin/srf2obj:2: ^ character ' Regards, Gabriel El 07/05/12, *Anderson Winkler * andersonwink...@hotmail.com escribió: Hi Gabriel, Attached is a script that probably does what you need. Just make it executable and call it without arguments to get usage information. The label indices you can get from the aseg.stats file or from FreeSurferColorLUT.txt. The surfaces will be saved in a subdirectory called ascii inside each subject's directory, and have extension .srf. They are internally the same as the .asc surfaces, just with a different extension. Note that the idea of the script is to generate surfaces for visualization purposes only. If you'd like to do statistical analysis (e.g., compare shapes between patients and controls), these surfaces may not be appropriate. Hope it helps! All the best, Anderson On 07/05/12 12:15, Gabriel Gonzalez Escamilla wrote: Hello all FS users and experts, I'm wanting to get the sub cortical segmentation as ASCII files, so I'm trying convert the aseg.mgz into a surface file, to finally get an ASCII file, For this I'm using the next commands: First: mri_convert -rl rawavg.mgz -rt nearest aseg.mgz aseg2raw.nii To preserve the aseg volume in native space Second: mri_vol2surf --mov aseg2raw.nii --regheader mysubject --hemi lh --o ./lg.aseg2raw.mgh And last: mris_convert lh.aseg2raw.mgh lh.aseg2raw.asc I'm Not sure if I should do this for the whole aseg or if should I try to separate the segmented structures first... Many Thanks in advanced, Gabriel ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.eduFreesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. -- -- PhD. student Gabriel González-Escamilla Laboratory of Functional Neuroscience Department of Physiology, Anatomy, and Cell Biology University Pablo de Olavide Ctra. de Utrera, Km.1 41013 - Seville - Spain - Email: ggon...@upo.es http://www.upo.es/neuroaging/es/ ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
Re: [Freesurfer] Volume to surface
Hi Gabriel, Please, try downloading from here: http://dl.dropbox.com/u/2785709/aseg2srf http://dl.dropbox.com/u/2785709/srf2obj Right-click and click Save As, to avoid Windows opening it up and messing up with character encoding. I'll write up a page about the aseg2srf and send the link later... All the best, Anderson On 08/05/12 14:31, Gabriel Gonzalez Escamilla wrote: Anderson, I'm downloading using a windows computer (but I always do like that with every single script), which automatically recognizes the scripts as txt files and add the extension, could you send me a link to the downloading page? That way I can try again and see what happens. I did check in my Linux distribution and is just as you said, the gawk is the default, so I have no any other idea for this. Regards, Gabriel El 08/05/12, *Anderson Winkler * andersonwink...@hotmail.com escribió: Hi Gabriel, This sounds like a problem with downloading. Are you copying and pasting the content of the scripts rather than downloading? Are you copying from a Windows computer? Gawk is just a replacement for awk with a more permissive license and more features. It is the default in Linux and its explicit use only makes a difference for Mac users, who have to get it from MacPorts or Fink. Also, the first script should work with bash. The sh can be ash, dash or even other depending on the system, being all with less features than bash itself. Ubuntu uses dash as sh for instance. Perhaps this one may work with any, but this isn't always the case. All the best! Anderson On 08/05/12 11:23, Gabriel Gonzalez Escamilla wrote: Well now the aseg2srf script is working perfectly, it was a thing of the shell (changed to: #!/bin/sh -f) and the format of the script when I'd downloaded it. Now I'm wanting to use the srf2obj script, and something similar happens, but since it is for gawk I have no idea how to change it or fix it to make it run, it gave me the same error as the last time: [root@localhost] srf2obj aseg_004.srf aseg_4.obj gawk: /root/freesurfer/bin/srf2obj:2: ' invalid on the expressionrfer/bin/srf2obj:2: ^ character ' Regards, Gabriel El 07/05/12, *Anderson Winkler * andersonwink...@hotmail.com andersonwink...@hotmail.com escribió: Hi Gabriel, Attached is a script that probably does what you need. Just make it executable and call it without arguments to get usage information. The label indices you can get from the aseg.stats file or from FreeSurferColorLUT.txt. The surfaces will be saved in a subdirectory called ascii inside each subject's directory, and have extension .srf. They are internally the same as the .asc surfaces, just with a different extension. Note that the idea of the script is to generate surfaces for visualization purposes only. If you'd like to do statistical analysis (e.g., compare shapes between patients and controls), these surfaces may not be appropriate. Hope it helps! All the best, Anderson On 07/05/12 12:15, Gabriel Gonzalez Escamilla wrote: Hello all FS users and experts, I'm wanting to get the sub cortical segmentation as ASCII files, so I'm trying convert the aseg.mgz into a surface file, to finally get an ASCII file, For this I'm using the next commands: First: mri_convert -rl rawavg.mgz -rt nearest aseg.mgz aseg2raw.nii To preserve the aseg volume in native space Second: mri_vol2surf --mov aseg2raw.nii --regheader mysubject --hemi lh --o ./lg.aseg2raw.mgh And last: mris_convert lh.aseg2raw.mgh lh.aseg2raw.asc I'm Not sure if I should do this for the whole aseg or if should I try to separate the segmented structures first... Many Thanks in advanced, Gabriel ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.eduFreesurfer@nmr.mgh.harvard.edu Freesurfer@nmr.mgh.harvard.edu Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. -- -- PhD. student Gabriel González-Escamilla Laboratory of Functional Neuroscience Department of Physiology, Anatomy, and Cell Biology University Pablo de Olavide Ctra. de Utrera, Km.1 41013 - Seville - Spain - Email: ggon...@upo.es ggon...@upo.es http://www.upo.es/neuroaging/es/ ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.eduFreesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail
Re: [Freesurfer] Volume to surface
ok, just posted... please, see here: http://brainder.org On 08/05/12 15:51, Anderson Winkler wrote: Hi Gabriel, Please, try downloading from here: http://dl.dropbox.com/u/2785709/aseg2srf http://dl.dropbox.com/u/2785709/srf2obj Right-click and click Save As, to avoid Windows opening it up and messing up with character encoding. I'll write up a page about the aseg2srf and send the link later... All the best, Anderson On 08/05/12 14:31, Gabriel Gonzalez Escamilla wrote: Anderson, I'm downloading using a windows computer (but I always do like that with every single script), which automatically recognizes the scripts as txt files and add the extension, could you send me a link to the downloading page? That way I can try again and see what happens. I did check in my Linux distribution and is just as you said, the gawk is the default, so I have no any other idea for this. Regards, Gabriel El 08/05/12, *Anderson Winkler * andersonwink...@hotmail.com escribió: Hi Gabriel, This sounds like a problem with downloading. Are you copying and pasting the content of the scripts rather than downloading? Are you copying from a Windows computer? Gawk is just a replacement for awk with a more permissive license and more features. It is the default in Linux and its explicit use only makes a difference for Mac users, who have to get it from MacPorts or Fink. Also, the first script should work with bash. The sh can be ash, dash or even other depending on the system, being all with less features than bash itself. Ubuntu uses dash as sh for instance. Perhaps this one may work with any, but this isn't always the case. All the best! Anderson On 08/05/12 11:23, Gabriel Gonzalez Escamilla wrote: Well now the aseg2srf script is working perfectly, it was a thing of the shell (changed to: #!/bin/sh -f) and the format of the script when I'd downloaded it. Now I'm wanting to use the srf2obj script, and something similar happens, but since it is for gawk I have no idea how to change it or fix it to make it run, it gave me the same error as the last time: [root@localhost] srf2obj aseg_004.srf aseg_4.obj gawk: /root/freesurfer/bin/srf2obj:2: ' invalid on the expressionrfer/bin/srf2obj:2: ^ character ' Regards, Gabriel El 07/05/12, *Anderson Winkler * andersonwink...@hotmail.com andersonwink...@hotmail.com escribió: Hi Gabriel, Attached is a script that probably does what you need. Just make it executable and call it without arguments to get usage information. The label indices you can get from the aseg.stats file or from FreeSurferColorLUT.txt. The surfaces will be saved in a subdirectory called ascii inside each subject's directory, and have extension .srf. They are internally the same as the .asc surfaces, just with a different extension. Note that the idea of the script is to generate surfaces for visualization purposes only. If you'd like to do statistical analysis (e.g., compare shapes between patients and controls), these surfaces may not be appropriate. Hope it helps! All the best, Anderson On 07/05/12 12:15, Gabriel Gonzalez Escamilla wrote: Hello all FS users and experts, I'm wanting to get the sub cortical segmentation as ASCII files, so I'm trying convert the aseg.mgz into a surface file, to finally get an ASCII file, For this I'm using the next commands: First: mri_convert -rl rawavg.mgz -rt nearest aseg.mgz aseg2raw.nii To preserve the aseg volume in native space Second: mri_vol2surf --mov aseg2raw.nii --regheader mysubject --hemi lh --o ./lg.aseg2raw.mgh And last: mris_convert lh.aseg2raw.mgh lh.aseg2raw.asc I'm Not sure if I should do this for the whole aseg or if should I try to separate the segmented structures first... Many Thanks in advanced, Gabriel ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu Freesurfer@nmr.mgh.harvard.edu Freesurfer@nmr.mgh.harvard.edu Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. -- -- PhD. student Gabriel González-Escamilla Laboratory of Functional Neuroscience Department of Physiology, Anatomy, and Cell Biology University Pablo de Olavide Ctra. de Utrera, Km.1 41013 - Seville - Spain - Email: ggon...@upo.es ggon...@upo.es http://www.upo.es/neuroaging/es/ ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Re: [Freesurfer] Volume to surface
Hi Gabriel, Attached is a script that probably does what you need. Just make it executable and call it without arguments to get usage information. The label indices you can get from the aseg.stats file or from FreeSurferColorLUT.txt. The surfaces will be saved in a subdirectory called ascii inside each subject's directory, and have extension .srf. They are internally the same as the .asc surfaces, just with a different extension. Note that the idea of the script is to generate surfaces for visualization purposes only. If you'd like to do statistical analysis (e.g., compare shapes between patients and controls), these surfaces may not be appropriate. Hope it helps! All the best, Anderson On 07/05/12 12:15, Gabriel Gonzalez Escamilla wrote: Hello all FS users and experts, I'm wanting to get the sub cortical segmentation as ASCII files, so I'm trying convert the aseg.mgz into a surface file, to finally get an ASCII file, For this I'm using the next commands: First: mri_convert -rl rawavg.mgz -rt nearest aseg.mgz aseg2raw.nii To preserve the aseg volume in native space Second: mri_vol2surf --mov aseg2raw.nii --regheader mysubject --hemi lh --o ./lg.aseg2raw.mgh And last: mris_convert lh.aseg2raw.mgh lh.aseg2raw.asc I'm Not sure if I should do this for the whole aseg or if should I try to separate the segmented structures first... Many Thanks in advanced, Gabriel ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. #!/bin/bash # Print usage if no argument is given if [ -z $1 ]; then cat EOU Generate surfaces for the subcortical structures segmented with FreeSurfer. Usage: sub2srf -s list of subjects [-l list of labels] [-d] Options: -s list : Specify a list of subjects between quotes, e.g. -s john bill mary mark or a text file containing one subject per line. -l list : Specify a list of labels between quotes, e.g. 10 11 14 52 253, or a text file containing one label per line, or ignore this option to convert all labels. -d Debug mode. Leave all temporary files. Requirements: FreeSurfer must have been configured and the variables FREESURFER_HOME and SUBJECTS_DIR must have been correctly set. _ Anderson M. Winkler Institute of Living / Yale University Jul/2009 EOU exit fi # List of labels to be converted if no list is specified LABLIST=4 5 7 8 10 11 12 13 14 15 16 17 18 26 28 43 44 46 47 49 50 51 52 53 54 58 60 251 252 253 254 255 # Check and accept arguments SBJLIST= DEBUG=N while getopts 's:l:d' OPTION do case ${OPTION} in s) SBJLIST=$( [[ -f ${OPTARG} ]] cat ${OPTARG} || echo ${OPTARG} ) ;; l) LABLIST=$( [[ -f ${OPTARG} ]] cat ${OPTARG} || echo ${OPTARG} ) ;; d) DEBUG=Y ;; esac done # Prepare a random string to save temporary files RND0=$(head -n 1 /dev/random | md5sum) RNDSTR=${RND0:0:12} # Define a function for Ctrl+C as soon as the RNDSTR is defined trap bashtrap INT bashtrap() { break ; break [[ ${s} != ]] rm -rf ${SUBJECTS_DIR}/${s}/tmp/${RNDSTR} # try to delete temp files exit 1 } # For each subject for s in ${SBJLIST} ; do # Create directories for temp files and results mkdir -p ${SUBJECTS_DIR}/${s}/tmp/${RNDSTR} mkdir -p ${SUBJECTS_DIR}/${s}/ascii # For each label for lab in ${LABLIST} ; do # Label string lab0=$(printf %03d ${lab}) # Pre-tessellate echo == Pre-tessellating: ${s}, ${lab0} ${FREESURFER_HOME}/bin/mri_pretess \ ${SUBJECTS_DIR}/${s}/mri/aseg.mgz ${lab} \ ${SUBJECTS_DIR}/${s}/mri/norm.mgz \ ${SUBJECTS_DIR}/${s}/tmp/${RNDSTR}/aseg_${lab0}_filled.mgz # Tessellate echo == Tessellating: ${s}, ${lab0} ${FREESURFER_HOME}/bin/mri_tessellate \ ${SUBJECTS_DIR}/${s}/tmp/${RNDSTR}/aseg_${lab0}_filled.mgz \ ${lab} ${SUBJECTS_DIR}/${s}/tmp/${RNDSTR}/aseg_${lab0}_notsmooth # Smooth echo == Smoothing: ${s}, ${lab0} ${FREESURFER_HOME}/bin/mris_smooth -nw \ ${SUBJECTS_DIR}/${s}/tmp/${RNDSTR}/aseg_${lab0}_notsmooth \ ${SUBJECTS_DIR}/${s}/tmp/${RNDSTR}/aseg_${lab0} # Convert to ASCII echo == Converting to ASCII: ${s}, ${lab0} ${FREESURFER_HOME}/bin/mris_convert \ ${SUBJECTS_DIR}/${s}/tmp/${RNDSTR}/aseg_${lab0} \ ${SUBJECTS_DIR}/${s}/tmp/${RNDSTR}/aseg_${lab0}.asc mv ${SUBJECTS_DIR}/${s}/tmp/${RNDSTR}/aseg_${lab0}.asc \
Re: [Freesurfer] OBJ conversion
Hi Gabriel, Once you have the surface in FS binary format (native format), the command to convert to surface ASCII I believe is mris_convert. Not sure if mri_convert will work as I think that is for volumes. With the surface ASCII in hands, then run: /srf2obj surface.asc surface.obj/ Note that the symbol is needed to redirect the converted result to a new file. Hope this helps! All the best, Anderson On 03/05/12 10:16, Gabriel Gonzalez Escamilla wrote: Dear Anderson, I have seen this message and I'm currently trying to use your script srf2obj to convert to obj format some surfaces created by FS, firstly i did convert the aseg into a volume in the native space using mri_convert, after that, i'd transform the aseg volume into a surface mgh format (mri_vol2surf), then store the surface as ascii by using mri_convert then I'm using your script to convert that surface to an object file but always renturns the following error: aplication srf2obj gawk: /root/trabajo/freesurfer/bin/srf2obj:2: ' inválido en la expresiónrfer/bin/srf2obj:2: ^ caracter ' I'm working under centOS 4.3 Best Regards, Gabriel El 22/02/12, *Anderson Winkler * andersonwink...@hotmail.com escribió: Hi Darshan, If you'd like to go directly from FreeSurfer .asc to OBJ, the attached little script should do the trick... Hope it helps! All the best, Anderson On 21/02/12 16:59, Pedro Paulo de Magalhães Oliveira Junior wrote: There's a how-to in the FreeSurfer website: http://surfer.nmr.mgh.harvard.edu/fswiki/HowTo/HowTo Pedro Paulo Jr. On Mon, Feb 20, 2012 at 23:32, Manfred G Kitzbichler manfr...@nmr.mgh.harvard.edu manfr...@nmr.mgh.harvard.edu wrote: Hi Darshan, as Bruce suggested, you can use mris_convert to get an STL file which you can import into Blender or MeshLab. Both write Wavefront OBJ files. - Manfred On 02/20/2012 07:24 PM, Darshan P wrote: Hello all, I was wondering if I can convert the surface outputs to an OBJ mesh file format . Since most of the applications are in windows I was hoping if there is conversion tool to do this . Regards Darshan ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.eduFreesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer -- Manfred G. Kitzbichler https://www.nmr.mgh.harvard.edu/martinos/people/showPerson.php?people_id=1377, Research Fellow Harvard Medical School Mass General Hospital Martinos Center for Biomedical Imaging 149 Thirteenth Street, Rm 10.018 Charlestown, MA 02129, USA ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.eduFreesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. -- -- PhD. student Gabriel González-Escamilla Laboratory of Functional Neuroscience Department of Physiology, Anatomy, and Cell Biology University Pablo de Olavide Ctra. de Utrera, Km.1 41013 - Seville - Spain - Email: ggon...@upo.es http://www.upo.es/neuroaging/es/ ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https
Re: [Freesurfer] Vertex wise analysis and area/pial area/volume interpretation
Hi Mahinda, For question 1, if you use the new mris_preproc, as described here: http://www.mail-archive.com/freesurfer@nmr.mgh.harvard.edu/msg19821.html then yes, you are safe in computing the areas for each vertex. We have a recent paper that discuss current matters on pointwise area stuff, and that may answer your questions. Please, have a look here: http://www.sciencedirect.com/science/article/pii/S1053811912002996 All the best, Anderson On 02/05/12 02:02, Mahinda Yogarajah wrote: Hi Doug, Thanks for the swift answer to the earlier questions - can I clairfy some things: 1) Am I safe to use (and attempt to interpret) area/volume in a vertex wise analysis (as opposed to an ROI based analysis) using the basic concept you describe below - I have read on the forums about problems with regard to this - some have mentioned using areal instead area and others have mentioned the lack of jacobian modulation' for volume calculations - what is the current thinking on these issues ... 2) With regard to visualisation of monte carlo simulation output - I made a mistake in my last post - when I visualise in qdec I highlight the mc-z file, and set the threshold to 1.3 which I believe is the default setting for the cluster wise p value - am I right in thinking that the threshold selected in the monte carlo box in qdec is the vertex-wise threshold ? I checked again when I click on find clusters and go to max and the table generated is slightly different to that output from the monte carlo run button as shown below - could you explain what the difference is ... Thanks. Mahinda Output from Monte Carlo run: ClusterNoMaxVtxMaxSize(mm^2)TalXTalYTalZCWPCWPLowCWPHiNVtxsAnnot 1-4.615105901851.87-20.7-20.357.40.005500.004600.006502195precentral 2-3.48264220584.30-40.445.5-10.60.047900.045200.05060942parsorbitalis Output from Find clusters and go to max Generating cluster stats using min threshold of 1.3... Found 2 clusters Contrast: 'lh-Diff-Patient-Control-Cor-thickness-age', 15fwhm, DOF: 34 ClusterNoMaxVtxMaxSize(mm2)TalXTalYTalZ NVtxs Annotation --- - -- 1-2.259647851.87-22.0-29.552.2 2195precentral 2-1.319724584.30-38.150.0-3.4942rostralmiddlefrontal On 04/28/2012 09:45 PM, Mahinda Yogarajah wrote: Dear Experts, I had 2 questions with regard to vertex wise analysis using qdec. 1) How should one interpret the dependent variables area/pial area and volume when comparing 2 groups with qdec and a vertex wise (as opposed to ROI based) analysis - or are they uninterpretable in this context ? I read briefly about areal as an alternative measure - could someone explain the difference, and how thickness, volume and area related to one another ? volume = area * thickness. The area of a vertex is the average of the triangles that surround it. For a group analysis, you can think of it as drawing a small circle around a vertex in fsaverage space and asking how big that circle is in each individual subject. 2) When running monte-carlo cluster wise multiple correction in qdec - if one finds a significant cluster is it ok to view them within qdec by highlighting the mc-z ... file in the analysis result box, and then changing the minimum threshold to whatever value one selected for the monte carlo simulation ? No, the mc-z output has values equal to the cluster-wise p-value, so it is not appropriate to apply the vertex-wise threshold. The reason I ask is that the text ouput given by the monte carlo cluster analysis gives different coorinates in the cluster table to that output given when one clicks on the find clusters and go to max button ... Are you using the abs when you do the clustering? Is is possible that it found a negative peak in the table but qdec goes to the positive peak? Thanks. Mahinda ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at
Re: [Freesurfer] Cortical Normalization Questions
Hi Jorge, The global measurement enters in the model as a nuisance, not as an effect of interest. Even if the estimator is inconsistent, it is still useful as such. About which is noisier, it turns out that in general, the bigger the structure, the less measurement noise is present. From the structural measurements we use, the global ones are certainly those with higher SNR, including brain volumes, average cortical thickness and total area -- even if, e.g. brain volume is based on a single measurement rather than on some sort of average. All the best, Anderson On 27/03/12 01:50, jorge luis wrote: I think we must be careful about including noisy large scale measurements as global nuisance covariates in the General Linear Model (GLM). The GLM assumes that the independent variables are measured almost without error (eg. see http://en.wikipedia.org/wiki/Errors-in-variables_models). For instance, mean cortical thickness or mean global activity in fMRI (as the mean of many values) should not be as noisy as Intracranial Volume estimates (or the estimated volume of any neuroanatomical structure). -Jorge *De:* Anderson Winkler andersonwink...@hotmail.com *Para:* freesurfer@nmr.mgh.harvard.edu *Enviado:* Lunes 26 de marzo de 2012 13:56 *Asunto:* Re: [Freesurfer] Cortical Normalization Questions Hi Jeff and all, For normalization (i.e., divide the measurement under study by some global measurement), I would not argue favourably, as this procedure can bias the results in the opposite direction if a global effect is present. Instead, include it as a covariate is not as harmful. My suggestion is, when there is no clear approach about using or not a global measurement as a nuisance, the relationships between the measurement under study, the independent variable, and the putative nuisance should be calculated, and models with and without the nuisance should be analysed and presented. The discussion should consider both analyses together, and enough information should be presented so that the final interpretation is left to the reader. Specifically for area, I suggest analysing and presenting two models: (1) without any global measurement and (2) with global area as nuisance. If brain volume (whichever way it is measured) is to be considered a potential nuisance for the disorder you are analysing, it can be included in the model #2 above, even given that they are not orthogonal to each other, and are related to global area. Non-orthogonality between the nuisance variables is not a problem as it is when effects of interest are involved. Hope this helps! All the best, Anderson On 23/03/12 11:29, Michael Harms wrote: Our reply to that is here http://bjp.rcpsych.org/content/196/5/414.2.long which reminded me of other papers that have also used a global thickness measure to covary for mean cortical thickness and thereby address whether any regional thickness differences were in excess of global cortical thickness differences between groups -- see references [1,4] in our Reply. cheers, -MH Hi Michael and others, maybe it's this one: http://bjp.rcpsych.org/content/196/5/414.1.long best, -joost On Fri, Mar 23, 2012 at 2:15 AM, Michael Harms mha...@conte.wustl.edu mailto:mha...@conte.wustl.eduwrote: Hi Jeff, I personally like the idea of using average thickness as a covariate to control for a reduction in whole brain thickness, and have used that approach in a paper. If the Abstract that you mentioned indicated that this is flawed, I'd be curious to know what the reason was... cheers, -MH On Thu, 2012-03-22 at 21:00 -0400, Bruce Fischl wrote: Hi Jeff yes, I think this is still our recommendation for thickness, although perhaps David Salat can verify. As far as surface area, you might get Anderson Winkler to send you a preprint of his newly accepted paper on surface area comparisons and how to do them properly. I would have said normalize by the 2/3 root of ICV (maybe David can comment on this as well) cheers Bruce On Thu, 22 Mar 2012, Jeff Sadino wrote
Re: [Freesurfer] Cortical Normalization Questions
Hi Jeff and all, For normalization (i.e., divide the measurement under study by some global measurement), I would not argue favourably, as this procedure can bias the results in the opposite direction if a global effect is present. Instead, include it as a covariate is not as harmful. My suggestion is, when there is no clear approach about using or not a global measurement as a nuisance, the relationships between the measurement under study, the independent variable, and the putative nuisance should be calculated, and models with and without the nuisance should be analysed and presented. The discussion should consider both analyses together, and enough information should be presented so that the final interpretation is left to the reader. Specifically for area, I suggest analysing and presenting two models: (1) without any global measurement and (2) with global area as nuisance. If brain volume (whichever way it is measured) is to be considered a potential nuisance for the disorder you are analysing, it can be included in the model #2 above, even given that they are not orthogonal to each other, and are related to global area. Non-orthogonality between the nuisance variables is not a problem as it is when effects of interest are involved. Hope this helps! All the best, Anderson On 23/03/12 11:29, Michael Harms wrote: Our reply to that is here http://bjp.rcpsych.org/content/196/5/414.2.long which reminded me of other papers that have also used a global thickness measure to covary for mean cortical thickness and thereby address whether any regional thickness differences were in excess of global cortical thickness differences between groups -- see references [1,4] in our Reply. cheers, -MH Hi Michael and others, maybe it's this one: http://bjp.rcpsych.org/content/196/5/414.1.long best, -joost On Fri, Mar 23, 2012 at 2:15 AM, Michael Harms mha...@conte.wustl.eduwrote: Hi Jeff, I personally like the idea of using average thickness as a covariate to control for a reduction in whole brain thickness, and have used that approach in a paper. If the Abstract that you mentioned indicated that this is flawed, I'd be curious to know what the reason was... cheers, -MH On Thu, 2012-03-22 at 21:00 -0400, Bruce Fischl wrote: Hi Jeff yes, I think this is still our recommendation for thickness, although perhaps David Salat can verify. As far as surface area, you might get Anderson Winkler to send you a preprint of his newly accepted paper on surface area comparisons and how to do them properly. I would have said normalize by the 2/3 root of ICV (maybe David can comment on this as well) cheers Bruce On Thu, 22 Mar 2012, Jeff Sadino wrote: Hello, For cortical thickness normalizations, Bruce said not to normalize based on a HBM abstract ( http://www.mail-archive.com/freesurfer@nmr.mgh.harvard.edu/msg06646.html). Is this still the consensus? For cortical volume, it is pretty standard to normalize to eTIV. For cortical surface area (jacobian), I couldn't find any information on the wiki. Does anyone have any recommendations? Thank you, Jeff ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. ___ 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 mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Re: [Freesurfer] OBJ conversion
Hi Darshan, If you'd like to go directly from FreeSurfer .asc to OBJ, the attached little script should do the trick... Hope it helps! All the best, Anderson On 21/02/12 16:59, Pedro Paulo de Magalhães Oliveira Junior wrote: There's a how-to in the FreeSurfer website: http://surfer.nmr.mgh.harvard.edu/fswiki/HowTo/HowTo Pedro Paulo Jr. On Mon, Feb 20, 2012 at 23:32, Manfred G Kitzbichler manfr...@nmr.mgh.harvard.edu mailto:manfr...@nmr.mgh.harvard.edu wrote: Hi Darshan, as Bruce suggested, you can use mris_convert to get an STL file which you can import into Blender or MeshLab. Both write Wavefront OBJ files. - Manfred On 02/20/2012 07:24 PM, Darshan P wrote: Hello all, I was wondering if I can convert the surface outputs to an OBJ mesh file format . Since most of the applications are in windows I was hoping if there is conversion tool to do this . Regards Darshan ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu mailto:Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer -- Manfred G. Kitzbichler https://www.nmr.mgh.harvard.edu/martinos/people/showPerson.php?people_id=1377, Research Fellow Harvard Medical School Mass General Hospital Martinos Center for Biomedical Imaging 149 Thirteenth Street, Rm 10.018 Charlestown, MA 02129, USA ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu mailto:Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. #!/bin/gawk -f BEGIN { if (ARGV[1] == ) { print Convert Surface ASCII format to OBJ. print print Usage: print srf2obj input.srfoutput.obj print print The output goes to stdout. Use to redirect to print a file, as shown above print print _ print Anderson M. Winkler print Yale University / Institute of Living print Jan/2010 exit } } # Count number of vertices and faces from the 2nd record NR == 2 { nV=$1 ; nF=$2 } # Print vertex coordinates NR=3 NR=nV+2 { print v, $1, $2, $3} # Print faces' vertex indices NR=nV+3 NR=nV+nF+2 { print f, $1+1, $2+1, $3+1 } ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
Re: [Freesurfer] mris_convert exporting parcellation per vertex
Ah Pedro, Se era isso que você precisava, poderia ter falado. Eu tenho isso pronto, que pode ser chamado via linha de comandos. Foi usado no paper que vc deve ter visto... Abração, Anderson On 15/10/11 13:09, Pedro Paulo de Magalhães Oliveira Junior wrote: Michael, Thanks for the hint. Here's a program that converts the surface + annotation in a Stanford PLY Object file # Create ply # Stanford Object format from surfer import io as io_ surface = io_.read_geometry ('/Applications/freesurfer/subjects/bert/surf/lh.pial') labels = io_.read_annot ('/Applications/freesurfer/subjects/bert/label/lh.aparc.annot') facenum = len(surface[1]) vertnum = len(surface[0]) print ply print format ascii 1.0 print comment VCGLIB generated print element vertex %d%vertnum print property float x print property float y print property float z #print property int flags print property uchar red print property uchar green print property uchar blue print property uchar alpha print element face %d%facenum print property list uchar int vertex_indices print end_header for i in xrange(vertnum): vert = surface[0][i]; color = labels[1][labels[0][i]] print %f %f %f %d %d %d %d%(vert[0],vert[1],vert[2],color[0],color[1],color[2],color[3]) for i in xrange(facenum): face = surface[1][i] print 3 %d %d %d%(face[0],face[1],face[2]) 2011/10/9 Michael Waskom mwas...@stanford.edu mailto:mwas...@stanford.edu If you know Python, you can likely do this pretty easily with tools from the PySurfer package: http://pysurfer.github.com/ (Check out surfer.io.read_annotation). If you're just using the io routines, you won't need the somewhat heavy Mayavi visualization dependencies. You should be able to read in and manipulate surfaces/annotations just with numpy. Best, Michael 2011/10/8 Bruce Fischl fis...@nmr.mgh.harvard.edu mailto:fis...@nmr.mgh.harvard.edu it wouldn't be that hard to put something together if you want to avoid matlab. Spec out what you need and send me a sample, maybe on Bert Bruce On Sat, 8 Oct 2011, Pedro Paulo de Magalhães Oliveira Junior wrote: Thanks. I suppose I can't do this without matlab. Right? -- iOS 5.0 Em 08/10/2011, às 19:29, Bruce Fischl fis...@nmr.mgh.harvard.edu mailto:fis...@nmr.mgh.harvard.edu escreveu: there is a write_annotation.m file you can use On Sat, 8 Oct 2011, Anderson Winkler wrote: ops, it seems the comments inside the dpxwrite.m no longer reflect what it does. You probably don't need this, but anyway, the version attached is more up-to-date. Anderson On 08/10/11 17:28, Anderson Winkler wrote: Hi Pedro, There is probably a way to do that using FS tools from the command line, but the attached script should do the same. The result is a data-per-vertex file, which is the same as the .asc files from mris_convert. There is no geometry input, hence the vertex coordinates are all set to (0,0,0). Hope it helps! All the best, Anderson On 08/10/11 17:17, Pedro Paulo de Magalh�es Oliveira Junior wrote: I need to create a file where I have the parcellation value (structure name) per vertex. I've tried�mris_convert --annot /Applications/freesurfer/subjects/bert/label/lh.aparc.annot /Applications/freesurfer/subjects/bert/surf/lh.pial parc.asc But I get the error:�ERROR: unknown file annot file type specified for output: saida.asc Has someone done this before? Thanks - Pedro Paulo de Magalh�es Oliveira Junior Netfilter SpeedComm Telecom -- www.netfilter.com.br http://www.netfilter.com.br -- For mobile:�http://itunes.apple.com/br/artist/netfilter/id365306441 ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu mailto:Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom
Re: [Freesurfer] mris_convert exporting parcellation per vertex
oops, sorry list, this was supposed to go to Pedro... On 15/10/11 17:39, Anderson Winkler wrote: Ah Pedro, Se era isso que você precisava, poderia ter falado. Eu tenho isso pronto, que pode ser chamado via linha de comandos. Foi usado no paper que vc deve ter visto... Abração, Anderson On 15/10/11 13:09, Pedro Paulo de Magalhães Oliveira Junior wrote: Michael, Thanks for the hint. Here's a program that converts the surface + annotation in a Stanford PLY Object file # Create ply # Stanford Object format from surfer import io as io_ surface = io_.read_geometry ('/Applications/freesurfer/subjects/bert/surf/lh.pial') labels = io_.read_annot ('/Applications/freesurfer/subjects/bert/label/lh.aparc.annot') facenum = len(surface[1]) vertnum = len(surface[0]) print ply print format ascii 1.0 print comment VCGLIB generated print element vertex %d%vertnum print property float x print property float y print property float z #print property int flags print property uchar red print property uchar green print property uchar blue print property uchar alpha print element face %d%facenum print property list uchar int vertex_indices print end_header for i in xrange(vertnum): vert = surface[0][i]; color = labels[1][labels[0][i]] print %f %f %f %d %d %d %d%(vert[0],vert[1],vert[2],color[0],color[1],color[2],color[3]) for i in xrange(facenum): face = surface[1][i] print 3 %d %d %d%(face[0],face[1],face[2]) 2011/10/9 Michael Waskom mwas...@stanford.edu mailto:mwas...@stanford.edu If you know Python, you can likely do this pretty easily with tools from the PySurfer package: http://pysurfer.github.com/ (Check out surfer.io.read_annotation). If you're just using the io routines, you won't need the somewhat heavy Mayavi visualization dependencies. You should be able to read in and manipulate surfaces/annotations just with numpy. Best, Michael 2011/10/8 Bruce Fischl fis...@nmr.mgh.harvard.edu mailto:fis...@nmr.mgh.harvard.edu it wouldn't be that hard to put something together if you want to avoid matlab. Spec out what you need and send me a sample, maybe on Bert Bruce On Sat, 8 Oct 2011, Pedro Paulo de Magalhães Oliveira Junior wrote: Thanks. I suppose I can't do this without matlab. Right? -- iOS 5.0 Em 08/10/2011, às 19:29, Bruce Fischl fis...@nmr.mgh.harvard.edu mailto:fis...@nmr.mgh.harvard.edu escreveu: there is a write_annotation.m file you can use On Sat, 8 Oct 2011, Anderson Winkler wrote: ops, it seems the comments inside the dpxwrite.m no longer reflect what it does. You probably don't need this, but anyway, the version attached is more up-to-date. Anderson On 08/10/11 17:28, Anderson Winkler wrote: Hi Pedro, There is probably a way to do that using FS tools from the command line, but the attached script should do the same. The result is a data-per-vertex file, which is the same as the .asc files from mris_convert. There is no geometry input, hence the vertex coordinates are all set to (0,0,0). Hope it helps! All the best, Anderson On 08/10/11 17:17, Pedro Paulo de Magalh�es Oliveira Junior wrote: I need to create a file where I have the parcellation value (structure name) per vertex. I've tried�mris_convert --annot /Applications/freesurfer/subjects/bert/label/lh.aparc.annot /Applications/freesurfer/subjects/bert/surf/lh.pial parc.asc But I get the error:�ERROR: unknown file annot file type specified for output: saida.asc Has someone done this before? Thanks - Pedro Paulo de Magalh�es Oliveira Junior Netfilter SpeedComm Telecom -- www.netfilter.com.br http://www.netfilter.com.br -- For mobile:�http://itunes.apple.com/br/artist/netfilter/id365306441 ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu mailto:Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Re: [Freesurfer] mris_convert exporting parcellation per vertex
Hi Pedro, There is probably a way to do that using FS tools from the command line, but the attached script should do the same. The result is a data-per-vertex file, which is the same as the .asc files from mris_convert. There is no geometry input, hence the vertex coordinates are all set to (0,0,0). Hope it helps! All the best, Anderson On 08/10/11 17:17, Pedro Paulo de Magalhães Oliveira Junior wrote: I need to create a file where I have the parcellation value (structure name) per vertex. I've tried mris_convert --annot /Applications/freesurfer/subjects/bert/label/lh.aparc.annot /Applications/freesurfer/subjects/bert/surf/lh.pial parc.asc But I get the error: ERROR: unknown file annot file type specified for output: saida.asc Has someone done this before? Thanks - Pedro Paulo de Magalhães Oliveira Junior Netfilter SpeedComm Telecom -- www.netfilter.com.br http://www.netfilter.com.br -- For mobile: http://itunes.apple.com/br/artist/netfilter/id365306441 ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. function annot2dpv(annotfile,dpvfile) % Convert an annotation file to a DPV file. % % Usage: % annot2dpv(annotfile,dpvfile) % % Inputs: % annotfile : Annotation file. % dpvfile : Output DPV file. % % Before running, be sure that ${FREESURFER_HOME}/matlab is in your % OCTAVE/MATLAB path. % % _ % Anderson M. Winkler % Yale University / Institute of Living % Aug/2011 % Read the annotation file [vtx,lab,ctab] = read_annotation(annotfile); % For each structure, replace its coded colour by its index for s = 1:ctab.numEntries, lab(lab==ctab.table(s,5)) = s; end % Save the result dpxwrite(dpvfile,lab) function crvwrite(varargin) % Write a curvature file (DPV or DPF), in ASCII format. % This function is much faster than 'dlmread' for large files, % and works only in Linux and Mac. % % crvwrite(filename,crv) % crvwrite(filename,crv,crd,idx) % % - fname is the file name to be created % - crv contains the values for each vertex or face % - crd contains the vertex coordinates or face indices % - idx contains vertex or face sequential index % % _ % Anderson M. Winkler % Yale University / Institute of Living % Aug/2011 % File name fname = varargin{1}; % Get the actual data crv = varargin{2}(:); nX = numel(crv); % Check if all are integers and use appropriate formating if all(mod(crv,1)==0), fstr = '%d'; else fstr = '%f'; end if nargin == 2, % Organise the data, fill the coords with zeros amd prep to save crv = [(0:nX-1) ; zeros(3,nX) ; crv']; elseif nargin == 4, % Organise the coords crd = varargin{3}; if size(crd,1) size(crd,2), crd = crd'; end % Take the indices idx = varargin{4}(:); % Prepare to save crv = [idx' ; crd ; crv']; else error('Incorrect number of arguments'); end % Save fid = fopen(fname,'w'); fprintf(fid,['%d %g %g %g ' fstr ' \n'],crv); fclose(fid); ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
Re: [Freesurfer] mris_convert exporting parcellation per vertex
ops, it seems the comments inside the dpxwrite.m no longer reflect what it does. You probably don't need this, but anyway, the version attached is more up-to-date. Anderson On 08/10/11 17:28, Anderson Winkler wrote: Hi Pedro, There is probably a way to do that using FS tools from the command line, but the attached script should do the same. The result is a data-per-vertex file, which is the same as the .asc files from mris_convert. There is no geometry input, hence the vertex coordinates are all set to (0,0,0). Hope it helps! All the best, Anderson On 08/10/11 17:17, Pedro Paulo de Magalhães Oliveira Junior wrote: I need to create a file where I have the parcellation value (structure name) per vertex. I've tried mris_convert --annot /Applications/freesurfer/subjects/bert/label/lh.aparc.annot /Applications/freesurfer/subjects/bert/surf/lh.pial parc.asc But I get the error: ERROR: unknown file annot file type specified for output: saida.asc Has someone done this before? Thanks - Pedro Paulo de Magalhães Oliveira Junior Netfilter SpeedComm Telecom -- www.netfilter.com.br http://www.netfilter.com.br -- For mobile: http://itunes.apple.com/br/artist/netfilter/id365306441 ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. function dpxwrite(varargin) % Write a curvature file (DPV or DPF), in ASCII format. % % dpxwrite(filename,dpx) % dpxwrite(filename,dpx,crd,idx) % % - fname is the file name to be created % - dpx contains the values for each vertex or face % - crd contains the vertex coordinates or face indices % - idx contains vertex or face sequential index % % _ % Anderson M. Winkler % Yale University / Institute of Living % Oct/2011 % File name fname = varargin{1}; % Get the actual data dpx = varargin{2}(:); nX = numel(dpx); % Check if all are integers and use appropriate formating if all(mod(dpx,1)==0), fstr = '%d'; else fstr = '%f'; end if nargin == 2, % Organise the data, fill the coords with zeros amd prep to save dpx = [(0:nX-1) ; zeros(3,nX) ; dpx']; elseif nargin == 4, % Organise the coords crd = varargin{3}; if size(crd,1) size(crd,2), crd = crd'; end % Take the indices idx = varargin{4}(:); % Prepare to save dpx = [idx' ; crd ; dpx']; else error('Incorrect number of arguments'); end % Save fid = fopen(fname,'w'); fprintf(fid,['%d %g %g %g ' fstr ' \n'],dpx); fclose(fid); ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
Re: [Freesurfer] Accuracy of FreeSurfers gray matter segmentation
Hi Lucas, It seems you are looking at the FreeSurferColorLUT.txt. Not all these labels are in the aseg.mgz file. Try looking at the aseg.stats file, in the subdirectory stats of each directory of your subjects. The labels there are the ones in the aseg.mgz, and have friendly names. For the segmentation, FS still works voxelwise, but it's objective is to identify each structure as a whole, whereas SPM and FSL/FAST attempt to classify each voxel as being GM, WM or CSF. A short description of the method in FS is here: http://surfer.nmr.mgh.harvard.edu/fswiki/FreeSurferAnalysisPipelineOverview#TheVolume-based.28Subcortical.29Stream You may want also to have a look at this paper: http://dx.doi.org/10.1016/S0896-6273(02)00569-X Hope this helps! All the best, Anderson On 29/08/11 03:38, Lucas Eggert wrote: Dear Anderson Winkler, thank you very much for your quick response and your very helpful comments! To know if a given structure is gray or white matter you can look in any reasonable anatomy textbook. That is ture, of course; however, my problem is rather to match labels like LeftmOg in the aseg.mgz file to anatomical structures. In any case, the question itself is somewhat ill-posed, because some of the subcortical structures have heterogeneous tissue composition and can't really be labeled entirely as gray matter, even macroscopically. The most notable examples are perhaps the thalamus and hippocampus, but the same applies to other structures too. That is totally true. Nevertheless, for a comparison between different segmentation methods, if you would like to compare e. g. total gray matter volume, it is important to know, which of the labels should rather be regarded as gray matter and which should be regarded as something else. But as you mention below, a direct comparison between different segmentation methods might not be valid --- Thanks for this important hint! But then, I am a bit suprised, anyway: I am not familiar with the method used by FreeSurfer for (sub)cortical segmentation; but could you, in simple words describe shortly, how FreeSurfer does the segmentation, if not voxel-vise, that is, how does FreeSurfer define a whole structure (see your comment below)? That would be of great help for the upcoming discussion of the results for the evaluation of different segmentation methods. Anyway, if you really want to make a hard distinction, you can call then caudate, putamen, pallidum, amygdala, accumbens, hippocampus and thalamus as gray matter. The region defined as ventral diencephalon is very heterogeneous and I would not classify it either as GM or WM, as it includes mamillary bodies, tuber cinereum/infundibulum (but not hypophysis), some hypothalamic nuclei near the lateral and inferior walls of the 3rd ventricle and sometimes fragments of the optic tracts (but not chiasm, which has its own label). It also includes parts of the mesencephalon (e.g. part of the cerebral crux, part of the substantia nigra and rubra). Importantly, if you are comparing algorithms, you have to be sure they are reporting the same thing. For instance, it's fairly common to run SPM or FSL/FAST segmentation, then sum the GM voxels within a region defined from an atlas. If you do this for, say, caudate or thalamus, you'll get the volume of what the algorithm classified as GM within the structure you selected. FreeSurfer (and, e.g. FSL/FIRST), on the other hand, will segment and report the volume of the structure as a whole, including all what it contains. A direct comparison, thus, is not valid. With kind regards Lucas Eggert ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
Re: [Freesurfer] Accuracy of FreeSurfers gray matter segmentation
Hi Lucas, To know if a given structure is gray or white matter you can look in any reasonable anatomy textbook. In any case, the question itself is somewhat ill-posed, because some of the subcortical structures have heterogeneous tissue composition and can't really be labeled entirely as gray matter, even macroscopically. The most notable examples are perhaps the thalamus and hippocampus, but the same applies to other structures too. Anyway, if you really want to make a hard distinction, you can call then caudate, putamen, pallidum, amygdala, accumbens, hippocampus and thalamus as gray matter. The region defined as ventral diencephalon is very heterogeneous and I would not classify it either as GM or WM, as it includes mamillary bodies, tuber cinereum/infundibulum (but not hypophysis), some hypothalamic nuclei near the lateral and inferior walls of the 3rd ventricle and sometimes fragments of the optic tracts (but not chiasm, which has its own label). It also includes parts of the mesencephalon (e.g. part of the cerebral crux, part of the substantia nigra and rubra). Importantly, if you are comparing algorithms, you have to be sure they are reporting the same thing. For instance, it's fairly common to run SPM or FSL/FAST segmentation, then sum the GM voxels within a region defined from an atlas. If you do this for, say, caudate or thalamus, you'll get the volume of what the algorithm classified as GM within the structure you selected. FreeSurfer (and, e.g. FSL/FIRST), on the other hand, will segment and report the volume of the structure as a whole, including all what it contains. A direct comparison, thus, is not valid. Hope this helps! All the best, Anderson On 28/08/11 02:53, Lucas Eggert wrote: Dear List, I recently posted the message you see below. I currently compare the segmentation results of different segementation algorithms and FreeSurfer always yields the least accurate results. Because I still have difficulties to decide which of the labels in the aseg.mgz files should be considered gray matter, I have the feeling, the bad results I am getting for FreeSufer might be caused by not including all relevant gray matter segments. So, I would very much appreaciate any help on deciding which of the labels in the aseg.mgz file belong to gray matter! With kind regards Lucas Eggert Original-Nachricht Betreff:[Freesurfer] How to determine gray matter in the aseg.mgz Datum: Tue, 03 May 2011 17:26:55 +0200 Von:Lucas Eggert legg...@uni-osnabrueck.de An: freesurfer@nmr.mgh.harvard.edu freesurfer@nmr.mgh.harvard.edu Dear Experts, I would like to generate a gray matter mask using the aparc+aseg.mgz file. Now, my question is whether there exists a file in addition to the FreeSurferColorLUT.txt file, which more explicitly, i. e., withouth the abbreviations, explains the labels, because I find it hard to decide whether, e. g., Left-VentralDC, Line1, LeftmOg, or Left-Interior belong to gray matter, or not (to name only a few of those labels I cannot clearly classify). Or is there a easier way to create a gray matter mask? Thank you very much in advance! Best regards, Lucas Eggert -- Lucas Eggert, M.Sc. Institute of Cognitive Science University of Osnabrueck Albrechtstrasse 28 D-49076 Osnabrueck Germany Phone: +49-541-969-44-28 Website:http://www.cogsci.uni-osnabrueck.de/~leggert/ ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
Re: [Freesurfer] Brain volume in FreeSurfer analysis
A side note: If you are using FS 4.5.0 or earlier, there is also BrainSegVolNotVent, which discount ventricles. If you want to capture effects of aging or atrophy, perhaps this could be more sensitive than BrainSegVol. On 24/08/11 12:32, Anderson Winkler wrote: Hi Zuzana, Yes, you can use BrainSegVol as a measurement of brain volume (I'd assume you are using FS =4.5.0). Note that there is another measurement that you might be interested in, the IntraCranialVol. These measurements tell different things and not necessarily correlate well one with another depending on the sample. BSV considers the voxels labelled as GM and WM, including subcortical structures and cerebellum and so, it correlates better with amount of GM and WM and tends to be more sensitive to pathology, atrophy and aging. ICV is more robust to these effects. You may want to choose the one that is more appropriate to your study. Also, if you are considering brain volume as a covariate for cortical thickness, it's not necessary. Thickness correlates poorly with brain volume, and these two things are not correlated genetically. Hope this helps! All the best, Anderson On 24/08/11 05:39, zuzana nedelska wrote: Hello, I have a question about calculating brain volume (in mm3) when performing recon-all. Do I take brainseg volume in the analysis stream line as subject's brain volume (in mm3)? Thank you for reply. ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
Re: [Freesurfer] Brain volume in FreeSurfer analysis
Hi Alan, I'd say it depends on what the study is about, but in principle, I'd think that the covariates should remove what would have potential to be confounding more what the main effect would be. In the example of schizophrenia, I'd choose BrainSegVolNotVent, and run both models, with and without it, and interpret the results combined. Also, unless if the samples are too small or unless one wants to explicitly test the effect of ICV and/or BV, I don't see any problem in including both ICV and BV in the model, even considering they are well correlated to some extent. The shared variance between them interferes on the beta-estimates for them, but not on the betas for the other regressors that you would be testing, and the part of the variance that is not shared between them will absorb the effects for which they were chosen to be covaryied out. This is my opinion. Others may think differently. All the best! Anderson On 24/08/11 12:51, Alan Francis wrote: Hi Anderson: Your explanation is very well put. I have a question. Suppose one is looking at High Risk datasets (for example Schizophrenia) where the brain morphological alterations are subtle but spread across the brain, which covariate would you use? thanks, Alan [Beth Israel Deaconess Medical Center] On Wed, Aug 24, 2011 at 12:43 PM, Anderson Winkler andersonwink...@hotmail.com mailto:andersonwink...@hotmail.com wrote: A side note: If you are using FS 4.5.0 or earlier, there is also BrainSegVolNotVent, which discount ventricles. If you want to capture effects of aging or atrophy, perhaps this could be more sensitive than BrainSegVol. On 24/08/11 12:32, Anderson Winkler wrote: Hi Zuzana, Yes, you can use BrainSegVol as a measurement of brain volume (I'd assume you are using FS =4.5.0). Note that there is another measurement that you might be interested in, the IntraCranialVol. These measurements tell different things and not necessarily correlate well one with another depending on the sample. BSV considers the voxels labelled as GM and WM, including subcortical structures and cerebellum and so, it correlates better with amount of GM and WM and tends to be more sensitive to pathology, atrophy and aging. ICV is more robust to these effects. You may want to choose the one that is more appropriate to your study. Also, if you are considering brain volume as a covariate for cortical thickness, it's not necessary. Thickness correlates poorly with brain volume, and these two things are not correlated genetically. Hope this helps! All the best, Anderson On 24/08/11 05:39, zuzana nedelska wrote: Hello, I have a question about calculating brain volume (in mm3) when performing recon-all. Do I take brainseg volume in the analysis stream line as subject's brain volume (in mm3)? Thank you for reply. ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu mailto:Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu mailto:Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu mailto:Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail
Re: [Freesurfer] pial surface documentation
Hi Jeff, Not sure where you can find a verbose documentation, but you can figure out by looking at the file read_surf.m in the ${FREESURFER_HOME}/matlab directory. It's straightforward. All the best, Anderson On 08/17/2011 04:32 PM, Jeff Eriksen wrote: Where may I find the documentation explaining the content and format of the pial and gray-white surface files? Thanks, -Jeff ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
Re: [Freesurfer] global mean thickness
Hi Allison, A suggestion is to use the surface area of each hemisphere as the weighting factor. The global average thickness for both hemispheres is then given by: bh.thickness = (lh.thickness*lh.surfarea + rh.thickness*rh.surfarea) / (lh.surfarea + rh.surfarea). If you use the data in the ?h.aparc.stats, it already discounts the 'unknown' region, so you don't have to worry about that. All the best, Anderson On 08/14/2011 06:12 PM, Allison R. Kaup wrote: Hi all, Please pardon the novice question... but what is the best way to get global mean cortical thickness (i.e. combined across hemispheres)? I have used mris_anatomical_stats to get mean thickness separately for each hemisphere. To get a global mean thickness, would I just take a simple average (RH mean thickness + LH mean thickness)/2? Or, do I need some sort of weighted average to account for hemispheric size diffferences? If so, what would I use as the weight? Thanks! Allison ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
[Freesurfer] Imaging Genomics Post-Doctoral Fellowship
*Imaging Genomics Post-Doctoral Fellowship* ** A postdoctoral fellowship in Imaging Genetics at the Olin Neuropsychiatric Research Center, Institute of Living, and the Department of Psychiatry, Yale University, is currently available. The two-year NIH-funded fellowship, under the direction of Dr. David Glahn, will focus on (1) developing a deeper understanding of the genetic basis of human brain structure and function, (2) performing image analysis on large-scale imaging genomic data sets (1000) including neuroanatomic, diffusion tensor, and resting state fMRI data, (3) developing novel image analytic approaches for gene discovery, and (4) applying imaging genomic finding and methodologies to the study of neuropsychiatric and addictive disorders. The successful candidate will have a strong methods background in imaging and/or genetics or related fields (neurogenetics, imaging, biomedical engineering, computational neuroscience) coupled with excellent writing skills. Programming experience (e.g. Matlab, shell scripting, C/C++) in Linux/Unix environments is advantageous. MDs, PhDs, or MD/PhDs are all encouraged to apply. The position can begin as early as October 1, 2011. Interested candidates are encouraged to email Dr. David Glahn (david.gl...@yale.edu mailto:david.gl...@yale.edu), including a cover letter and CV.Three letters of recommendation will be requested from qualified candidates. ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
Re: [Freesurfer] VRML support
Dear Andrei, Do you need any specific feature from VRML? If not, and you simply need to import the mesh into Blender, you can do this: 1) Convert the mesh to ASCII format: /mris_convert somesurface somesurface.asc/ 2) Save the attached script somewhere, make it executable with chmod, then use it to convert to Wavefront format, like this: /./srf2obj somesurface.asc somesurface.obj/ The script uses gawk (GNU awk), so make sure you have it on it's usual location, /usr/bin/gawk on most Linuxes. If different, e.g. on Mac with MacPorts or Fink, you may edit the first line to point the script to the correct location. Not sure if it will work with other awk implementations. Also, note that the output goes to stdout, so you really need the , as in the example above. Hope this helps! All the best, Anderson On 08/10/2011 11:13 PM, andrei sherstyuk wrote: Greetings, I have problems exporting the surface data in VRML format. When I load the resulting .wrl file into Blender (a 3D modeling tool), the resulting surface is full of holes (bad/missing polygons) and connectivity of vertices is all wrong -- I see edges where they are not supposed to be. Is is a common problem with VRML export? I used write_vrml 1 command, tksurfer version 5. Any help will be greatly appreciated. Cheers, Andrei ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. #!/usr/bin/gawk -f BEGIN { if (ARGV[1] == ) { print Convert Surface ASCII format to OBJ. print print Usage: print srf2obj input.srfoutput.obj print print The output goes to stdout. Use to redirect to print a file, as shown above print print _ print Anderson M. Winkler print Yale University / Institute of Living print Jan/2010 exit } } # Count number of vertices and faces from the 2nd record NR == 2 { nV=$1 ; nF=$2 } # Print vertex coordinates NR=3 NR=nV+2 { print v, $1, $2, $3} # Print faces' vertex indices NR=nV+3 NR=nV+nF+2 { print f, $1+1, $2+1, $3+1 } ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
Re: [Freesurfer] correct mris_anatomical_stats syntax for cortical area
Hi Joakim, I think you can remove entirely the -t option. The area will be one of the fields in the table, regardless of this option, as it depends on the mesh that is used to derive all other measurements except thickness. If you specify an ?h.area file with -t, it will instead output incorrect results for thickness, as it will treat the given area file as if it were thickness, and not really changing the areas reported in the table. Hope this helps! All the best, Anderson On 05/27/2011 03:41 PM, Joakim Vinberg wrote: Hi everybody, I just want to make sure I'm using the correct the correct syntax for running mris_anatomical_stats for examining cortical area. Based on the QDec Group Analysis page, my I was running the following command to examine cortical thickness: mris_anatomical_stats -l rh.test.label -t rh.thickness -b -f subject/stats/rh.test.stats subject rh To adjust this for cortical area, would I just replace the rh.thickness above with rh.area, or remove it entirely? Thanks in advance! Joakim ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
Re: [Freesurfer] two questions
Hi Ilana, I'll let the first question to the FS experts to answer. For the second: 1. Is it legitimate toconclude from this that the regressor's overall effect is that it's associated with a thinner cortex (e.g., older subjects have a thinner cortex), eventhough most of the cortex does not survive FDR or multiple comparison correction? Even if the effect exists, your experiment wasn't able to detect it as significant, since nothing survived the multiple testing correction you used. Most scientific journals wouldn't accept conclusions based on non-significant results, despite how compelling the hypothesis might be. 2. If yes, is there a way of exporting the distribution, or getting some numerical representation of the negative and positive values across the cortex, or within aparc annotations. The p-values are in the files sig.mgh, in subdirectories of the qdec directory where the results of the analyses were stored. There are multiple ways to open and a suggestion is to convert to ASCII using the -c option of mris_convert, then open in Octave/Matlab with dlmread. 3. Is there a way to set FDR separately for positive and negative values? The plain answer is no, because for the FDR procedure to work, it's necessary that the p-values under the null are uniformly distributed between 0 and 1 (from the definition of p-values). If you drop part of your distribution, then the p-values are no longer distributed like that. It turns out, however, that in some particular cases, part of the distribution does not actually exist (see Self Liang, J Am. Stat Assoc, 1987 for some cases, particularly the Cases 5 and 7). A workaround is to divide the q by a constant that depends on the fraction of the distribution that known to be missing (e.g., for Case 5, instead of q=0.05, one could use q=0.025 to obtain the same 5% of false discoveries). However, these particular cases I believe don't apply to your scenario, so please, refrain from applying FDR separately only on positives or negatives. There is also a second reason for not applying FDR separately: for each set (positive and negative), the number of tests would be reduced, on average, by half, alleviating the multiple testing problem and making, on average, twice as easy for results to survive the threshold, inflating the amount of false discoveries, something undesired. Hope this helps! All the best, Anderson On 05/16/2011 09:53 AM, Ilana Hairston wrote: Hi there, First the simple question - is there a way to run mris_anatomical_stats on all my subjects at once generating a single output file? Second - actually comprised from several questions: when looking a the unthresholded group analysis on cortical thickness (in the averaged space), the distribution of negative and positive z values is not necessarily normal. i.e., the range of negative values maybe be 0 to -5, and the range of positive values 0 to +3. 1. Is it legitimate toconclude from this that the regressor's overall effect is that it's associated with a thinner cortex (e.g., older subjects have a thinner cortex), eventhough most of the cortex does not survive FDR or multiple comparison correction? 2. If yes, is there a way of exporting the distribution, or getting some numerical representation of the negative and positive values across the cortex, or within aparc annotations. 3. Is there a way to set FDR separately for positive and negative values? thanks ilana Ilana Hairston hairstons...@gmail.com * Our ignorance is not so vast as our failure to use what we know. —M. King Hubbert, peak oil prophet ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Re: [Freesurfer] two questions
Hi Ilana, Normality isn't a requirement for FDR to work. However, if the distribution of your statistic isn't normal **under the null hypothesis**, neither follows t, F or any other well known parametrizable distribution, then you have to obtain p-values in a different way, not from the cdf/pdf of these distributions. Most likely you'd have to use permutations. But do you have any evidence that your cortical thickness measurements are not normal after regressing out your model? The histogram that appears in qdec window tells you the frequency of the statistics across space for all the vertices. This is not the same as the distribution of the residuals, nor of the statistic for each vertex if the same experiment were to be repeated many, many times. You could apply a normality test to each vertex using the residuals of the GLM. I wouldn't bother much with that, though. I see no reason why thickness measurements wouldn't be normal. All the best! Anderson On 05/16/2011 03:18 PM, Ilana Hairston wrote: thanks! very helpful. not to be argumentative, but if my Z distribution is not normal, is there meaning to FDR? On May 16, 2011, at 2:08 PM, Anderson Winkler wrote: Hi Ilana, I'll let the first question to the FS experts to answer. For the second: 1. Is it legitimate toconclude from this that the regressor's overall effect is that it's associated with a thinner cortex (e.g., older subjects have a thinner cortex), eventhough most of the cortex does not survive FDR or multiple comparison correction? Even if the effect exists, your experiment wasn't able to detect it as significant, since nothing survived the multiple testing correction you used. Most scientific journals wouldn't accept conclusions based on non-significant results, despite how compelling the hypothesis might be. 2. If yes, is there a way of exporting the distribution, or getting some numerical representation of the negative and positive values across the cortex, or within aparc annotations. The p-values are in the files sig.mgh, in subdirectories of the qdec directory where the results of the analyses were stored. There are multiple ways to open and a suggestion is to convert to ASCII using the -c option of mris_convert, then open in Octave/Matlab with dlmread. 3. Is there a way to set FDR separately for positive and negative values? The plain answer is no, because for the FDR procedure to work, it's necessary that the p-values under the null are uniformly distributed between 0 and 1 (from the definition of p-values). If you drop part of your distribution, then the p-values are no longer distributed like that. It turns out, however, that in some particular cases, part of the distribution does not actually exist (see Self Liang, J Am. Stat Assoc, 1987 for some cases, particularly the Cases 5 and 7). A workaround is to divide the q by a constant that depends on the fraction of the distribution that known to be missing (e.g., for Case 5, instead of q=0.05, one could use q=0.025 to obtain the same 5% of false discoveries). However, these particular cases I believe don't apply to your scenario, so please, refrain from applying FDR separately only on positives or negatives. There is also a second reason for not applying FDR separately: for each set (positive and negative), the number of tests would be reduced, on average, by half, alleviating the multiple testing problem and making, on average, twice as easy for results to survive the threshold, inflating the amount of false discoveries, something undesired. Hope this helps! All the best, Anderson On 05/16/2011 09:53 AM, Ilana Hairston wrote: Hi there, First the simple question - is there a way to run mris_anatomical_stats on all my subjects at once generating a single output file? Second - actually comprised from several questions: when looking a the unthresholded group analysis on cortical thickness (in the averaged space), the distribution of negative and positive z values is not necessarily normal. i.e., the range of negative values maybe be 0 to -5, and the range of positive values 0 to +3. 1. Is it legitimate toconclude from this that the regressor's overall effect is that it's associated with a thinner cortex (e.g., older subjects have a thinner cortex), eventhough most of the cortex does not survive FDR or multiple comparison correction? 2. If yes, is there a way of exporting the distribution, or getting some numerical representation of the negative and positive values across the cortex, or within aparc annotations. 3. Is there a way to set FDR separately for positive and negative values? thanks ilana Ilana Hairston hairstons...@gmail.com * Our ignorance is not so vast as our failure to use what we know. —M. King Hubbert, peak oil prophet ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo
Re: [Freesurfer] display results on fsaverage / calculate area
Hi Boris, For now I am taking the geometric average between pial and white surface coordinates. Is that the right way to do it, or is there a more precise way? To obtain a surface that lies in the geometric middle between white and pial surfaces, it is correct to take the average of the coordinates. This surface is not guaranteed to coincide with any biologically meaningful cortical layer, but it has advantages over pial or white for not over/under-representing gyri or sulci. Also: If I decided to represent the stuff on the mid-surface, would it then also make sense to also take the average of pial.avg.area.mgh white.avg.area.mgh as the area estimation at each vertex? No no, to take the average of the areas is not the same as take the average of the coordinates, because the areas depend quadratically on linear distances. An average of the areas would not necessarily represent a surface at the middle, most likely representing an (invisible) surface that would be closer to the white in some places and closer to the pial in others, depending on local folding. Hope this helps! All the best, Anderson On 2011-05-12, at 4:08 PM, Douglas Greve wrote: Yes, the avg.area files have the average over the input subjects at each vertex. I've used it to overcome this problem. doug On 5/12/11 8:04 AM, Bruce Fischl wrote: Hi Boris, 1. Doug can say for sure, but I believe so. 2. No. The mid surface doesn't correspond to any boundary in the image and so we are always hesitant to provide any morphometric measures for it. We are working on a more explicit estimation of the location of layer IV, but that is a future direction. You could generate it yourself easily enough though. cheers Bruce On Thu, 12 May 2011, Boris Bernhardt wrote: Hi Bruce, Thanks a lot for your reply. 2. The surface area of fsaverage is less than any individual, so you *definitely* don't want to use it. You should map the ROI back to individuals and compute it in the native space. I have two follow-up questions: 1) Do .pial.avg.area.mgh and/or .white.avg.area.mgh then store the mean native space surface areas for the individuals that were used to create fsaverage, and can I use these values to approximate the surface area of my ROIs then? 2) Do the avg.area files also exists somewhere for the half-thickness mid-surface? If not, does it make sense to approximate the mid-thickness surface area at each vertex by taking the mean of the corresponding pial.avg.area and white.avg.area entries? Many thanks, Boris cheers Bruce On Wed, 11 May 2011, Boris Bernhardt wrote: Hello Freesurfer-experts, I just analyzed some FreeSurfer cortical thickness data that have been surface-resampled to fsaverage (using mris_surf2surf with -s fsaverage). For the visualization and reporting of my findings, I have a two questions: 1. Is there anything that conceptually speaks against showing my results on non-inflated surfaces of fsaverage, such as the white matter surface, the pial surface, or even a mid-surface model? 2. I have a couple of ROIs defined on the surface of fsaverage and want to report the surface area of a given ROI in mm^2. Should I calculate the area of a ROI directly from the given surface of fsaverage, or to take the area computations from ?h.pial.avg.area.mgh/?h.white.avg.area.mgh which represent the averages of the individuals that went into fsaverage. I am asking because I was slightly unclear of the wiki-instructions: https://surfer.nmr.mgh.harvard.edu/fswiki/GroupAverageSurface suggests to use ?h.pial.avg.area.mgh; on the other hand, the more recently edited http://surfer.nmr.mgh.harvard.edu/fswiki/FsAverage says that The surface area of the new average subject (fsaverage) is that of a typical subject I am using freesurfer 4.5.0. Hope my questions make sense and thank you very much for answering them, Boris --- Boris Bernhardt, PhD Max Planck Institute for Human Cognitive and Brain Sciences Stephanstr. 1a, 04103 Leipzig, Germany p: +(49) 341 9940 2658 e: bernha...@cbs.mpg.de mailto:bernha...@cbs.mpg.de http://www.cbs.mpg.de/~bernhardt http://www.cbs.mpg.de/%7Ebernhardt The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. --- Boris Bernhardt Max Planck Institute for Human Cognitive and Brain Sciences Stephanstr. 1a, 04103 Leipzig, Germany p: +(49) 341 9940 2658 e: bernha...@cbs.mpg.de mailto:bernha...@cbs.mpg.de http://www.cbs.mpg.de/~bernhardt http://www.cbs.mpg.de/%7Ebernhardt ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu
Re: [Freesurfer] Support for PPC Mac
We still have here an old, but very good dual-core PPC that we use to work with tksurfer, tkmedit, qdec, glmfit and other utilities. If not at all hard to compile, it would be good to continue having FreeSurfer available... At some point we'll inevitably have to turn that machine off, but it continues to be so stable and useful... :-) On 05/11/2011 10:15 AM, Ed Gronenschild wrote: Hi, A while ago we were asked if still support was needed for FreeSurfer on a PPC Mac. I was one of the happy few who needed this. But I now can inform you that as far as I'm concerned you can discontinue this support. Thank you for all your support sofar. Ed ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Re: [Freesurfer] Change the default SUBJECTS_DIR...
Hi Catherine, When setting the variable, drop the $ sign. So, type simply: setenv SUBJECTS_DIR /media/external/data/Ventricle-freesurfer Anderson On 04/23/2011 04:04 PM, Rongxiang Tang wrote: Hi Krish, Thanks for the help. It's calculating now... One more questions...I noticed that when I entered in these commands: FreeSurfer:~ setenv $SUBJECTS_DIR /media/external/data/Ventricle-freesurfer FreeSurfer:~ recon-all -i /media/external/data/Ventricle-freesurfer/ben/1.3.12.2.1107.5.2.7.20418.300901051836502528508.dcm \ -all -s ben the -subjectid and results seems to save in the default directory.../home/virtualuser/apps/freesurfer/subjects...yet i would like to save them in the /media/external/data Is there any way to change that? will this command work: recon-all -i /media/external/data/Ventricle-freesurfer/ben/1.3.12.2.1107.5.2.7.20418.300901051836502528508.dcm \ -all -s ben / -sd /media/external/data/ --- On *Sat, 4/23/11, Krish Subramaniam /kr...@nmr.mgh.harvard.edu/* wrote: From: Krish Subramaniam kr...@nmr.mgh.harvard.edu Subject: Re: [Freesurfer] Change the default SUBJECTS_DIR... To: Bruce Fischl fis...@nmr.mgh.harvard.edu Cc: Rongxiang Tang rongxiangt...@yahoo.com, freesurfer@nmr.mgh.harvard.edu Date: Saturday, April 23, 2011, 4:28 PM Hi Catherine You need to mount the external harddisk inside the virtualbox and give its path as $SUBJECTS_DIR. The path starting with E:\data\.. is how Windows 7 sees the harddisk. Unfortunately, there is no easy way to do this. * The hardwork is to make the Guest OS ( ubuntu in this case ) see the external harddisk. Here is a start -- http://superuser.com/questions/87221/how-can-i-mount-an-external-hard-drive-in-a-virtualbox-machine * once the Guest OS sees it, you need to know where it's mounted ( if it's done automatically ) or use the mount command to mount it to a location like /media/external * Then your $SUBJECTS_DIR will be setenv $SUBJECTS_DIR /media/external/data/Ventricle-freesurfer/.. etc. also recommend you to read the Shared Folders section in the VirtualBox user manual http://download.virtualbox.org/virtualbox/UserManual.pdf -Krish On Sat, Apr 23, 2011 at 11:12:53AM -0400 Bruce Fischl wrote: Hi Catherine I don't have much experience with virtual boxes, but I suspect that is the windows name for the path, not the unix one in the virtual box. Someone who knows more about this than I do can confirm/correct. cheers Bruce On Sat, 23 Apr 2011, Rongxiang Tang wrote: Hi Bruce, Thanks for your prompt reply. I'm running the freesurfer in a virtual box in windows 7. When I plug the usb in, the computer just called it (E:)...and i just directly copy that directoryE:\data\Ventricle-freesurfer\ben\1.3.12.2.1107.5.2.7.20418.300901051836502528507 to the command line... Is this correct? Thanks Catherine ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu /mc/compose?to=Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
[Freesurfer] Content of .tif files
Hi all, The .tif files (templates) contain 9 pages each, which seem to be organized as 3+3+3. I think I understand that they are equirectangular projections of the latitude/longitude of curvature and sulcal depth, is this correct? But what exactly each of these 9 frames contain? Thanks! Anderson ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
Re: [Freesurfer] Content of .tif files
Hi Bruce, Thanks! They appear to be stored as 32-bits integers and when I open I get very large numbers. How could I scale them back to the actual means/vars/dofs? I just tried to find a linear relation for the dof, but I get a non-integer result... maybe it's a log function (?) Thanks again! All the best, Anderson On 03/21/2011 02:00 PM, Bruce Fischl wrote: Hi Anderson, there are 3 sets of 3 frames each. In each set I store: Frame 1: means Frame 2: variances Frame 3: dofs (actually, there is only 1 dof for the whole map) these are stored for curv, sulc and inflated curvature. cheers Bruce On Mon, 21 Mar 2011, Anderson Winkler wrote: Hi all, The .tif files (templates) contain 9 pages each, which seem to be organized as 3+3+3. I think I understand that they are equirectangular projections of the latitude/longitude of curvature and sulcal depth, is this correct? But what exactly each of these 9 frames contain? Thanks! Anderson ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Re: [Freesurfer] Content of .tif files
Means and variances are large too, around 1,000,000,000 for all 3 sets. I'm using imread in Matlab and I don't seem to find options to set endianess. The numbers apparently get less badly behaved (e.g. mean ~21,000 and var ~15,000) if I convert to PNG with ImageMagick, but I'm unfamiliar with these ranges anyway. The scaling, even in PNG, doesn't seem linear, but logarithmic. Regardless..., knowing what is in each frame already solves what is needed... Thanks! Anderson On 03/21/2011 03:11 PM, Bruce Fischl wrote: are they? I thought they were just stored as straight variances. Are the means large too? Make sure there are no byte-swapping issues On Mon, 21 Mar 2011, Anderson Winkler wrote: Hi Bruce, Thanks! They appear to be stored as 32-bits integers and when I open I get very large numbers. How could I scale them back to the actual means/vars/dofs? I just tried to find a linear relation for the dof, but I get a non-integer result... maybe it's a log function (?) Thanks again! All the best, Anderson On 03/21/2011 02:00 PM, Bruce Fischl wrote: Hi Anderson, there are 3 sets of 3 frames each. In each set I store: Frame 1: means Frame 2: variances Frame 3: dofs (actually, there is only 1 dof for the whole map) these are stored for curv, sulc and inflated curvature. cheers Bruce On Mon, 21 Mar 2011, Anderson Winkler wrote: Hi all, The .tif files (templates) contain 9 pages each, which seem to be organized as 3+3+3. I think I understand that they are equirectangular projections of the latitude/longitude of curvature and sulcal depth, is this correct? But what exactly each of these 9 frames contain? Thanks! Anderson ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. ___ 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 mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Re: [Freesurfer] Content of .tif files
Hi Graham and Manfred, Thanks for the help! Interesting is that the .tif created with mris_make_template in FS 5.0 contain the SampleFormat tag set, but not the .tif that are shipped with FS (maybe they were created with a previous version of the TIFF libraries?). But even so, SampleFormat is set as 0x2, which Google says is for signed integers. Manfred: how are you changing the tags? I tried with tiffset, from the libtiff-tools package in Debian, but it doesn't seem to be changing anything, either in the original file with 9 frames or after splitting. Thanks! Anderson On 03/21/2011 07:47 PM, Manfred G Kitzbichler wrote: The problem seems to be that in the template TIFF image files the SampleFormat tag 0x153 is not set, so Matlab assumes by default 32bit means int32. I hacked one of the files by hand adding tag 0x153 with value 0x3 (IEEE floating point) which was consequently loaded by the Matlab imread() function as 'single' type instead of int32. Looking at the resulting matrix with imagesc() revealed the loop-like structures one can see on the weblink below, so I guess that's the expected result. Perhaps someone would want to patch all the template files accordingly (and more cleanly since I had to replace one of the regular tags in order to fit in the SampleFormat tag). Best, Manfred Graham Wideman wrote: Hi Anderson, This might be helpful (beware datedness though). https://surfer.nmr.mgh.harvard.edu/fswiki/TemplateTifImageFiles The data at the time I did that goc was evidently stored in 32-bit float format... that could lead to your wild number range if you interpret it as int-32. -- Graham At 3/21/2011 12:44 PM, Anderson Winkler wrote: Means and variances are large too, around 1,000,000,000 for all 3 sets. I'm using imread in Matlab and I don't seem to find options to set endianess. The numbers apparently get less badly behaved (e.g. mean ~21,000 and var ~15,000) if I convert to PNG with ImageMagick, but I'm unfamiliar with these ranges anyway. The scaling, even in PNG, doesn't seem linear, but logarithmic. Regardless..., knowing what is in each frame already solves what is needed... Thanks! Anderson On 03/21/2011 03:11 PM, Bruce Fischl wrote: are they? I thought they were just stored as straight variances. Are the means large too? Make sure there are no byte-swapping issues On Mon, 21 Mar 2011, Anderson Winkler wrote: Hi Bruce, Thanks! They appear to be stored as 32-bits integers and when I open I get very large numbers. How could I scale them back to the actual means/vars/dofs? I just tried to find a linear relation for the dof, but I get a non-integer result... maybe it's a log function (?) Thanks again! All the best, Anderson On 03/21/2011 02:00 PM, Bruce Fischl wrote: Hi Anderson, there are 3 sets of 3 frames each. In each set I store: Frame 1: means Frame 2: variances Frame 3: dofs (actually, there is only 1 dof for the whole map) these are stored for curv, sulc and inflated curvature. cheers Bruce On Mon, 21 Mar 2011, Anderson Winkler wrote: Hi all, The .tif files (templates) contain 9 pages each, which seem to be organized as 3+3+3. I think I understand that they are equirectangular projections of the latitude/longitude of curvature and sulcal depth, is this correct? But what exactly each of these 9 frames contain? Thanks! Anderson ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. ___ 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 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 mailing list Freesurfer@nmr.mgh.harvard.edu https
Re: [Freesurfer] Content of .tif files
Hi Manfred, Thanks again! It seems it was bad syntax: have to type the full name of the tag, not just its code (339), though in an earlier version of this library (as in CentOS) it seems it's different. In any way, just knowing what each frame means already solves what I needed. I had thought about doing stuff in Matlab, but it seems mrisp_paint can do what I was thinking, so it's solved -- unless this issue is propagated to other commands, which I don't think would be the case (and will be clear when run). If it fails, then fix the tag is the way to go until it's fixed in a future version. Thanks again everyone! All the best, Anderson On 03/21/2011 08:28 PM, Manfred G Kitzbichler wrote: Hi Anderson, I have set the tag with Emacs in hexl-mode - but I wouldn't suggest to try that at home ;-) Actually tiffset should probably do the trick, maybe you used the hex-number instead of decimal for the tag code? - Manfred Anderson Winkler wrote: Hi Graham and Manfred, Thanks for the help! Interesting is that the .tif created with mris_make_template in FS 5.0 contain the SampleFormat tag set, but not the .tif that are shipped with FS (maybe they were created with a previous version of the TIFF libraries?). But even so, SampleFormat is set as 0x2, which Google says is for signed integers. Manfred: how are you changing the tags? I tried with tiffset, from the libtiff-tools package in Debian, but it doesn't seem to be changing anything, either in the original file with 9 frames or after splitting. Thanks! Anderson On 03/21/2011 07:47 PM, Manfred G Kitzbichler wrote: The problem seems to be that in the template TIFF image files the SampleFormat tag 0x153 is not set, so Matlab assumes by default 32bit means int32. I hacked one of the files by hand adding tag 0x153 with value 0x3 (IEEE floating point) which was consequently loaded by the Matlab imread() function as 'single' type instead of int32. Looking at the resulting matrix with imagesc() revealed the loop-like structures one can see on the weblink below, so I guess that's the expected result. Perhaps someone would want to patch all the template files accordingly (and more cleanly since I had to replace one of the regular tags in order to fit in the SampleFormat tag). Best, Manfred Graham Wideman wrote: Hi Anderson, This might be helpful (beware datedness though). https://surfer.nmr.mgh.harvard.edu/fswiki/TemplateTifImageFiles The data at the time I did that goc was evidently stored in 32-bit float format... that could lead to your wild number range if you interpret it as int-32. -- Graham At 3/21/2011 12:44 PM, Anderson Winkler wrote: Means and variances are large too, around 1,000,000,000 for all 3 sets. I'm using imread in Matlab and I don't seem to find options to set endianess. The numbers apparently get less badly behaved (e.g. mean ~21,000 and var ~15,000) if I convert to PNG with ImageMagick, but I'm unfamiliar with these ranges anyway. The scaling, even in PNG, doesn't seem linear, but logarithmic. Regardless..., knowing what is in each frame already solves what is needed... Thanks! Anderson On 03/21/2011 03:11 PM, Bruce Fischl wrote: are they? I thought they were just stored as straight variances. Are the means large too? Make sure there are no byte-swapping issues On Mon, 21 Mar 2011, Anderson Winkler wrote: Hi Bruce, Thanks! They appear to be stored as 32-bits integers and when I open I get very large numbers. How could I scale them back to the actual means/vars/dofs? I just tried to find a linear relation for the dof, but I get a non-integer result... maybe it's a log function (?) Thanks again! All the best, Anderson On 03/21/2011 02:00 PM, Bruce Fischl wrote: Hi Anderson, there are 3 sets of 3 frames each. In each set I store: Frame 1: means Frame 2: variances Frame 3: dofs (actually, there is only 1 dof for the whole map) these are stored for curv, sulc and inflated curvature. cheers Bruce On Mon, 21 Mar 2011, Anderson Winkler wrote: Hi all, The .tif files (templates) contain 9 pages each, which seem to be organized as 3+3+3. I think I understand that they are equirectangular projections of the latitude/longitude of curvature and sulcal depth, is this correct? But what exactly each of these 9 frames contain? Thanks! Anderson ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org
Re: [Freesurfer] freesurfer and VBM
Hi Ritobrato, We have one that may too interest you: Winkler AM, Kochunov P, Blangero J, Almasy L, Zilles K, Fox PT, Duggirala R, Glahn DC. Cortical thickness or grey matter volume? The importance of selecting the phenotype for imaging genetics studies. Neuroimage. 2010 Nov 15;53(3):1135-46. http://www.ncbi.nlm.nih.gov/pubmed/20006715 Anderson On 01/24/2011 11:14 PM, Ritobrato Datta wrote: Hello All, Are there any papers comparing freesurfer to VBM ? Can anyone point me to them ? Thanks Ri ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Re: [Freesurfer] FDR correction
Dear all, The BH procedure is dependent on the number of tests and, for neuroimaging methods, more tests is often equivalent to higher resolution, either in voxel-based or surface-based representations of the brain. The question that arises is whether this would influence sensitivity and/or power. As long as changes in resolution are uniform in space (i.e. uniform lattice for voxel-based methods or homogeneous density of vertices for surface-based methods), then the resolution, by itself, should not interfere in the sensitivity or power. The proportions of errors type I and II should remain the same. There are just more points to look at. Note that the maximum p-value to obtain at least one rejection might change, but 1 may be 1% of 100 tests or 0.001% of 10 tests, so the absolute number of rejections would not be a valid way to control the proportion of false discoveries. However, this is not the end of the story. The noise and the size of the effect (in terms of area/volume) influence the p-values, hence the resulting threshold. In other words: while the *uniformity* of the resampling is important to ensure that the threshold would remain the same in terms of p-values, the noise and size of the activation also influence. Changes in resolution have the same overall effect of filtering in space. Gaussian filters, for instance, are known for highlighting signal areas which size matches the width of the filter, while burying into noise spatially small regions of signal. Reductions in resolution have an effect similar to average (mean) filtering for voxel-based methods, and to whatever equivalent for convolution would be defined for surface-based methods. Therefore, I would conclude that it is not an FDR issue, but instead related to the ability to discriminate signal from noise in neighbouring voxels/vertices in different resolutions. While mean filtering (equivalent to lowering the resolution) may cancel out noise, increasing the value of the statistic, it may also dilute a small effect, causing the opposite result. For methods where the intensity of the voxel/vertex is the variable of interest, the best resolution should be no higher than what can be afforded by the device (unless taken into account somehow). For voxel-based methods (say, fMRI, PET), this is easy to achieve. For surface-based fMRI, for instance, it is certainly more complex and related to how the information from a certain voxel from MRI can be split or projected into more than one vertex. For surface-based cortical thickness, there might not be a best resolution, but to what concerns FDR and other multiple testing procedures, a roughly homogeneous density of vertices on space might be a desirable feature. With respect to binning, although subsampling the vertices uniformly in space or selecting them after sorting should produce different thresholds, if the distribution of p-values is well behaved (i.e. no discrete distribution, uniform under null, etc) and if the bins are not too wide, then this difference should be negligible for practical purposes. Hope this helps! Anderson ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Re: [Freesurfer] 3D graphics card and blade systems
Yes, Pedro, this is the idea. We have been using FreeSurfer in a cluster, but in that setting, every node have their own graphics card (like I think you have at USP). For the new system, however, the blades don't even have PCI or AGP expansion slots, so to display, now that we know that GPUs at the moment are not compulsory for FS, we may then plan to connect using separate nodes. I have another question though, about the GPU processing that the developers are looking forward to: any idea on when GPU might become a requirement, or how essential it might become? That's because what is going to a brand new system may quickly become obsolete for FreeSurfer if the GPU stuff comes along soon. Thanks a lot! Anderson Pedro Paulo de Magalhães Oliveira Junior wrote: Hi Anderson, I don't remember if I showed you here in Sao Paulo our Freesurfer processing. I think you could have a cluster or for better power consumption a Blade Server to run several recon-all at same time (don't forget to reserve at least 1GB Ram per core) To visualize your data you can use a normal Linux workstation with Nvidia or ATI GPU. As Bruce told you the GPU issue is something the FreeSurfer community want but it's not so easy to implement in this situation. Best Regards, Pedro Paulo Jr. --- Pedro Paulo de M. Oliveira Junior Diretor de Operações Netfilter SpeedComm Telecom On Mon, Jan 12, 2009 at 23:31, Anderson Winkler relk...@bol.com.br mailto:relk...@bol.com.br wrote: Dear all, We are considering to buy a blade system, and FreeSurfer would be one of the applications to run on it. We know that a 3D graphics card, with support for OpenGL and built-in memory+GPU, is recommended. What we are not sure is whether it is mandatory for all the FreeSurfer routines, of if that is necessary only to render data in the screen, in particular, with tksurfer. If it is used only for display purposes, and not for real processing, then we may consider having graphics card only in a few separate nodes, that the users could access with an X-server (or maybe VNC with OpenGL support). Does it all makes sense, or do all and every computer must have their own 3D card for everything? Thanks in advance! Anderson ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu mailto: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 mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
[Freesurfer] 3D graphics card and blade systems
Dear all, We are considering to buy a blade system, and FreeSurfer would be one of the applications to run on it. We know that a 3D graphics card, with support for OpenGL and built-in memory+GPU, is recommended. What we are not sure is whether it is mandatory for all the FreeSurfer routines, of if that is necessary only to render data in the screen, in particular, with tksurfer. If it is used only for display purposes, and not for real processing, then we may consider having graphics card only in a few separate nodes, that the users could access with an X-server (or maybe VNC with OpenGL support). Does it all makes sense, or do all and every computer must have their own 3D card for everything? Thanks in advance! Anderson ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
[Freesurfer] recon-all with voxel sizes other than 1mm^3
Dear all, Is there a way to have all the results from recon-all in the native image space (in our case, 0.8x0.8x0.8mm), rather than conformed to 1mm^3? Looking at the script, I'm worried that replacing the --conform to --noconform option to mri_convert may prevent the downstream steps to work correctly. Thanks in advance, Anderson PS: I saw the recent message from João to the list and the follow up, but I think that this is a different question anyhow. PS 2: Sorry for sending twice, but I think that the previous doesn't open properly in the Pipermail page. :-) ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer