Thanks, Bruce, Doug,
I will check how to do that.
Hemant

On Thu, Feb 16, 2012 at 11:21 AM, Douglas N Greve <greve@nmr.mgh.harvard.edu> wrote:
Hi Hemant, sorry for the delay in getting back to you. I'm not sure what could be causing the problem. FreeSurfer definitely reads the direction cosines from the dicom. If you upload the dicom volume to our file drop, I'll take a look. filedrop url is at the end of this email.
doug

Hemant Bokil wrote:
Hi Bruce,
Thanks very much for your prompt reply. I am puzzled that freesurfer doesn't get the direction cosines. Which fields is it looking for in the dicom metadata ? When I load the slices in Matlab, I can see ImagePositionPatient and ImageOrientationPatient and SliceLocation and they all seem reasonable. Oddly this problem occurs on some datasets and not others even though I can't spot obvious differences in the dicom metadata fields.

As for your question regarding data origin, the problematic datasets are straight from the scanners as far as I know (although they were acquired from various hospitals as part of a long-done clinical study, so who knows..).
Hemant

On Fri, Feb 10, 2012 at 4:12 PM, Bruce Fischl <fischl@nmr.mgh.harvard.edu <mailto:fischl@nmr.mgh.harvard.edu>> wrote:

   Hi Hemant

   sorry for missing your previous post. I'm not sure what to tell
   you though, if the direction cosines are nans that's going to be
   trouble. You could still visualize your data in a slice viewer,
   but you may never be able to tell left from right. Where did you
   get the dicoms? Are they right off the scanner, or did they go
   through some other package first? I don't think we've seen this
   problem before.

   cheers
   Bruce


   On Fri, 10 Feb 2012, Hemant Bokil wrote:

       Hello,
       I had posted this question earlier but no one picked it up so
       I am trying
       again. Briefly, I have been having difficulties with the very
       first step of
       the recon-all pipeline, namely, in conversion of my dicom
       datasets to
       freesurfer's mgz format. The error message (attached below)
       suggests that
       freesurfer is able to find the files correctly, but is unable
       to find the
       slice direction because it gets 'nan' for the variable Vs.
       This seems to
       result is problems with reslicing and program exits with
       errors. Has anyone
       encountered this issue ? The MR files themselves look fine
       when viewed in
       other viewers (note that this problem has now occurred with
       several
       different datasets). Would appreciate any input. Thanks,
       Hemant


       recon-all -s 101 -i DICOM_MR_DATA/101/1000430544_
       ST3445_SR10_V10000.DICOM
       Subject Stamp: freesurfer-Linux-centos4_x86_ 64-stable-pub-v5.1.0
       Current Stamp: freesurfer-Linux-centos4_x86_ 64-stable-pub-v5.1.0
       INFO: SUBJECTS_DIR is /home/hemant/ FreeSurferSubjects
       Actual FREESURFER_HOME /usr/local/freesurfer
       Linux Lab-3.intelect.local 2.6.32-71.29.1.el6.x86_64 #1 SMP
       Mon Jun 27
       19:49:27 BST 2011 x86_64 x86_64 x86_64 GNU/Linux
       /home/hemant/ FreeSurferSubjects/101

        mri_convert
       /home/hemant/DICOM_MR_DATA/ 101/1000430544_ST3445_SR10_
       V10000.DICOM
       /home/hemant/ FreeSurferSubjects/101/mri/ orig/001.mgz

       mri_convert
       /home/hemant/DICOM_MR_DATA/ 101/1000430544_ST3445_SR10_
       V10000.DICOM
       /home/hemant/ FreeSurferSubjects/101/mri/ orig/001.mgz
       $Id: mri_convert.c,v 1.179.2.2 2011/05/16 20:53:47 greve Exp $
       reading from
       /home/hemant/DICOM_MR_DATA/ 101/1000430544_ST3445_SR10_
       V10000.DICOM...
       Starting DICOMRead2()
       dcmfile = /home/hemant/DICOM_MR_DATA/
       101/1000430544_ST3445_SR10_ V10000.DICOM
       dcmdir = /home/hemant/DICOM_MR_DATA/101
       Ref Series No = 10
       Found 139 files, checking for dicoms
       Found 136 dicom files in series.
       First Sorting
       Computing Slice Direction
       Vs: 0 0 0
       Vs: -nan -nan -nan
       Second Sorting
       Counting frames
       nframes = 136
       nslices = 1
       ndcmfiles = 136
       PE Dir = ROW (dicom read)
       TransferSyntaxUID: --1.2.840.10008.1.2--
       jpegUID:           --1.2.840.10008.1.2.4--
       Loading pixel data
       MRIresample(): error inverting matrix; determinant is -nan,
       matrix is:
       TR=5.25, TE=2.00, TI=450.00, flip angle=12.00
       i_ras = (-1, 0, 0)
       j_ras = (0, -1, 0)
       k_ras = (nan, nan, -nan)
       Reslicing using trilinear interpolation
       -0.938   0.000   nan   nan;
        0.000  -0.938   nan   nan;
        0.000   0.000  -nan  -nan;
        0.000   0.000   0.000   1.000;
       Linux Lab-3.intelect.local 2.6.32-71.29.1.el6.x86_64 #1 SMP
       Mon Jun 27
       19:49:27 BST 2011 x86_64 x86_64 x86_64 GNU/Linux

       recon-all -s 101 exited with ERRORS at Fri Feb 10 16:00:03 EST
       2012





   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

--
Douglas N. Greve, Ph.D.
MGH-NMR Center
greve@nmr.mgh.harvard.edu
Phone Number: 617-724-2358 Fax: 617-726-7422

Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
FileDrop: www.nmr.mgh.harvard.edu/facility/filedrop/index.html