FreeSurfer: How would i convert a .mgz file to stl/vtk or some other mesh file via command line

1,430 views
Skip to first unread message

Shannen Lambdin

unread,
Oct 7, 2014, 9:22:36 PM10/7/14
to cmtk-...@googlegroups.com
I've created a .mgz file from a series of dicom files. Does anyone know how to use command line to confer this file to one of the following formats?
.FSM.INFLATED.SMOOTHWM.SPHERE.PIAL.ORIG, .STL, .VTK

camocaze .

unread,
Oct 8, 2014, 1:39:23 PM10/8/14
to cmtk-...@googlegroups.com
you need to run the full freesurfer pipeline ('recon-all') on your subject. I suggest reading through the online freesurfer wiki so that you understand the basics of how to use the command line tools and set up your directories - there's lots of good documentation for beginners.

once the recon-all pipeline has been completed without errors on your subject, you can convert any of the files in the 'surf' folder into .stl or .vtk using the 'mri_convert' command, i.e.

cd /path/to/subject_freesurfer_output/surf
mri_convert lh.pial lh.pial.stl
mri_convert rh.pial rh.pial.stl
mri_convert lh.orig lh.orig.stl
etc. etc.

hope that helps,

-David

On Tue, Oct 7, 2014 at 6:22 PM, Shannen Lambdin <slamb...@gmail.com> wrote:
I've created a .mgz file from a series of dicom files. Does anyone know how to use command line to confer this file to one of the following formats?
.FSM.INFLATED.SMOOTHWM.SPHERE.PIAL.ORIG, .STL, .VTK

--
You received this message because you are subscribed to the Google Groups "cmtk-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cmtk-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

kruthika kr

unread,
May 29, 2015, 4:36:33 AM5/29/15
to cmtk-...@googlegroups.com

Hi ..

I have processed data output from freesurfer . I need to convert aseg.mgz file to vtk /stl format.
 it is not  possible with mri_convert.Please specify how to do this  ??
Reply all
Reply to author
Forward
0 new messages