<p>Looks like you didn't include a space between the -i flag and the file, though you did include the space in this question. Try running the command but include spaces between your flags and file directories:</p>

<pre><code>recon-all -s mybrain -all -i /home/fsuser/Desktop/brainscan.nii
</code></pre>

CC BY-SA 4.0
2019-01-28T19:04:03.890Z
2019-01-28T19:04:03.890Z
Lux Claridge
<p>I'm trying to convert a .nii file to a .stl file using <a href="https://www.instructables.com/id/3D-print-your-own-brain/" rel="nofollow noreferrer">this tutorial</a>.</p>

<p>Since my computer runs Windows, I'm running FreeSurfer (Linux) on VirtualBox. I was unable to allow Guest Additions, so I downloaded my .nii file by email. I ran this command to extract the data from the file using FreeSurfer: <code>recon-all -s mybrain -all -i /home/fsuser/Desktop/brainscan.nii</code></p>

<p>Unfortunately, it did not work, and I received this error message:</p>

<pre>
"WARNING: tcsh v6.17.06 has an exit code bug! Please update tcsh!

ERROR: Flag -i/home/fsuser/Desktop/anat_stripped.nii unrecognized. -s mybrain -all -i/home/fsuser/Desktop/anat_stripped.nii Linux xubuntu-VirtualBox 3.2.0-23-generic #36-Ubuntu SMP Tue Apr 10 20:41:14 UTC 2012 i686 i686 i386 GNU/Linux

recon-all -s mybrain exited with ERRORS at Fri Jan 25 20:08:01 EST 2019

For more details, see the log file To report a problem, see http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting"
</pre>

<p>I think the problem is that I don't have an application in VirtualBox that can open a .nii file. I tried to download Mango, but when I unzipped the file, there was no executable. What should I do so my .nii file can be converted to a .stl file?</p>

CC BY-SA 4.0
2019-01-28T18:28:59.067Z
Did you download Mango for windows or linux?
Lux Claridge
CC BY-SA 4.0
2019-01-28T18:59:50.760Z
Did you install the third tool listed in the tutorial -- "Convert DICOM to NIFTI" ?
Carl Witthoft
<file-formats>
Converting .nii file to .stl file
Charlotte Notaras
# Converting .nii file to .stl file

(Asked by: username_0 on 2019-01-28)

I'm trying to convert a .nii file to a .stl file using this tutorial.
Since my computer runs Windows, I'm running FreeSurfer (Linux) on VirtualBox. I was unable to allow Guest Additions, so I downloaded my .nii file by email. I ran this command to extract the data from the file using FreeSurfer: recon-all -s mybrain -all -i /home/fsuser/Desktop/brainscan.nii
Unfortunately, it did not work, and I received this error message:

"WARNING: tcsh v6.17.06 has an exit code bug! Please update tcsh!

ERROR: Flag -i/home/fsuser/Desktop/anat_stripped.nii unrecognized. -s mybrain -all -i/home/fsuser/Desktop/anat_stripped.nii Linux xubuntu-VirtualBox 3.2.0-23-generic #36-Ubuntu SMP Tue Apr 10 20:41:14 UTC 2012 i686 i686 i386 GNU/Linux

recon-all -s mybrain exited with ERRORS at Fri Jan 25 20:08:01 EST 2019

For more details, see the log file To report a problem, see http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting"

I think the problem is that I don't have an application in VirtualBox that can open a .nii file. I tried to download Mango, but when I unzipped the file, there was no executable. What should I do so my .nii file can be converted to a .stl file?

**Tags:** file-formats
> **Comments:**
> **username_1**: Did you download Mango for windows or linux?  
> **username_2**: Did you install the third tool listed in the tutorial -- "Convert DICOM to NIFTI" ?  

---

## 1 answers

### Answer by username_1 on 2019-01-28. Score: 2

Looks like you didn't include a space between the -i flag and the file, though you did include the space in this question. Try running the command but include spaces between your flags and file directories:
recon-all -s mybrain -all -i /home/fsuser/Desktop/brainscan.nii


---

