Login  Register

Using FreeSurfer Command in Slicer 3D

Posted by Carlo on Jan 22, 2016; 9:28am
URL: https://support.nabble.com/Using-FreeSurfer-Command-in-Slicer-3D-tp7596541.html

Hi all,
I'm developing a new module for Slicer 3D in python where I have to use the command "mri_info" (command for freesurfer that can be use in a terminal) to read the orig.mgz file and extract some info. For this reason I'm using subprocess.Popen

out = subprocess.Popen(["mri_info", "--vox2ras-tkr", "orig.mgz"], cwd='/home/user/Desktop/', stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()[0]


the problem is that this line give me this error

OSError: [Errno 2] No such file or directory

I'm sure that the path is correct (in fact if I use the same line in a python script it works) but I don't understand what is the problem. Can someone help me?

Thanks