Those pipelines will hopefully be available publicly this summer. The relevant code is this though:
recon-all -i <input image> -subjid $SubjectID -sd $SubjectDIR -motioncor -talairach -nuintensitycor -normalization mri_convert <input brain extracted image> "$SubjectDIR"/"$SubjectID"/mri/brainmask.mgz --conform mri_em_register -mask "$SubjectDIR"/"$SubjectID"/mri/brainmask.mgz "$SubjectDIR"/"$SubjectID"/mri/nu.mgz $FREESURFER_HOME/average/RB_all_2008-03-26.gca "$SubjectDIR"/"$SubjectID"/mri/transforms/talairach_with_skull.lta mri_watershed -T1 -brain_atlas $FREESURFER_HOME/average/RB_all_withskull_2008-03-26.gca "$SubjectDIR"/"$SubjectID"/mri/transforms/talairach_with_skull.lta "$SubjectDIR"/"$SubjectID"/mri/T1.mgz "$SubjectDIR"/"$SubjectID"/mri/brainmask.auto.mgz cp "$SubjectDIR"/"$SubjectID"/mri/brainmask.auto.mgz "$SubjectDIR"/"$SubjectID"/mri/brainmask.mgz recon-all -subjid $SubjectID -sd $SubjectDIR -autorecon2 autorecon3 Basically, you make mri_em_register give a more accurate registration (this is typically what fails when you get a bad brain extraction from FreeSurfer in my experience), and then use FreeSurfer's own very nice brain extraction algorithm with the better registration to get the final brain mask. Peace, Matt. From: <lukas.sch...@ukb.uni-bonn.de> Date: Sunday, April 28, 2013 4:21 AM To: <freesurfer@nmr.mgh.harvard.edu> Subject: Re: [Freesurfer] Advice on integrating FSL\'s BET with recon-all Hi Matt! Refering to an older mail from 06 Mar 2013 I would be also interested to integrate BET-results for the initial registration step. Using the -B option in BET I get very robust results. You recommend: "... using the BET extracted image instead of the image with skull for the initial registration step, and then you can use mri_watershed on the original image..." How can this be implemented practically? Are the HCP protocols / pipelines you mentioned later available for the research community? Many thanks in advance, Luke Matt Glasser <http://www.mail-archive.com/search?l=freesurfer@nmr.mgh.harvard.edu&q=from: %22Matt+Glasser%22> Wed, 06 Mar 2013 16:09:44 -0800 <http://www.mail-archive.com/search?l=freesurfer@nmr.mgh.harvard.edu&q=date: 20130306> I would check the mri_em_register registrations of the step that immediately precedes mri_watershed (and produces talairach_with_skull.lta). We found that most of the variability and failures occurred in this step, and mri_watershed itself is a very robust brain extraction algorithm when it is given an accurate registration (my experience with BET is that it is probably not the best tool for getting very accurate brainmasks and sometimes takes away too much). I would recommend using the BET extracted image instead of the image with skull for the initial registration step, and then you can use mri_watershed on the original image and get good results every time. This is the type of strategy we use in the HCP Pipelines (except we use something more robust than BET for the initial mask). Note that the "talairach" registration (done by the -talairach step with the talairach_avi tool) has nothing to do with the registration that precedes brain extraction. Perhaps it should is more robust and should be used, but the affine would have to be converted to the correct format. Peace, Matt. On 3/6/13 3:53 PM, "Bruce Fischl" <fis...@nmr.mgh.harvard.edu> wrote: >you can use > >mri_convert -rl ... > >to reslice the output of bet so that it has the same geometry as the rest >of our stream > >cheers >Bruce > >On Wed, 6 Mar 2013, Winter, Warren wrote: > >> Hi again, >> We have had some suboptimal results from FreeSurfer's skullstripping >>algorithm, even after iteratively trying different >> watershed thresholds and after checking the quality of Talairach >>registration. The results are pretty good, but often leave >> some dura matter and bits of neck behind whose higher intensity values, >>I believe, may end up skewing recon-all's later >> estimation of the range of intensity values within grey matter, and >>consequently compromising the accuracy of pial surface >> estimation. >> >> FSL's BET, however, seems to do a better job of extracting the brain, >>at least for our dataset. So, I was wondering if I >> might be able to skip over mri_watershed and feed autorecon2 and >>autorecon3 a brainmask.mgz file created using BET. I tried >> this procedure: >> >> >> 1) mri_convert <path/to/T1dcm> T1.nii.gz >> 2) bet T1.nii.gz BET_brainmask.nii.gz -A >> 3) mri_convert BET_brainmask.nii.gz BET_brainmask.mgz >> 4) recon-all -s <subjid> -autorecon1 -noskullstrip >> 5) mv BET_brainmask.nii.gz ./<subjid>/mri/brainmask.mgz >> 6) recon-all -s <subjid> -autorecon2 -autorecon3 >> >> And I got this error message, right after normalization2: >> >> " >> #@# Mask BFS Tue Mar 5 22:52:05 EST 2013 >> >>/net/rc-fs-nfs/ifs/data/Shares/DMC-Sheridan2/projects/FOCUS/FreeSurfer/20 >>12_bet/mri >> >> mri_mask -T 5 brain.mgz brainmask.mgz brain.finalsurfs.mgz >> >> threshold mask volume at 5 >> ERROR: dimension mismatch between source and mask >> Linux rc-thunderball 3.2.21-mosix #1 SMP Mon Jul 2 08:55:48 EDT 2012 >>x86_64 x86_64 x86_64 GNU/Linux >> >> recon-all -s 2012_bet exited with ERRORS at Tue Mar 5 22:52:06 EST 2013 >> " >> >> I'm guessing that the dimensions of norm.mgz and aseg.mgz didn't match >>those of brainmask.mgz, resulting during normalization2 >> in a mismatch between brain.mgz and brainmask.mgz. Does that seem >>right, and is there a possible workaround? >> >> Thank you! >> >> Warren >> >> -- >> Warren Winter >> Research Coordinator >> Boston Children's Hospital >> Sheridan Laboratory of Cognitive Neuroscience >> Division of Developmental Medicine >> 1 Autumn Street, AU 650 >> Boston, MA 02215 >> 857-218-5224 >> >> >>_______________________________________________ >Freesurfer mailing list >Freesurfer@nmr.mgh.harvard.edu >https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer <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 <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 <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 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.