It did run all the way through using the .img files.

Should I try that mri_convert on all 4 real/imaginary files?


On Fri, May 3, 2013 at 4:30 PM, Douglas N Greve <greve@nmr.mgh.harvard.edu> wrote:

It should actually run all the way through. If your field maps have the same geometry as your fmri volumes, and your fmri runs have correct geometry, then you can run

mri_convert imag_fmap2300.nii imag_fmap2300.geo.nii --in_like fmri.nii

Also note that you are just creating a voxel shift map with the epidewarp command, not applying it to the fmri. The application is done in a more complicated way during preproc-sess

doug



On 05/03/2013 04:10 PM, Corinna Bauer wrote:
hmm. can anything be done to fix it?

Work the preproc-sess and mkanalysis-sess steps work if I used B0 corrected images right from the get-go instead of raw fmri runs?


On Fri, May 3, 2013 at 4:04 PM, Douglas N Greve <greve@nmr.mgh.harvard.edu <mailto:greve@nmr.mgh.harvard.edu>> wrote:

    yep, it is basically the same error


    On 05/03/2013 03:57 PM, Corinna Bauer wrote:

        I would imagine so. I tried it with the img files.

        /usr/local/freesurfer/subjects/symmetry/functional/antonio>
        epidewarp.fsl --complex
        fieldmap/20130409_153340FieldMappings011a001x1.img
        fieldmap/20130409_153340FieldMappings011a001x3.img
        fieldmap/20130409_153340FieldMappings011a001x2.img
        fieldmap/20130409_153340FieldMappings011a001x4.img --tediff
        2.3 --esp 0.59278 --epi bold/005/f.nii --vsm bold/b0dcmap.nii.gz
        FSLVersion 5.0.2
        FSLVerMaj 5
        Logfile is bold/b0dcmap.nii.gz.log
        FSLOUTPUTTYPE NIFTI_GZ
        Extension is nii.gz
        nframes = 245, nmidframe = 122
        fslroi
        /usr/local/freesurfer/subjects/symmetry/functional/antonio/bold/005/f.nii
        bold/tmp-epidewarp.19423.fsl/exf.nii.gz 122 1
        mri_convert fieldmap/20130409_153340FieldMappings011a001x1.img
        bold/tmp-epidewarp.19423.fsl/real1.nii
        $Id: mri_convert.c,v 1.179.2.7 2012/09/05 21:55:16 mreuter Exp $
        reading from fieldmap/20130409_153340FieldMappings011a001x1.img...
        -----------------------------------------------------------------
        INFO: could not find
        fieldmap/20130409_153340FieldMappings011a001x1.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
        fieldmap/20130409_153340FieldMappings011a001x1.mat file
        -----------------------------------------------------------------
          analyzeRead() roi_scale   2.639800072
          analyzeRead() changing type to float
          analyzeRead() scaling by   2.639800072
        TR=20.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 bold/tmp-epidewarp.19423.fsl/real1.nii...
        mri_convert fieldmap/20130409_153340FieldMappings011a001x3.img
        bold/tmp-epidewarp.19423.fsl/imag1.nii
        $Id: mri_convert.c,v 1.179.2.7 2012/09/05 21:55:16 mreuter Exp $
        reading from fieldmap/20130409_153340FieldMappings011a001x3.img...
        -----------------------------------------------------------------
        INFO: could not find
        fieldmap/20130409_153340FieldMappings011a001x3.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
        fieldmap/20130409_153340FieldMappings011a001x3.mat file
        -----------------------------------------------------------------
          analyzeRead() roi_scale   2.639800072
          analyzeRead() changing type to float
          analyzeRead() scaling by   2.639800072
        TR=20.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 bold/tmp-epidewarp.19423.fsl/imag1.nii...
        mri_convert fieldmap/20130409_153340FieldMappings011a001x2.img
        bold/tmp-epidewarp.19423.fsl/real2.nii
        $Id: mri_convert.c,v 1.179.2.7 2012/09/05 21:55:16 mreuter Exp $
        reading from fieldmap/20130409_153340FieldMappings011a001x2.img...
        -----------------------------------------------------------------
        INFO: could not find
        fieldmap/20130409_153340FieldMappings011a001x2.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
        fieldmap/20130409_153340FieldMappings011a001x2.mat file
        -----------------------------------------------------------------
          analyzeRead() roi_scale   2.639800072
          analyzeRead() changing type to float
          analyzeRead() scaling by   2.639800072
        TR=20.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 bold/tmp-epidewarp.19423.fsl/real2.nii...
        mri_convert fieldmap/20130409_153340FieldMappings011a001x4.img
        bold/tmp-epidewarp.19423.fsl/imag2.nii
        $Id: mri_convert.c,v 1.179.2.7 2012/09/05 21:55:16 mreuter Exp $
        reading from fieldmap/20130409_153340FieldMappings011a001x4.img...
        -----------------------------------------------------------------
        INFO: could not find
        fieldmap/20130409_153340FieldMappings011a001x4.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
        fieldmap/20130409_153340FieldMappings011a001x4.mat file
        -----------------------------------------------------------------
          analyzeRead() roi_scale   2.639800072
          analyzeRead() changing type to float
          analyzeRead() scaling by   2.639800072
        TR=20.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 bold/tmp-epidewarp.19423.fsl/imag2.nii...
        -----------------------------------------------------------------
        INFO: could not find
        fieldmap/20130409_153340FieldMappings011a001x1.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
        fieldmap/20130409_153340FieldMappings011a001x1.mat file
        -----------------------------------------------------------------
        -----------------------------------------------------------------
        INFO: could not find
        fieldmap/20130409_153340FieldMappings011a001x3.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
        fieldmap/20130409_153340FieldMappings011a001x3.mat file
        -----------------------------------------------------------------
        Saving result to 'bold/tmp-epidewarp.19423.fsl/mag.nii.gz'
        (type = nii )                       [ ok ]
          analyzeRead() roi_scale   2.639800072
          analyzeRead() changing type to float
          analyzeRead() scaling by   2.639800072
          analyzeRead() roi_scale   2.639800072
          analyzeRead() changing type to float
          analyzeRead() scaling by   2.639800072
        bet bold/tmp-epidewarp.19423.fsl/mag.nii.gz
        bold/tmp-epidewarp.19423.fsl/brain.nii.gz
        fslmaths bold/tmp-epidewarp.19423.fsl/brain.nii.gz -bin
        bold/tmp-epidewarp.19423.fsl/brain.nii.gz
        fslmaths bold/tmp-epidewarp.19423.fsl/brain.nii.gz -dilM
        bold/tmp-epidewarp.19423.fsl/head.nii.gz
        ^C



        On Fri, May 3, 2013 at 3:52 PM, Douglas N Greve
        <greve@nmr.mgh.harvard.edu <mailto:greve@nmr.mgh.harvard.edu>
        <mailto:greve@nmr.mgh.harvard.edu
        <mailto:greve@nmr.mgh.harvard.edu>>> wrote:


            yes, it should take img files. At some point, the lack of
        valid
            geometry might mess things up


            On 05/03/2013 03:47 PM, Corinna Bauer wrote:

                Oh I see. I have the raw par rec files, should I try
                converting it again? I used dcm2nii to convert it to
        hdr/img
                files and then fslchfiletype to get it into nifti. for
        some
                reason just converting it to nifti right away doesn't
        look right.

                Will epidewarp take img files?


                On Fri, May 3, 2013 at 3:43 PM, Douglas N Greve
                <greve@nmr.mgh.harvard.edu
        <mailto:greve@nmr.mgh.harvard.edu>
        <mailto:greve@nmr.mgh.harvard.edu
        <mailto:greve@nmr.mgh.harvard.edu>>
                <mailto:greve@nmr.mgh.harvard.edu
        <mailto:greve@nmr.mgh.harvard.edu>
                <mailto:greve@nmr.mgh.harvard.edu
        <mailto:greve@nmr.mgh.harvard.edu>>>> wrote:

                    nope, the qform errors mean thatthere is something
        going
                on with
                    your data. It means that the geometry is not in
        the nifti
                file.


                    On 05/03/2013 03:41 PM, Corinna Bauer wrote:

                        do they need to be nii.gz?


                        On Fri, May 3, 2013 at 3:38 PM, Corinna Bauer
                        <corinnab83@gmail.com
        <mailto:corinnab83@gmail.com> <mailto:corinnab83@gmail.com
        <mailto:corinnab83@gmail.com>>
                <mailto:corinnab83@gmail.com
        <mailto:corinnab83@gmail.com> <mailto:corinnab83@gmail.com
        <mailto:corinnab83@gmail.com>>>
                        <mailto:corinnab83@gmail.com
        <mailto:corinnab83@gmail.com>
                <mailto:corinnab83@gmail.com
        <mailto:corinnab83@gmail.com>> <mailto:corinnab83@gmail.com
        <mailto:corinnab83@gmail.com>
                <mailto:corinnab83@gmail.com
        <mailto:corinnab83@gmail.com>>>>>

                        wrote:

                            I still get funny warnings about the
        nifti-1 qform
                or sform

                                          /usr/local/freesurfer/subjects/symmetry/functional/antonio>
                            epidewarp.fsl --complex
        fieldmap/real_fmap2300.nii
                            fieldmap/imag_fmap2300.nii
        fieldmap/real_fmap4600.nii
                            fieldmap/imag_fmap4600.nii --tediff 2.3 --esp
                0.59278 --epi
                            bold/005/f.nii  --vsm bold/b0dcmap.nii.gz

                            FSLVersion 5.0.2
                            FSLVerMaj 5
                            Logfile is bold/b0dcmap.nii.gz.log
                            FSLOUTPUTTYPE NIFTI_GZ
                            Extension is nii.gz
                            nframes = 245, nmidframe = 122
                            fslroi
        /usr/local/freesurfer/subjects/symmetry/functional/antonio/bold/005/f.nii
                            bold/tmp-epidewarp.19137.fsl/exf.nii.gz 122 1
                            mri_convert fieldmap/real_fmap2300.nii
                            bold/tmp-epidewarp.19137.fsl/real1.nii
                            $Id: mri_convert.c,v 1.179.2.7 2012/09/05
        21:55:16
                mreuter
                        Exp $
                            reading from fieldmap/real_fmap2300.nii...
                            WARNING: neither NIfTI-1 qform or sform
        are valid
                            WARNING: your volume will probably be
        incorrectly
                oriented
                            TR=20.00, TE=0.00, TI=0.00, flip angle=0.00
                            WARNING: it does not appear that there was
        sufficient
                        information
                            in the input to assign orientation to the
        volume...
                            i_ras = (-1, 0, 0)
                            j_ras = (0, 1, 0)
                            k_ras = (0, 0, 1)
                            writing to
        bold/tmp-epidewarp.19137.fsl/real1.nii...
                            mri_convert fieldmap/imag_fmap2300.nii
                            bold/tmp-epidewarp.19137.fsl/imag1.nii
                            $Id: mri_convert.c,v 1.179.2.7 2012/09/05
        21:55:16
                mreuter
                        Exp $
                            reading from fieldmap/imag_fmap2300.nii...
                            WARNING: neither NIfTI-1 qform or sform
        are valid
                            WARNING: your volume will probably be
        incorrectly
                oriented
                            TR=20.00, TE=0.00, TI=0.00, flip angle=0.00
                            WARNING: it does not appear that there was
        sufficient
                        information
                            in the input to assign orientation to the
        volume...
                            i_ras = (-1, 0, 0)
                            j_ras = (0, 1, 0)
                            k_ras = (0, 0, 1)
                            writing to
        bold/tmp-epidewarp.19137.fsl/imag1.nii...
                            mri_convert fieldmap/real_fmap4600.nii
                            bold/tmp-epidewarp.19137.fsl/real2.nii
                            $Id: mri_convert.c,v 1.179.2.7 2012/09/05
        21:55:16
                mreuter
                        Exp $
                            reading from fieldmap/real_fmap4600.nii...
                            WARNING: neither NIfTI-1 qform or sform
        are valid
                            WARNING: your volume will probably be
        incorrectly
                oriented
                            TR=20.00, TE=0.00, TI=0.00, flip angle=0.00
                            WARNING: it does not appear that there was
        sufficient
                        information
                            in the input to assign orientation to the
        volume...
                            i_ras = (-1, 0, 0)
                            j_ras = (0, 1, 0)
                            k_ras = (0, 0, 1)
                            writing to
        bold/tmp-epidewarp.19137.fsl/real2.nii...
                            mri_convert fieldmap/imag_fmap4600.nii
                            bold/tmp-epidewarp.19137.fsl/imag2.nii
                            $Id: mri_convert.c,v 1.179.2.7 2012/09/05
        21:55:16
                mreuter
                        Exp $
                            reading from fieldmap/imag_fmap4600.nii...
                            WARNING: neither NIfTI-1 qform or sform
        are valid
                            WARNING: your volume will probably be
        incorrectly
                oriented
                            TR=20.00, TE=0.00, TI=0.00, flip angle=0.00
                            WARNING: it does not appear that there was
        sufficient
                        information
                            in the input to assign orientation to the
        volume...
                            i_ras = (-1, 0, 0)
                            j_ras = (0, 1, 0)
                            k_ras = (0, 0, 1)
                            writing to
        bold/tmp-epidewarp.19137.fsl/imag2.nii...
                            WARNING: neither NIfTI-1 qform or sform
        are valid
                            WARNING: your volume will probably be
        incorrectly
                oriented
                            WARNING: neither NIfTI-1 qform or sform
        are valid
                            WARNING: your volume will probably be
        incorrectly
                oriented
                            Saving result to
                'bold/tmp-epidewarp.19137.fsl/mag.nii.gz'
                        (type =
                            nii )                       [ ok ]
                            bet bold/tmp-epidewarp.19137.fsl/mag.nii.gz
                            bold/tmp-epidewarp.19137.fsl/brain.nii.gz
                            ^C



                            On Fri, May 3, 2013 at 3:36 PM, Douglas N
        Greve
                            <greve@nmr.mgh.harvard.edu
        <mailto:greve@nmr.mgh.harvard.edu>
                <mailto:greve@nmr.mgh.harvard.edu
        <mailto:greve@nmr.mgh.harvard.edu>>
                        <mailto:greve@nmr.mgh.harvard.edu
        <mailto:greve@nmr.mgh.harvard.edu>
                <mailto:greve@nmr.mgh.harvard.edu
        <mailto:greve@nmr.mgh.harvard.edu>>>
                        <mailto:greve@nmr.mgh.harvard.edu
        <mailto:greve@nmr.mgh.harvard.edu>
                <mailto:greve@nmr.mgh.harvard.edu
        <mailto:greve@nmr.mgh.harvard.edu>>

                        <mailto:greve@nmr.mgh.harvard.edu
        <mailto:greve@nmr.mgh.harvard.edu>
                <mailto:greve@nmr.mgh.harvard.edu
        <mailto:greve@nmr.mgh.harvard.edu>>>>> wrote:

                                Actually, it might just be that you
        need to
                give it
                        a--exf or
                                --epi
                                Can you try that?

                                On 05/03/2013 02:59 PM, Corinna Bauer
        wrote:

                                    epidewarp.fsl --complex
                fieldmap/real_fmap2300.nii
                                    fieldmap/imag_fmap2300.nii
                fieldmap/real_fmap4600.nii
                                    fieldmap/imag_fmap4600.nii
         --tediff 2.3
                --esp 0.59278
                                    --vsm bold/b0dcmap.nii.gz


                                --         Douglas N. Greve, Ph.D.
                                MGH-NMR Center
        greve@nmr.mgh.harvard.edu <mailto:greve@nmr.mgh.harvard.edu>
        <mailto:greve@nmr.mgh.harvard.edu
        <mailto:greve@nmr.mgh.harvard.edu>>
                <mailto:greve@nmr.mgh.harvard.edu
        <mailto:greve@nmr.mgh.harvard.edu>
                <mailto:greve@nmr.mgh.harvard.edu
        <mailto:greve@nmr.mgh.harvard.edu>>>
                        <mailto:greve@nmr.mgh.harvard.edu
        <mailto:greve@nmr.mgh.harvard.edu>
                <mailto:greve@nmr.mgh.harvard.edu
        <mailto:greve@nmr.mgh.harvard.edu>>

                        <mailto:greve@nmr.mgh.harvard.edu
        <mailto:greve@nmr.mgh.harvard.edu>
                <mailto:greve@nmr.mgh.harvard.edu
        <mailto:greve@nmr.mgh.harvard.edu>>>>

                                Phone Number: 617-724-2358
        <tel:617-724-2358> <tel:617-724-2358 <tel:617-724-2358>>
                <tel:617-724-2358 <tel:617-724-2358> <tel:617-724-2358
        <tel:617-724-2358>>>
                        <tel:617-724-2358 <tel:617-724-2358>
        <tel:617-724-2358 <tel:617-724-2358>> <tel:617-724-2358
        <tel:617-724-2358>
                <tel:617-724-2358 <tel:617-724-2358>>>>

                                Fax: 617-726-7422 <tel:617-726-7422>
        <tel:617-726-7422 <tel:617-726-7422>>
                <tel:617-726-7422 <tel:617-726-7422> <tel:617-726-7422
        <tel:617-726-7422>>> <tel:617-726-7422 <tel:617-726-7422>

                <tel:617-726-7422 <tel:617-726-7422>>

                        <tel:617-726-7422 <tel:617-726-7422>
        <tel:617-726-7422 <tel:617-726-7422>>>>


                                Bugs:
        surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
        <http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting>
                <http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting>
                               <http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting>
                                              <http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting>

                                FileDrop:
        https://gate.nmr.mgh.harvard.edu/filedrop2
        www.nmr.mgh.harvard.edu/facility/filedrop/index.html
        <http://www.nmr.mgh.harvard.edu/facility/filedrop/index.html>
                       <http://www.nmr.mgh.harvard.edu/facility/filedrop/index.html>
                                      <http://www.nmr.mgh.harvard.edu/facility/filedrop/index.html>
                                                     <http://www.nmr.mgh.harvard.edu/facility/filedrop/index.html>
                                Outgoing:
        ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/



                                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.




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

                    Bugs:
        surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
        <http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting>
                <http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting>
                           <http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting>
                    FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2
        www.nmr.mgh.harvard.edu/facility/filedrop/index.html
        <http://www.nmr.mgh.harvard.edu/facility/filedrop/index.html>
                       <http://www.nmr.mgh.harvard.edu/facility/filedrop/index.html>
                           <http://www.nmr.mgh.harvard.edu/facility/filedrop/index.html>
                    Outgoing:
        ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/



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

            Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
        <http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting>
            <http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting>
            FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2
        www.nmr.mgh.harvard.edu/facility/filedrop/index.html
        <http://www.nmr.mgh.harvard.edu/facility/filedrop/index.html>
            <http://www.nmr.mgh.harvard.edu/facility/filedrop/index.html>
            Outgoing:
        ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/



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

    Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
    <http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting>
    FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2
    www.nmr.mgh.harvard.edu/facility/filedrop/index.html
    <http://www.nmr.mgh.harvard.edu/facility/filedrop/index.html>
    Outgoing:
    ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/