title: Wrong "Spacing" and "Origin" of a DICOM series in ITK
body: <p>When I read a dicom series with a series reader in itk,</p>
  
  <p>I always find the <strong>origin</strong>=[0 0 0] and <strong>spacing</strong>=[1 1 1], <strong>the same for all different datasets</strong>.</p>
  
  <h2>* main function:-</h2>
  
  <pre><code>    void main()
      {
          reader = READ_DCM(Input_DCM_Paths[0]);
          cout&lt;&lt;" Reading Done!!"&lt;&lt;endl;
          cout&lt;&lt; " Origin: " &lt;&lt;reader-&gt;GetOutput()-&gt;GetOrigin()&lt;&lt; endl;
          cout&lt;&lt; " Spacing: " &lt;&lt;reader-&gt;GetOutput()-&gt;GetSpacing()&lt;&lt; endl;
      }
  </code></pre>
  
  <h2>* reader function:-</h2>
  
  <pre><code>    SeriesReaderType::Pointer READ_DCM (std::string InputFolder)
      {
        SeriesReaderType::Pointer seriesReader = SeriesReaderType::New();
        seriesReader-&gt;SetImageIO(itk::GDCMImageIO::New());
        itk::GDCMSeriesFileNames::Pointer nameGenerator = itk::GDCMSeriesFileNames::New();
        nameGenerator-&gt;SetUseSeriesDetails(true);
        nameGenerator-&gt;SetDirectory(InputFolder);
        std::string seriesID = nameGenerator-&gt;GetSeriesUIDs().begin()-&gt;c_str();
        seriesReader-&gt;SetFileNames(nameGenerator-&gt;GetFileNames(seriesID));
        seriesReader-&gt;Update();
        return seriesReader;
      }
  </code></pre>
  
  <h2>* 1st series output in itk:-</h2>
  
  <p><img src="https://i.stack.imgur.com/iFM65.png" alt="enter image description here"></p>
  
  <h2>* 1st series output in matlab:-</h2>
  
  <p><img src="https://i.stack.imgur.com/nbTv5.png" alt="enter image description here"></p>
  
  <p>What's worng with my 'series reader' code ??
  I followed the "reading part" in <a href="http://www.itk.org/Wiki/ITK/Examples/DICOM/ResampleDICOM" rel="nofollow noreferrer">this example</a>.</p>