<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi <div><br></div><div>DICOM files come with different extensions. I guess it depends on the scanner (Siemens/Philips/...). But the file format should be the same as it is a standard format, so the extension should not matter. The fileio/ft_filetype.m function detects both dcm and ima files as dicom.</div><div><br></div><div><div>if the files have no extension, the autodetection fails and you should explicitly specify the format as</div><div>   mri = ft_read_mri<span class="br0">(</span><span class="co2">'single_file_of_DICOM_series', 'format', 'dicom'</span><span class="br0">);</span></div><div><span class="br0">I now realize that to be a hidden option. I'll get that fixed in the function documentation.</span></div><div><br></div><div><div></div></div></div><div>I recommend that you specify a filename from somewhere in the middle of the stack of files. There are often a few localizer scans in the same directory, and these (due to the sorting of the file names) tend to end up at the beginning or end of the (alphabetical) directory listing. </div><div><br></div><div>cheers</div><div>Robert</div><div><div><br></div><div><br></div><div><div><div><br><div><div>On 13 Mar 2013, at 14:22, Jörn M. Horschig wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
  
    <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
  
  <div text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Hi Markus,<br>
      <br>
      I kept on avoiding these errors by using MRIcron's dcm2nii
      functionality:
      <a class="moz-txt-link-freetext" href="http://www.mccauslandcenter.sc.edu/mricro/mricron/index.html">http://www.mccauslandcenter.sc.edu/mricro/mricron/index.html</a><br>
      But pay attention to the coordinate system when importing it into
      FieldTrip afterwards, it can be quite a hassle...<br>
      <br>
      Maybe Robert or JM know whether reading in .dcm files is possible,
      but I have to admit that I never tried ;) <br>
      <br>
      Best,<br>
      Jörn<br>
      <br>
      On 3/13/2013 12:11 PM, Markus Butz wrote:<br>
    </div>
    <blockquote cite="mid:74308a1f1ca78.51405ed9@uni-duesseldorf.de" type="cite">
      <div>
        <div style="background-image: initial; background-attachment:
          initial; background-origin: initial; background-clip: initial;
          background-color: transparent; padding-top: 28px;
          padding-right: 10px; padding-bottom: 10px; padding-left: 10px;
          margin-top: -1em; margin-right: 0px; margin-bottom: 0px;
          margin-left: 0px; top: 0px; left: 0px; right: 0px; min-height:
          1em; background-position: initial initial; background-repeat:
          initial initial; ">
          <div style="min-height: 1em; ">Dear list, </div>
          <div><br>
          </div>
          <div style="min-height: 1em; ">I am experiencing problems
            reading in external MRI in DICOM format from a CD (doing it
            the first time though). </div>
          <div style="min-height: 1em; ">I wanted to do it the new and
            easy way as described here:</div>
          <div style="min-height: 1em; "><a moz-do-not-send="true" href="http://fieldtrip.fcdonders.nl/faq/how_can_i_convert_an_anatomical_mri_from_dicom_into_ctf_format?s[]=dicom" target="1">http://fieldtrip.fcdonders.nl/faq/how_can_i_convert_an_anatomical_mri_from_dicom_into_ctf_format?s[]=dicom</a></div>
          <div><br>
          </div>
          <div style="min-height: 1em; "><span class="co1">% read the <span class="search_hit">DICOM</span> files </span><br>
            mri = ft_read_mri<span class="br0">(</span><span class="co2">'single_file_of_DICOM_series.IMA'</span><span class="br0">)</span>;</div>
          <div><br>
          </div>
          <div style="min-height: 1em; ">However, I have no single
            slices with extension *.ima but one dataset with the
            extension *.dcm and the other dataset with no extension for
            the single slice files. I am also not sure where to copy the
            DICOMDIR file.</div>
          <div><br>
          </div>
          <div style="min-height: 1em; ">When I try to open a single
            file of the *.dcm series I get:</div>
          <div style="min-height: 1em; "><br>
          </div>
          <div style="min-height: 1em; ">mri =
            ft_read_mri('508652C3.dcm');</div>
          <div style="min-height: 1em; "><br>
          </div>
          <div style="min-height: 1em; ">??? Undefined function or
            variable "hdr".</div>
          <div style="min-height: 1em; "><br>
          </div>
          <div style="min-height: 1em; ">Error in ==> ft_read_mri at
            216</div>
          <div style="min-height: 1em; ">  hdr     = hdr(keep); </div>
          <div style="min-height: 1em; "><br>
          </div>
          <div style="min-height: 1em; ">Trying to read in a single file
            of the no extension series I get:</div>
          <div style="min-height: 1em; "><br>
          </div>
          <div style="min-height: 1em; ">mri = ft_read_mri('73850486');</div>
          <div style="min-height: 1em; "><br>
          </div>
          <div style="min-height: 1em; ">??? Error using ==>
            dicominfo at 41</div>
          <div style="min-height: 1em; ">The specified file is not in
            DICOM format</div>
          <div style="min-height: 1em; "><br>
          </div>
          <div style="min-height: 1em; ">The Image Processing toolbox V
            7.2 is installed and this is fieldtrip-20111101.</div>
          <div style="min-height: 1em; "><br>
          </div>
          <div style="min-height: 1em; ">Any help appreciated!</div>
          <div style="min-height: 1em; "><br>
          </div>
          <div style="min-height: 1em; ">Markus</div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
fieldtrip mailing list
<a class="moz-txt-link-abbreviated" href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a>
<a class="moz-txt-link-freetext" href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></pre>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Jörn M. Horschig
PhD Student
Donders Institute for Brain, Cognition and Behaviour 
Centre for Cognitive Neuroimaging
Radboud University Nijmegen 
Neuronal Oscillations Group
FieldTrip Development Team

P.O. Box 9101
NL-6500 HB Nijmegen
The Netherlands

Contact:
E-Mail: <a class="moz-txt-link-abbreviated" href="mailto:jm.horschig@donders.ru.nl">jm.horschig@donders.ru.nl</a>
Tel:    +31-(0)24-36-68493
Web: <a class="moz-txt-link-freetext" href="http://www.ru.nl/donders">http://www.ru.nl/donders</a>

Visiting address:
Trigon, room 2.30
Kapittelweg 29
NL-6525 EN Nijmegen
The Netherlands</pre>
  </div>

_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</blockquote></div><br></div></div></div></div></body></html>