Hi Cong,
This totally looks like a problem with absolute/relative paths. Can you please 
try again, but using the full path to the T2? Something like:
segmentHA_T2.sh  control004  /Users/cong/data/subjects/control004/mri/T2.nii T2 
1
If this works, let me know and I’ll fix the code.
Cheers,
/E


--
Juan Eugenio Iglesias
ERC Senior Research Fellow
Translational Imaging Group
University College London
http://www.jeiglesias.com
http://cmictig.cs.ucl.ac.uk/


From: <freesurfer-boun...@nmr.mgh.harvard.edu> on behalf of Cong 
<3110103...@zju.edu.cn>
Reply-To: Freesurfer support list <freesurfer@nmr.mgh.harvard.edu>
Date: Wednesday, 29 November 2017 at 09:55
To: "freesurfer@nmr.mgh.harvard.edu" <freesurfer@nmr.mgh.harvard.edu>
Subject: [Freesurfer] error in segmentHA_T2.sh

Dear freesurfer experts
    I am trying segment hippocampal and amygdala subregions in dev 
version(freesurfer-i386-apple-darwin11.4.2-dev-20171024), the segmentHA_T1.sh 
works well. However, when I try to add a T2 propeller sequence it doesn’t work. 
I am sure the T2.nii file is in mri folder, and this T2.nii file works well in 
6.0.0 version for segmenting hippocampal subregion. I pasted the wrong scripts, 
could you tell me what’s wrong? Thanks!

Best Regards
Cong


   BrainwaverdeMacBook-Pro:subjects Brainwaver$ segmentHA_T2.sh  control004  
control004/mri/T2.nii T2 1
#--------------------------------------------
#@# Hippocampal Subfields processing (T1+T2) left 2017年11月29日 星期三 17时27分20秒 CST
------------------------------------------
Setting up environment variables
---
DYLD_LIBRARY_PATH is 
.:/Users/Brainwaver/Documents/freesurfer/MCRv80//runtime/maci64:/Users/Brainwaver/Documents/freesurfer/MCRv80//bin/maci64:/Users/Brainwaver/Documents/freesurfer/MCRv80//sys/os/maci64:
Warning: application is running on a locale different from the original 
platform locale.
Registering norm.mgz to additional volume
znzreadInt: znzread failed
znzreadInt: znzread failed
niiRead(): error opening file control004/mri/T2.nii
mri_robust_register.bin: could not open MRI target control004/mri/T2.nii.

/Users/Brainwaver/Documents/freesurfer/bin//mri_robust_register --mov 
/Users/Brainwaver/Documents/freesurfer/subjects/control004/mri/norm.mgz 
--maskmov 
/Users/Brainwaver/Documents/freesurfer/subjects/control004/tmp/hippoSF_T1T2_v20_T2_left//wholeBrainMask.mgz
 --dst control004/mri/T2.nii --lta 
/Users/Brainwaver/Documents/freesurfer/subjects/control004/mri/transforms/T1_to_T2.v20.lta
 --noinit --cost NMI -nosym >/dev/null: Signal 127
ERROR: cannot find transform file 
/Users/Brainwaver/Documents/freesurfer/subjects/control004/mri/transforms/T1_to_T2.v20.lta
gunzip: can't stat: 
/Users/Brainwaver/Documents/freesurfer/subjects/control004/tmp/hippoSF_T1T2_v20_T2_left//T2resampledLikeT1.mgz
 
(/Users/Brainwaver/Documents/freesurfer/subjects/control004/tmp/hippoSF_T1T2_v20_T2_left//T2resampledLikeT1.mgz.gz):
 No such file or directory
ERROR: problem reading fname
SWITCH expression must be a scalar or string constant.

Error in myMRIread>load_mgh (line 550)



Error in myMRIread>myMRIread_aux (line 92)



Error in myMRIread (line 63)



Error in segmentSubjectT1T2_autoEstimateAlveusML (line 198)



MATLAB:badSwitchExpression
#--------------------------------------------
#@# Hippocampal Subfields processing (T1+T2) right 2017年11月29日 星期三 17时27分31秒 CST
------------------------------------------
Setting up environment variables
---
DYLD_LIBRARY_PATH is 
.:/Users/Brainwaver/Documents/freesurfer/MCRv80//runtime/maci64:/Users/Brainwaver/Documents/freesurfer/MCRv80//bin/maci64:/Users/Brainwaver/Documents/freesurfer/MCRv80//sys/os/maci64:
Warning: application is running on a locale different from the original 
platform locale.
Registering norm.mgz to additional volume
znzreadInt: znzread failed
znzreadInt: znzread failed
niiRead(): error opening file control004/mri/T2.nii
mri_robust_register.bin: could not open MRI target control004/mri/T2.nii.

/Users/Brainwaver/Documents/freesurfer/bin//mri_robust_register --mov 
/Users/Brainwaver/Documents/freesurfer/subjects/control004/mri/norm.mgz 
--maskmov 
/Users/Brainwaver/Documents/freesurfer/subjects/control004/tmp/hippoSF_T1T2_v20_T2_right//wholeBrainMask.mgz
 --dst control004/mri/T2.nii --lta 
/Users/Brainwaver/Documents/freesurfer/subjects/control004/mri/transforms/T1_to_T2.v20.lta
 --noinit --cost NMI -nosym >/dev/null: Signal 127
ERROR: cannot find transform file 
/Users/Brainwaver/Documents/freesurfer/subjects/control004/mri/transforms/T1_to_T2.v20.lta
gunzip: can't stat: 
/Users/Brainwaver/Documents/freesurfer/subjects/control004/tmp/hippoSF_T1T2_v20_T2_right//T2resampledLikeT1.mgz
 
(/Users/Brainwaver/Documents/freesurfer/subjects/control004/tmp/hippoSF_T1T2_v20_T2_right//T2resampledLikeT1.mgz.gz):
 No such file or directory
ERROR: problem reading fname
SWITCH expression must be a scalar or string constant.

Error in myMRIread>load_mgh (line 550)



Error in myMRIread>myMRIread_aux (line 92)



Error in myMRIread (line 63)



Error in segmentSubjectT1T2_autoEstimateAlveusML (line 198)



MATLAB:badSwitchExpression

All done!

If you have used results from this software for a publication, please cite:

Iglesias, J.E., Augustinack, J.C., Nguyen, K., Player, C.M., Player, A., Wright,
M., Roy, N., Frosch, M.P., McKee, A.C., Wald, L.L., Fischl, B., and Van 
Leemput, K.,
A computational atlas of the hippocampal formation using ex vivo, ultra-high 
resolution
MRI: Application to adaptive segmentation of in vivo MRI.  Neuroimage 115, 
2015, 117-137.
http://dx.doi.org/10.1016/j.neuroimage.2015.04.042

In addition, if you have used the segmentation of the nuclei of the amygdala, 
please also cite:

Saygin, Z.M. & Kliemann, D. (joint 1st authors), Iglesias, J.E., van der Kouwe, 
A.J.W.,
Boyd, E., Reuter, M., Stevens, A., Van Leemput, K., McKee, A., Frosch, M.P., 
Fischl, B.,
and Augustinack, J.C., High-resolution magnetic resonance imaging reveals 
nuclei of the
human amygdala: manual segmentation to automatic atlas. Neuroimage 155, 2017, 
370-382.
http://doi.org/10.1016/j.neuroimage.2017.04.046

BrainwaverdeMacBook-Pro:subjects Brainwaver$
_______________________________________________
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.

Reply via email to