<p>I found help at the FreeSurfer mailing list regarding this question. The answer is that for the structural analysis, there is no need to run the recon-all command in a specific directory structure. </p>

<p>It is just a matter of running </p>

<pre><code>recon-all -s SUBJECTNAME -all -i IMAGE.IMG
</code></pre>

<p>Note that I am feeding an img file, which is what I am using now, however the creators of the software suggest the use of the DICON filetype.</p>

CC BY-SA 3.0
2015-12-24T00:20:25.037Z
2015-12-24T00:20:25.037Z
lf_araujo
<p><a href="https://surfer.nmr.mgh.harvard.edu/fswiki/FreeSurferBeginnersGuide?highlight=%28%28FsTutorial%29%29" rel="nofollow">FreeSurfer</a> uses the recon-all command to semi-automatically generate its statistics. This tool implies a certain directory structure in which the files with the images for the samples should be organized into. In FreeSurfer tutorial they call this specific directory structure the <a href="http://freesurfer.net/fswiki/FsFastTutorialV5.1/FsFastDirStruct" rel="nofollow">FSFAST structure</a>.</p>

<p>I need to analyse images that were previously worked on in SPM, and it has the following directory structure for the patients:</p>

<pre><code>/experiment/patients/A.o/
</code></pre>

<p>and for controls:</p>

<pre><code>/experiment/controls/A.o/
</code></pre>

<p>Within each directory there are .hdr, .img, .mat and .mask files for each observation, which was obtained in two different times. So the naming of the files have the following order: </p>

<pre><code>experiment_subjectnumber_time1.img
</code></pre>

<p>and for the second acquisition reads:</p>

<pre><code>experiment_subjectnumber_time2.img
</code></pre>

<p>The same with all the before mentioned extensions (hdr, mat, mask).</p>

<p>It seems that in the FreeSurfer workflow the command <a href="https://surfer.nmr.mgh.harvard.edu/fswiki/FsFastUnpackData" rel="nofollow">unpacksdcmdir</a> is used to extract data from the nii and dicon types and organize them in the FSFAST structure. Can it be used on directory structures like the one I have?</p>

<neuroimaging><spm>
How to import images used to analysis in SPM to FreeSurfer
lf_araujo
# How to import images used to analysis in SPM to FreeSurfer

(Asked by: username_0 on 2015-12-21)

FreeSurfer uses the recon-all command to semi-automatically generate its statistics. This tool implies a certain directory structure in which the files with the images for the samples should be organized into. In FreeSurfer tutorial they call this specific directory structure the FSFAST structure.
I need to analyse images that were previously worked on in SPM, and it has the following directory structure for the patients:
/experiment/patients/A.o/

and for controls:
/experiment/controls/A.o/

Within each directory there are .hdr, .img, .mat and .mask files for each observation, which was obtained in two different times. So the naming of the files have the following order: 
experiment_subjectnumber_time1.img

and for the second acquisition reads:
experiment_subjectnumber_time2.img

The same with all the before mentioned extensions (hdr, mat, mask).
It seems that in the FreeSurfer workflow the command unpacksdcmdir is used to extract data from the nii and dicon types and organize them in the FSFAST structure. Can it be used on directory structures like the one I have?

**Tags:** neuroimaging, spm


---

## 1 answers

### Answer by username_0 on 2015-12-24. Score: 0 | Accepted answer

I found help at the FreeSurfer mailing list regarding this question. The answer is that for the structural analysis, there is no need to run the recon-all command in a specific directory structure. 
It is just a matter of running 
recon-all -s SUBJECTNAME -all -i IMAGE.IMG

Note that I am feeding an img file, which is what I am using now, however the creators of the software suggest the use of the DICON filetype.


---

