There appears to be a problem when freesurfer reads in that dicom file. See if this works
mri_convert -it dicom /home/omid/freesurfer/subjects/IBS_raw/_orig_/csd/E703S2I1.MR /home/omid/freesurfer/subjects/IBS_raw/csd/mri/orig/001.mgz
Jerry Yeou-Wei Chen wrote:
Hello,
We have been having difficulties importing GE .MR files into FreeSurfer.
We have tried a number of methods:
- directly importing .MR
- converting to .IMG via BrainVoyager, then importing .IMG with .HDR
- converting to .IMG via BrainVoyager and creating .MAT using SPM99,
then importing .IMG with .HDR and .MAT 4) renaming .MR to .DCM, then importing .DCM
Here is a summary of our problems:
- autorecon1 exits with error
- orig.mgz is in wrong orientation; T1.mgz is in correct orientation
but a "cosine info" error arises when loading in tkmedit; brainmask.mgz is in wrong orientation; reconstructed surface is in wrong orientation (i.e. not actually a hemisphere; appears oblique) 3) orig, T1, and brainmask are all in wrong orientation 4) autorecon1 exits with error
(in all cases except reconstructed surface, "wrong orientation" means: C = axial with anterior to the left and right to the top H = sagittal upside-down S = coronal with superior to the left )
Here is a summary of what seems to be the source of our errors, from corresponding recon-all.log files (I have attached .doc and .txt files with longer excerpts)
mri_convert /home/omid/freesurfer/subjects/IBS_raw/csd/mri/rawavg.mgz /home/omid/freesurfer/subjects/IBS_raw/csd/mri/orig.mgz --conform MRIresample(): source matrix has zero determinant; matrix is: -0.000 0.000 -0.000 0.000; 0.000 0.000 0.000 -15877550310885762478336514187067392.000; 0.000 -0.000 -0.000 -2013832203448376356765696.000; 0.000 0.000 0.000 1.000;
mri_convert /home/omid/freesurfer/subjects/IBS_fromBV/_orig_/c1/sd0823iso.img /home/omid/freesurfer/subjects/IBS_fromBV/c1/mri/orig/001.mgz
INFO: could not find /home/omid/freesurfer/subjects/IBS_fromBV/_orig_/c1/sd0823iso.mat file for direction cosine info. INFO: use Analyze 7.5 hdr->hist.orient value: 0, transverse unflipped (default). INFO: if not valid, please provide the information in /home/omid/freesurfer/subjects/IBS_fromBV/_orig_/c1/sd0823iso.mat file
reading from /home/omid/freesurfer/subjects/IBS_fromBV_reO/_orig_/c1/sd0823iso.img... WARNING: analyzeRead(): matfile /home/omid/freesurfer/subjects/IBS_fromBV_reO/_orig_/c1/sd0823iso.mat exists but could not read ... may not be matlab4 mat file ... proceeding without it.
INFO: could not find /home/omid/freesurfer/subjects/IBS_fromBV_reO/_orig_/c1/sd0823iso.mat file for direction cosine info. INFO: use Analyze 7.5 hdr->hist.orient value: 0, transverse unflipped (default). INFO: if not valid, please provide the information in /home/omid/freesurfer/subjects/IBS_fromBV_reO/_orig_/c1/sd0823iso.mat file
mri_convert /home/omid/freesurfer/subjects/IBS_renamed/_orig_/c1/anat_1.dcm /home/omid/freesurfer/subjects/IBS_renamed/c1/mri/orig/001.mgz reading from /home/omid/freesurfer/subjects/IBS_renamed/_orig_/c1/anat_1.dcm... genesisRead(): can't determine file name format for
We are now in the thick of attempting to manually import the volume from .MR to .MGZ by using the load_mgh.m, load_mgh2.m, save_mgh.m, and save_mgh.m scripts, but before pursuing that avenue further we would like to seek some expert advice. Any thoughts or suggestions would be greatly appreciated. Please let me know if I can provide any more necessary information.
Thank you for your time,
- Jerry
=============================================================================
- IBS_raw -> autorecon1 exit with error
=============================================================================
/home/omid/freesurfer/subjects/IBS_raw/csd
mri_convert /home/omid/freesurfer/subjects/IBS_raw/_orig_/csd/E703S2I1.MR /home/omid/freesurfer/subjects/IBS_raw/csd/mri/orig/001.mgz
mri_convert /home/omid/freesurfer/subjects/IBS_raw/_orig_/csd/E703S2I1.MR /home/omid/freesurfer/subjects/IBS_raw/csd/mri/orig/001.mgz reading from /home/omid/freesurfer/subjects/IBS_raw/_orig_/csd/E703S2I1.MR... freadShort: fread failed No such file or directory freadShort: fread failed No such file or directory fname_format : /home/omid/freesurfer/subjects/IBS_raw/_orig_/csd/E703S2I%d.MR fname_format2 : /home/omid/freesurfer/subjects/IBS_raw/_orig_/csd/E703S2I%03d.MR zero frames specified in file - setting to 1 TR=811509.69, TE=811509.69, TI=811509.69, flip angle=0.00 i_ras = (-0, 1, 1.01471e-34) j_ras = (0, 0, -1) k_ras = (-0.997933, 0, -0.0642636) writing to /home/omid/freesurfer/subjects/IBS_raw/csd/mri/orig/001.mgz... #-------------------------------------------- #@# MotionCor Tue Jul 10 11:53:26 EDT 2007 Found 1 runs /home/omid/freesurfer/subjects/IBS_raw/csd/mri/orig/001.mgz WARNING: only one run found. This is OK, but motion correction cannot be performed on one run, so I'll copy the run to rawavg and continue.
cp /home/omid/freesurfer/subjects/IBS_raw/csd/mri/orig/001.mgz /home/omid/freesurfer/subjects/IBS_raw/csd/mri/rawavg.mgz
/home/omid/freesurfer/subjects/IBS_raw/csd
mri_convert /home/omid/freesurfer/subjects/IBS_raw/csd/mri/rawavg.mgz /home/omid/freesurfer/subjects/IBS_raw/csd/mri/orig.mgz --conform
mri_convert /home/omid/freesurfer/subjects/IBS_raw/csd/mri/rawavg.mgz /home/omid/freesurfer/subjects/IBS_raw/csd/mri/orig.mgz --conform MRIresample(): source matrix has zero determinant; matrix is: -0.000 0.000 -0.000 0.000; 0.000 0.000 0.000 -15877550310885762478336514187067392.000; 0.000 -0.000 -0.000 -2013832203448376356765696.000; 0.000 0.000 0.000 1.000; reading from /home/omid/freesurfer/subjects/IBS_raw/csd/mri/rawavg.mgz... TR=811509.69, TE=811509.69, TI=811509.69, flip angle=0.00 i_ras = (-0, 1, 1.01471e-34) j_ras = (0, 0, -1) k_ras = (-0.997933, 0, -0.0642636) Original Data has (4.6006e-41, 4.6006e-41, 4.6006e-41) mm size and (256, 256, 124) voxels. Data is conformed to 1 mm size and 256 voxels for all directions changing data type from 4 to 0 (noscale = 0)... MRIchangeType: Building histogram Reslicing using trilinear interpolation Linux omid-laptop 2.6.17-10-386 #2 Tue Dec 5 22:26:18 UTC 2006 i686 GNU/Linux
recon-all exited with ERRORS at Tue Jul 10 11:53:34 EDT 2007
============================================================================= 2) IBS_fromBV -> mri_convert cosine error: =============================================================================
mri_convert /home/omid/freesurfer/subjects/IBS_fromBV/_orig_/c1/sd0823iso.img /home/omid/freesurfer/subjects/IBS_fromBV/c1/mri/orig/001.mgz
mri_convert /home/omid/freesurfer/subjects/IBS_fromBV/_orig_/c1/sd0823iso.img /home/omid/freesurfer/subjects/IBS_fromBV/c1/mri/orig/001.mgz
INFO: could not find /home/omid/freesurfer/subjects/IBS_fromBV/_orig_/c1/sd0823iso.mat file for direction cosine info. INFO: use Analyze 7.5 hdr->hist.orient value: 0, transverse unflipped (default). INFO: if not valid, please provide the information in /home/omid/freesurfer/subjects/IBS_fromBV/_orig_/c1/sd0823iso.mat file
reading from /home/omid/freesurfer/subjects/IBS_fromBV/_orig_/c1/sd0823iso.img... TR=0.00, TE=0.00, TI=0.00, flip angle=0.00 i_ras = (-1, 0, 0) j_ras = (0, 1, 0) k_ras = (0, 0, 1) writing to /home/omid/freesurfer/subjects/IBS_fromBV/c1/mri/orig/001.mgz... #-------------------------------------------- #@# MotionCor Wed May 30 12:51:21 EDT 2007 Found 1 runs /home/omid/freesurfer/subjects/IBS_fromBV/c1/mri/orig/001.mgz WARNING: only one run found. This is OK, but motion correction cannot be performed on one run, so I'll copy the run to rawavg and continue.
cp /home/omid/freesurfer/subjects/IBS_fromBV/c1/mri/orig/001.mgz /home/omid/freesurfer/subjects/IBS_fromBV/c1/mri/rawavg.mgz
/home/omid/freesurfer/subjects/IBS_fromBV/c1
mri_convert /home/omid/freesurfer/subjects/IBS_fromBV/c1/mri/rawavg.mgz /home/omid/freesurfer/subjects/IBS_fromBV/c1/mri/orig.mgz --conform
mri_convert /home/omid/freesurfer/subjects/IBS_fromBV/c1/mri/rawavg.mgz /home/omid/freesurfer/subjects/IBS_fromBV/c1/mri/orig.mgz --conform reading from /home/omid/freesurfer/subjects/IBS_fromBV/c1/mri/rawavg.mgz... TR=0.00, TE=0.00, TI=0.00, flip angle=0.00 i_ras = (-1, 0, 0) j_ras = (0, 1, 0) k_ras = (0, 0, 1) Original Data has (1, 1, 1) mm size and (256, 256, 256) voxels. Data is conformed to 1 mm size and 256 voxels for all directions Reslicing using trilinear interpolation writing to /home/omid/freesurfer/subjects/IBS_fromBV/c1/mri/orig.mgz...
mri_add_xform_to_header -c /home/omid/freesurfer/subjects/IBS_fromBV/c1/mri/transforms/talairach.xfm /home/omid/freesurfer/subjects/IBS_fromBV/c1/mri/orig.mgz /home/omid/freesurfer/subjects/IBS_fromBV/c1/mri/orig.mgz
INFO: extension is mgz
============================================================================= 3) IBS_fromBV_reO -> mri_convert .MAT, cosine error =============================================================================
mri_convert /home/omid/freesurfer/subjects/IBS_fromBV_reO/_orig_/c1/sd0823iso.img /home/omid/freesurfer/subjects/IBS_fromBV_reO/c1/mri/orig/001.mgz
mri_convert /home/omid/freesurfer/subjects/IBS_fromBV_reO/_orig_/c1/sd0823iso.img /home/omid/freesurfer/subjects/IBS_fromBV_reO/c1/mri/orig/001.mgz matfile: only read 476 bytes of name (1768711468 specified)
MatlabRead: readHeader returned NULL
reading from /home/omid/freesurfer/subjects/IBS_fromBV_reO/_orig_/c1/sd0823iso.img... WARNING: analyzeRead(): matfile /home/omid/freesurfer/subjects/IBS_fromBV_reO/_orig_/c1/sd0823iso.mat exists but could not read ... may not be matlab4 mat file ... proceeding without it.
INFO: could not find /home/omid/freesurfer/subjects/IBS_fromBV_reO/_orig_/c1/sd0823iso.mat file for direction cosine info. INFO: use Analyze 7.5 hdr->hist.orient value: 0, transverse unflipped (default). INFO: if not valid, please provide the information in /home/omid/freesurfer/subjects/IBS_fromBV_reO/_orig_/c1/sd0823iso.mat file
TR=0.00, TE=0.00, TI=0.00, flip angle=0.00 i_ras = (-1, 0, 0) j_ras = (0, 1, 0) k_ras = (0, 0, 1) writing to /home/omid/freesurfer/subjects/IBS_fromBV_reO/c1/mri/orig/001.mgz... #-------------------------------------------- #@# MotionCor Wed May 30 14:51:26 EDT 2007 Found 1 runs /home/omid/freesurfer/subjects/IBS_fromBV_reO/c1/mri/orig/001.mgz WARNING: only one run found. This is OK, but motion correction cannot be performed on one run, so I'll copy the run to rawavg and continue.
cp /home/omid/freesurfer/subjects/IBS_fromBV_reO/c1/mri/orig/001.mgz /home/omid/freesurfer/subjects/IBS_fromBV_reO/c1/mri/rawavg.mgz
/home/omid/freesurfer/subjects/IBS_fromBV_reO/c1
mri_convert /home/omid/freesurfer/subjects/IBS_fromBV_reO/c1/mri/rawavg.mgz /home/omid/freesurfer/subjects/IBS_fromBV_reO/c1/mri/orig.mgz --conform
mri_convert /home/omid/freesurfer/subjects/IBS_fromBV_reO/c1/mri/rawavg.mgz /home/omid/freesurfer/subjects/IBS_fromBV_reO/c1/mri/orig.mgz --conform reading from /home/omid/freesurfer/subjects/IBS_fromBV_reO/c1/mri/rawavg.mgz... TR=0.00, TE=0.00, TI=0.00, flip angle=0.00 i_ras = (-1, 0, 0) j_ras = (0, 1, 0) k_ras = (0, 0, 1) Original Data has (1, 1, 1) mm size and (256, 256, 256) voxels. Data is conformed to 1 mm size and 256 voxels for all directions Reslicing using trilinear interpolation writing to /home/omid/freesurfer/subjects/IBS_fromBV_reO/c1/mri/orig.mgz...
mri_add_xform_to_header -c /home/omid/freesurfer/subjects/IBS_fromBV_reO/c1/mri/transforms/talairach.xfm /home/omid/freesurfer/subjects/IBS_fromBV_reO/c1/mri/orig.mgz /home/omid/freesurfer/subjects/IBS_fromBV_reO/c1/mri/orig.mgz
INFO: extension is mgz
============================================================================= 4) IBS_renamed -> autorecon1 exit with error =============================================================================
mri_convert /home/omid/freesurfer/subjects/IBS_renamed/_orig_/c1/anat_1.dcm /home/omid/freesurfer/subjects/IBS_renamed/c1/mri/orig/001.mgz
mri_convert /home/omid/freesurfer/subjects/IBS_renamed/_orig_/c1/anat_1.dcm /home/omid/freesurfer/subjects/IBS_renamed/c1/mri/orig/001.mgz reading from /home/omid/freesurfer/subjects/IBS_renamed/_orig_/c1/anat_1.dcm... genesisRead(): can't determine file name format for /home/omid/freesurfer/subjects/IBS_renamed/_orig_/c1/anat_1.dcm Linux omid-laptop 2.6.17-10-386 #2 Tue Dec 5 22:26:18 UTC 2006 i686 GNU/Linux
recon-all exited with ERRORS at Thu Jun 28 13:00:47 EDT 2007
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer