# Converting .nii file to .stl file

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?

• Did you download Mango for windows or linux? – Lux Claridge Jan 28 '19 at 18:28
• Did you install the third tool listed in the tutorial -- "Convert DICOM to NIFTI" ? – Carl Witthoft Jan 28 '19 at 18:59

recon-all -s mybrain -all -i /home/fsuser/Desktop/brainscan.nii