External Email - Use Caution
Hello FS experts,
I downloaded some anatomical data. I have defaced full images and pre-skullstripped images for each participant. I tried the defaced images first, but FS skullstripping looks a little off (possibly because the defacing hides bits of the cranium in some images and causes problems in mri_watershed). So I would like to use the pre-skullstripped files as my initial inputs.
I have placed the pre-skullstripped file for each participant in $SUBJECTS_DIR/$subjid/mri/orig/. Each participant's skullstripped input volume is named 001.mgz.
I then submit the following command in a script to my slurm queue (after setting appropriate FS env vars), where the script input ${1} is the $subjid mentioned above:
recon-all \ -subject ${1} \ -all \ -openmp 40 \ -noskullstrip
The output log from FS ends with the following error. The function mri_em_register seems to be looking for brainmask.mgz, and fails to open it. If the input image is already extracted from the skull, do I need to manually call it brainmask.mgz rather than 001.mgz? Or am I missing something else in my function call (like order of flags)? Does -noskullstrip need to come before -openmp, for example?
Thanks! Jim H.
End of recon-all output:
writing output to T1.mgz
3D bias adjustment took 1 minutes and 20 seconds. @#@FSTIME 2023:12:28:16:07:04 mri_normalize N 7 e 80.39 S 0.66 U 102.70 P 128% M 581068 F 0 R 24411 W 0 c 32 w 229 I 0 O 0 L 1.00 1.38 9.22 @#@FSLOADPOST 2023:12:28:16:08:25 mri_normalize N 7 1.99 1.66 8.64 #------------------------------------- #@# EM Registration Thu Dec 28 16:08:25 EST 2023 /gpfs/fs0/scratch/t/tpaus/jhengeni/subjects_dir_ukb/1000108_20252_2_0/mri
mri_em_register -uns 3 -mask brainmask.mgz nu.mgz /home/t/tpaus/jhengeni/fs_versions/7.4.1/freesurfer/average/RB_all_2020-01-02.gca transforms/talairach.lta
setting unknown_nbr_spacing = 3 using MR volume brainmask.mgz to mask input volume...
== Number of threads available to mri_em_register for OpenMP = 40 == reading 1 input volumes... logging results to talairach.log reading '/home/t/tpaus/jhengeni/fs_versions/7.4.1/freesurfer/average/RB_all_2020-01-02.gca'... GCAread took 0 minutes and 1 seconds. average std = 7.2 using min determinant for regularization = 5.2 0 singular and 884 ill-conditioned covariance matrices regularized reading 'nu.mgz'... error:
*mghRead(/gpfs/fs0/scratch/t/tpaus/jhengeni/subjects_dir_ukb/1000108_20252_2_0/mri/brainmask.mgz, -1): could not open file^@error: mri_em_register: could not open mask volume brainmask.mgz.^@* @#@FSTIME 2023:12:28:16:08:25 mri_em_register N 7 e 1.42 S 0.25 U 1.43 P 118% M 446804 F 0 R 108260 W 0 c 2 w 56 I 0 O 0 L 1.99 1.66 8.64 @#@FSLOADPOST 2023:12:28:16:08:26 mri_em_register N 7 1.99 1.66 8.64 Linux nia0918.scinet.local 3.10.0-1160.102.1.el7.x86_64 #1 SMP Tue Oct 17 15:42:21 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
recon-all -s 1000108_20252_2_0 exited with ERRORS at Thu Dec 28 16:08:26 EST 2023
For more details, see the log file /gpfs/fs0/scratch/t/tpaus/jhengeni/subjects_dir_ukb/1000108_20252_2_0/scripts/recon-all.log To report a problem, see http://secure-web.cisco.com/1ywN1tDbl7MCg8OnWFYEA2Vcf-TaEWXJQlDYsrE7jJo4KqFg...
This is from Freesurfer wiki - https://surfer.nmr.mgh.harvard.edu/fswiki/UserContributions/FAQ Q. I have already skull-stripped data. Can I submit it to recon-all? A: If your skull-stripped volume does not have the cerebellum, then no. If it does, then yes, however you will have to run the data a bit differently. First you must run only -autorecon1 like this: recon-all -autorecon1 -noskullstrip -s <subjid> Then you will have to make a symbolic link or copy T1.mgz to brainmask.auto.mgz and a link from brainmask.auto.mgz to brainmask.mgz. Finally, open this brainmask.mgz file and check that it looks okay (there is no skull, cerebellum is intact; use the sample subject bert that comes with your FreeSurfer installation to make sure it looks comparable). From there you can run the final stages of recon-all: recon-all -autrecon2 -autorecon3 -s <subjid> Hope it helps.
Best,
Yujing
From: freesurfer-bounces@nmr.mgh.harvard.edu freesurfer-bounces@nmr.mgh.harvard.edu On Behalf Of James Hengenius Sent: Thursday, December 28, 2023 5:06 PM To: Freesurfer support list freesurfer@nmr.mgh.harvard.edu Subject: [Freesurfer] Recon-all failing with pre-skullstripped input data (mri_em_register can't find brainmask.mgz)
External Email - Use Caution Hello FS experts,
I downloaded some anatomical data. I have defaced full images and pre-skullstripped images for each participant. I tried the defaced images first, but FS skullstripping looks a little off (possibly because the defacing hides bits of the cranium in some images and causes problems in mri_watershed). So I would like to use the pre-skullstripped files as my initial inputs.
I have placed the pre-skullstripped file for each participant in $SUBJECTS_DIR/$subjid/mri/orig/. Each participant's skullstripped input volume is named 001.mgz.
I then submit the following command in a script to my slurm queue (after setting appropriate FS env vars), where the script input ${1} is the $subjid mentioned above:
recon-all \ -subject ${1} \ -all \ -openmp 40 \ -noskullstrip
The output log from FS ends with the following error. The function mri_em_register seems to be looking for brainmask.mgz, and fails to open it. If the input image is already extracted from the skull, do I need to manually call it brainmask.mgz rather than 001.mgz? Or am I missing something else in my function call (like order of flags)? Does -noskullstrip need to come before -openmp, for example?
Thanks! Jim H.
End of recon-all output:
writing output to T1.mgz 3D bias adjustment took 1 minutes and 20 seconds. @#@FSTIME 2023:12:28:16:07:04 mri_normalize N 7 e 80.39 S 0.66 U 102.70 P 128% M 581068 F 0 R 24411 W 0 c 32 w 229 I 0 O 0 L 1.00 1.38 9.22 @#@FSLOADPOST 2023:12:28:16:08:25 mri_normalize N 7 1.99 1.66 8.64 #------------------------------------- #@# EM Registration Thu Dec 28 16:08:25 EST 2023 /gpfs/fs0/scratch/t/tpaus/jhengeni/subjects_dir_ukb/1000108_20252_2_0/mri
mri_em_register -uns 3 -mask brainmask.mgz nu.mgz /home/t/tpaus/jhengeni/fs_versions/7.4.1/freesurfer/average/RB_all_2020-01-02.gca transforms/talairach.lta
setting unknown_nbr_spacing = 3 using MR volume brainmask.mgz to mask input volume...
== Number of threads available to mri_em_register for OpenMP = 40 == reading 1 input volumes... logging results to talairach.log reading '/home/t/tpaus/jhengeni/fs_versions/7.4.1/freesurfer/average/RB_all_2020-01-02.gca'... GCAread took 0 minutes and 1 seconds. average std = 7.2 using min determinant for regularization = 5.2 0 singular and 884 ill-conditioned covariance matrices regularized reading 'nu.mgz'... error: mghRead(/gpfs/fs0/scratch/t/tpaus/jhengeni/subjects_dir_ukb/1000108_20252_2_0/mri/brainmask.mgz, -1): could not open file^@ error: mri_em_register: could not open mask volume brainmask.mgz. ^@ @#@FSTIME 2023:12:28:16:08:25 mri_em_register N 7 e 1.42 S 0.25 U 1.43 P 118% M 446804 F 0 R 108260 W 0 c 2 w 56 I 0 O 0 L 1.99 1.66 8.64 @#@FSLOADPOST 2023:12:28:16:08:26 mri_em_register N 7 1.99 1.66 8.64 Linux nia0918.scinet.local 3.10.0-1160.102.1.el7.x86_64 #1 SMP Tue Oct 17 15:42:21 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
recon-all -s 1000108_20252_2_0 exited with ERRORS at Thu Dec 28 16:08:26 EST 2023
For more details, see the log file /gpfs/fs0/scratch/t/tpaus/jhengeni/subjects_dir_ukb/1000108_20252_2_0/scripts/recon-all.log To report a problem, see MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be http://surfer.nmr.mgh.harvard.edu/fswiki/BugReportinghttp://secure-web.cisco.com/1ywN1tDbl7MCg8OnWFYEA2Vcf-TaEWXJQlDYsrE7jJo4KqFgIlOWrzhzxDJm5uF11tgXR5fJi2W6vOuAdAAji5cdTjFimLnIGxtWSTB2-y5_HnBRRIRECgA43AhrDctzKRH546l4MaMTjVU30ZQUb5Jk54LqnNfWrh1gB0jsLHkHSgZBFmAXPrV3SIvbWFicYVt_Ebi8mCF-_Gi9xARjm2WPsG0bGNjIIC4gKMbRxQt_nSp83Y3Ik-tj4yEHQqrbfZSKxciUlXvG9xnPomANL8b4bFKfyM3zWmptSyMDvRAsv1F_SGfc8x8zU56LlZL2aPPLp5h3_wxXguFcFo2wxOQ/http%3A%2F%2Fsurfer.nmr.mgh.harvard.edu%2Ffswiki%2FBugReporting
External Email - Use Caution
Thanks for pointing that out! That seems to be working. Jim
On Thu, Dec 28, 2023 at 6:53 PM Huang, Yujing YHUANG43@mgh.harvard.edu wrote:
This is from Freesurfer wiki - https://secure-web.cisco.com/1CkNjrY48pCUahVqRgpWm_wWr-VT402BvZ0Y61vf5NBHE08...
*Q. I have already skull-stripped data. Can I submit it to recon-all?*
A: If your skull-stripped volume does not have the cerebellum, then no. If it does, then yes, however you will have to run the data a bit differently.
First you must run only -autorecon1 like this: *recon-all -autorecon1 -noskullstrip -s <subjid>*
Then you will have to make a symbolic link or copy T1.mgz to brainmask.auto.mgz and a link from brainmask.auto.mgz to brainmask.mgz. Finally, open this brainmask.mgz file and check that it looks okay (there is no skull, cerebellum is intact; use the sample subject *bert* that comes with your FreeSurfer installation to make sure it looks comparable). From there you can run the final stages of recon-all: *recon-all -autrecon2 -autorecon3 -s <subjid>*
Hope it helps.
Best,
Yujing
*From:* freesurfer-bounces@nmr.mgh.harvard.edu < freesurfer-bounces@nmr.mgh.harvard.edu> *On Behalf Of *James Hengenius *Sent:* Thursday, December 28, 2023 5:06 PM *To:* Freesurfer support list freesurfer@nmr.mgh.harvard.edu *Subject:* [Freesurfer] Recon-all failing with pre-skullstripped input data (mri_em_register can't find brainmask.mgz)
External Email - Use Caution *Hello FS experts,
I downloaded some anatomical data. I have defaced full images and pre-skullstripped images for each participant. I tried the defaced images first, but FS skullstripping looks a little off (possibly because the defacing hides bits of the cranium in some images and causes problems in mri_watershed). So I would like to use the pre-skullstripped files as my initial inputs.
I have placed the pre-skullstripped file for each participant in $SUBJECTS_DIR/$subjid/mri/orig/. Each participant's skullstripped input volume is named 001.mgz.
I then submit the following command in a script to my slurm queue (after setting appropriate FS env vars), where the script input ${1} is the $subjid mentioned above:
recon-all \ -subject ${1} \ -all \ -openmp 40 \ -noskullstrip
The output log from FS ends with the following error. The function mri_em_register seems to be looking for brainmask.mgz, and fails to open it. If the input image is already extracted from the skull, do I need to manually call it brainmask.mgz rather than 001.mgz? Or am I missing something else in my function call (like order of flags)? Does -noskullstrip need to come before -openmp, for example?
Thanks!
Jim H.
End of recon-all output:
writing output to T1.mgz 3D bias adjustment took 1 minutes and 20 seconds. @#@FSTIME 2023:12:28:16:07:04 mri_normalize N 7 e 80.39 S 0.66 U 102.70 P 128% M 581068 F 0 R 24411 W 0 c 32 w 229 I 0 O 0 L 1.00 1.38 9.22 @#@FSLOADPOST 2023:12:28:16:08:25 mri_normalize N 7 1.99 1.66 8.64 #------------------------------------- #@# EM Registration Thu Dec 28 16:08:25 EST 2023 /gpfs/fs0/scratch/t/tpaus/jhengeni/subjects_dir_ukb/1000108_20252_2_0/mri
mri_em_register -uns 3 -mask brainmask.mgz nu.mgz /home/t/tpaus/jhengeni/fs_versions/7.4.1/freesurfer/average/RB_all_2020-01-02.gca transforms/talairach.lta
setting unknown_nbr_spacing = 3 using MR volume brainmask.mgz to mask input volume...
== Number of threads available to mri_em_register for OpenMP = 40 == reading 1 input volumes... logging results to talairach.log reading '/home/t/tpaus/jhengeni/fs_versions/7.4.1/freesurfer/average/RB_all_2020-01-02.gca'... GCAread took 0 minutes and 1 seconds. average std = 7.2 using min determinant for regularization = 5.2 0 singular and 884 ill-conditioned covariance matrices regularized reading 'nu.mgz'... error:
*mghRead(/gpfs/fs0/scratch/t/tpaus/jhengeni/subjects_dir_ukb/1000108_20252_2_0/mri/brainmask.mgz, -1): could not open file^@ error: mri_em_register: could not open mask volume brainmask.mgz. ^@* @#@FSTIME 2023:12:28:16:08:25 mri_em_register N 7 e 1.42 S 0.25 U 1.43 P 118% M 446804 F 0 R 108260 W 0 c 2 w 56 I 0 O 0 L 1.99 1.66 8.64 @#@FSLOADPOST 2023:12:28:16:08:26 mri_em_register N 7 1.99 1.66 8.64 Linux nia0918.scinet.local 3.10.0-1160.102.1.el7.x86_64 #1 SMP Tue Oct 17 15:42:21 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
recon-all -s 1000108_20252_2_0 exited with ERRORS at Thu Dec 28 16:08:26 EST 2023
For more details, see the log file /gpfs/fs0/scratch/t/tpaus/jhengeni/subjects_dir_ukb/1000108_20252_2_0/scripts/recon-all.log To report a problem, see *MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be* http://secure-web.cisco.com/1XCkDsdJWsMrlmodgOeNiymmGj76pqCRK08EtqMySvGrdmfw... http://secure-web.cisco.com/1ywN1tDbl7MCg8OnWFYEA2Vcf-TaEWXJQlDYsrE7jJo4KqFgIlOWrzhzxDJm5uF11tgXR5fJi2W6vOuAdAAji5cdTjFimLnIGxtWSTB2-y5_HnBRRIRECgA43AhrDctzKRH546l4MaMTjVU30ZQUb5Jk54LqnNfWrh1gB0jsLHkHSgZBFmAXPrV3SIvbWFicYVt_Ebi8mCF-_Gi9xARjm2WPsG0bGNjIIC4gKMbRxQt_nSp83Y3Ik-tj4yEHQqrbfZSKxciUlXvG9xnPomANL8b4bFKfyM3zWmptSyMDvRAsv1F_SGfc8x8zU56LlZL2aPPLp5h3_wxXguFcFo2wxOQ/http%3A%2F%2Fsurfer.nmr.mgh.harvard.edu%2Ffswiki%2FBugReporting
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://secure-web.cisco.com/1dhL_R8iRQqwTPDYS1_aBKmgCe1b1HGfzQLXsugQwbsu-lF... 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 Mass General Brigham Compliance HelpLine at https://secure-web.cisco.com/1u3qlaC_kZQVDrxR8qBks_WD7TpngQYAMvvsaQoZs9Js8Z7... < https://secure-web.cisco.com/1u3qlaC_kZQVDrxR8qBks_WD7TpngQYAMvvsaQoZs9Js8Z7... .
freesurfer@nmr.mgh.harvard.edu