External Email - Use Caution
Hello Everyone, I hope you are doing well!
I am trying to recon-all a DICOM file, for the ultimate hope of being able to identify the location of M1 via parcellation. I have successfully been able to do so for 2 subjects already, though for some reason I am having a problem with the MRI convert stage from the .dcm file to the .nii.gz file. I copied/pasted the terminal shell I tried performing above. I am using a Mac (Yosemite 10.10.5) with FreeSurfer V6.0.0
Further, I think it might be helpful to note that I am a very extreme novice in computer science/coding--I have completed recon-all's of 2 subjects by following, essentially line-by-line, the "FreeSurfer Download and Install Page," and this process was the first time I ever used the terminal shell. (In this way, I would absolutely LOVE if anyone might be able to explain where I went wrong as simplistically as possible).
Thank you all so much for the help- I hope you have a great start to the week! - Justin
DBI 05 MRI Convert Error
Justins-Computer:~ justinarnett$ export FREESURFER_HOME=/Applications/freesurfer
Justins-Computer:~ justinarnett$ source $FREESURFER_HOME/SetUpFreeSurfer.sh
-------- freesurfer-Darwin-OSX-stable-pub-v6.0.0-2beb96c --------
Setting up environment for FreeSurfer/FS-FAST (and FSL)
FREESURFER_HOME /Applications/freesurfer
FSFAST_HOME /Applications/freesurfer/fsfast
FSF_OUTPUT_FORMAT nii.gz
SUBJECTS_DIR /Applications/freesurfer/subjects
-bash: [: /Users/justinarnett: binary operator expected
grep: /Users/justinarnett: Is a directory
grep: 1/matlab/startup.m: No such file or directory
grep: /Users/justinarnett: Is a directory
grep: 1/matlab/startup.m: No such file or directory
grep: /Users/justinarnett: Is a directory
grep: 1/matlab/startup.m: No such file or directory
MNI_DIR /Applications/freesurfer/mni
Justins-Computer:~ justinarnett$ export SUBJECTS_DIR=/Applications/freesurfer/subjects/DBI05MRI
Justins-Computer:~ justinarnett$ cd /Applications/freesurfer/subjects/DBI05MRI
Justins-Computer:DBI05MRI justinarnett$ cp $FREESURFER_HOME/subjects/DBI05MRI/Image1.dcm
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file target_file
cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file ... target_directory
Justins-Computer:DBI05MRI justinarnett$ mri_convert Image1.dcm Image1.nii.gz
/Applications/freesurfer/FreeSurferEnv.sh: line 226: [: /Users/justinarnett: binary operator expected
grep: /Users/justinarnett: Is a directory
grep: 1/matlab/startup.m: No such file or directory
grep: /Users/justinarnett: Is a directory
grep: 1/matlab/startup.m: No such file or directory
grep: /Users/justinarnett: Is a directory
grep: 1/matlab/startup.m: No such file or directory
mri_convert.bin Image1.dcm Image1.nii.gz
$Id: mri_convert.c,v 1.226 2016/02/26 16:15:24 mreuter Exp $
reading from Image1.dcm...
Starting DICOMRead2()
dcmfile = /Applications/freesurfer/subjects/DBI05MRI/Image1.dcm
dcmdir = /Applications/freesurfer/subjects/DBI05MRI
Ref Series No = 401
Found 824 files, checking for dicoms
WARNING: tag ImageNumber not found in /Applications/freesurfer/subjects/DBI05MRI/DICOMDIR
WARNING: tag SeriesNumber not found in /Applications/freesurfer/subjects/DBI05MRI/DICOMDIR
WARNING: tag image orientation not found in /Applications/freesurfer/subjects/DBI05MRI/DICOMDIR
ERROR: GetDICOMInfo(): dcmGetDWIParams() 10
DICOM File: /Applications/freesurfer/subjects/DBI05MRI/DICOMDIR
break DICOMRead.c:5228
Found 164 dicom files in series.
WARNING: tag ImageNumber not found in /Applications/freesurfer/subjects/DBI05MRI/DICOMDIR
WARNING: tag SeriesNumber not found in /Applications/freesurfer/subjects/DBI05MRI/DICOMDIR
WARNING: tag image orientation not found in /Applications/freesurfer/subjects/DBI05MRI/DICOMDIR
ERROR: GetDICOMInfo(): dcmGetDWIParams() 10
DICOM File: /Applications/freesurfer/subjects/DBI05MRI/DICOMDIR
break DICOMRead.c:5228
First Sorting
Computing Slice Direction
Vs: -120.054 -103.192 34.4639
Vs: -0.741 -0.636922 0.212719
Second Sorting
IsDWI = 0, IsPhilipsDWI = 0
Counting frames
nframes = 1
nslices = 165
ndcmfiles = 165
MRIallocSequence(0, 0, 165, 1): bad parm
No such file or directory
ERROR: mri alloc failed
Sorry, there are a lot of things going on down there, it is hard to figure out what is happening. It looks like the sourcing of SetUpFreeSurfer.sh is failing is that right? Then it looks like the copy (cp) is failing. Then when you run mri_convert, it looks like another bash error. It looks like mri_convert is trying to unpack it as a diffusion file and that may be what is causing the final error. Try export FS_LOAD_DWI=0
On 10/8/18 9:54 PM, Justin Arnett wrote:
Hello Everyone, I hope you are doing well!
I am trying to recon-all a DICOM file, for the ultimate hope of being able to identify the location of M1 via parcellation. I have successfully been able to do so for 2 subjects already, though for some reason I am having a problem with the MRI convert stage from the .dcm file to the .nii.gz file. I copied/pasted the terminal shell I tried performing above. I am using a Mac (Yosemite 10.10.5) with FreeSurfer V6.0.0
Further, I think it might be helpful to note that I am a very extreme novice in computer science/coding--I have completed recon-all's of 2 subjects by following, essentially line-by-line, the "FreeSurfer Download and Install Page," and this process was the first time I ever used the terminal shell. (In this way, I would absolutely LOVE if anyone might be able to explain where I went wrong as simplistically as possible).
Thank you all so much for the help- I hope you have a great start to the week! - Justin
DBI 05 MRI Convert Error
Justins-Computer:~ justinarnett$ export FREESURFER_HOME=/Applications/freesurfer Justins-Computer:~ justinarnett$ source $FREESURFER_HOME/SetUpFreeSurfer.sh -------- freesurfer-Darwin-OSX-stable-pub-v6.0.0-2beb96c -------- Setting up environment for FreeSurfer/FS-FAST (and FSL) FREESURFER_HOME /Applications/freesurfer FSFAST_HOME /Applications/freesurfer/fsfast FSF_OUTPUT_FORMAT nii.gz SUBJECTS_DIR /Applications/freesurfer/subjects -bash: [: /Users/justinarnett: binary operator expected grep: /Users/justinarnett: Is a directory grep: 1/matlab/startup.m: No such file or directory grep: /Users/justinarnett: Is a directory grep: 1/matlab/startup.m: No such file or directory grep: /Users/justinarnett: Is a directory grep: 1/matlab/startup.m: No such file or directory MNI_DIR /Applications/freesurfer/mni Justins-Computer:~ justinarnett$ export SUBJECTS_DIR=/Applications/freesurfer/subjects/DBI05MRI Justins-Computer:~ justinarnett$ cd /Applications/freesurfer/subjects/DBI05MRI Justins-Computer:DBI05MRI justinarnett$ cp $FREESURFER_HOME/subjects/DBI05MRI/Image1.dcm usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file target_file cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file ... target_directory Justins-Computer:DBI05MRI justinarnett$ mri_convert Image1.dcm Image1.nii.gz /Applications/freesurfer/FreeSurferEnv.sh: line 226: [: /Users/justinarnett: binary operator expected grep: /Users/justinarnett: Is a directory grep: 1/matlab/startup.m: No such file or directory grep: /Users/justinarnett: Is a directory grep: 1/matlab/startup.m: No such file or directory grep: /Users/justinarnett: Is a directory grep: 1/matlab/startup.m: No such file or directory mri_convert.bin Image1.dcm Image1.nii.gz $Id: mri_convert.c,v 1.226 2016/02/26 16:15:24 mreuter Exp $ reading from Image1.dcm... Starting DICOMRead2() dcmfile = /Applications/freesurfer/subjects/DBI05MRI/Image1.dcm dcmdir = /Applications/freesurfer/subjects/DBI05MRI Ref Series No = 401 Found 824 files, checking for dicoms WARNING: tag ImageNumber not found in /Applications/freesurfer/subjects/DBI05MRI/DICOMDIR WARNING: tag SeriesNumber not found in /Applications/freesurfer/subjects/DBI05MRI/DICOMDIR WARNING: tag image orientation not found in /Applications/freesurfer/subjects/DBI05MRI/DICOMDIR ERROR: GetDICOMInfo(): dcmGetDWIParams() 10 DICOM File: /Applications/freesurfer/subjects/DBI05MRI/DICOMDIR break DICOMRead.c:5228 Found 164 dicom files in series. WARNING: tag ImageNumber not found in /Applications/freesurfer/subjects/DBI05MRI/DICOMDIR WARNING: tag SeriesNumber not found in /Applications/freesurfer/subjects/DBI05MRI/DICOMDIR WARNING: tag image orientation not found in /Applications/freesurfer/subjects/DBI05MRI/DICOMDIR ERROR: GetDICOMInfo(): dcmGetDWIParams() 10 DICOM File: /Applications/freesurfer/subjects/DBI05MRI/DICOMDIR break DICOMRead.c:5228 First Sorting Computing Slice Direction Vs: -120.054 -103.192 34.4639 Vs: -0.741 -0.636922 0.212719 Second Sorting IsDWI = 0, IsPhilipsDWI = 0 Counting frames nframes = 1 nslices = 165 ndcmfiles = 165 MRIallocSequence(0, 0, 165, 1): bad parm No such file or directory ERROR: mri alloc failed
_______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edumailto:Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
freesurfer@nmr.mgh.harvard.edu