External Email - Use Caution        

Hello Rachel,

SUBJECTS_DIR is preset in the terminal window to point to the example subjects already provided with the freesurfer distribution under /usr/local/freesurfer/7.2.0/subjects.  You will see subject names under that directory like “bert”.  That SUBEJCTS_DIR setting is printed out when you start a new terminal window.

But it is not intended you process your own subjects there.  You don’t have permission to copy data into that location unless you use the “sudo” command.

It’s preferable to set SUBJECTS_DIR to point to a subdirectory where you have permission to read and write your own subject data files such as /home/developer   If you put your data under there, then you can set SUBEJCTS_DIR to instead be,

$ export SUBJECTS_DIR=/home/developer/subjects
 under which you would presumably have directories referenced by subject name.

To see the value of SUBEJCTS_DIR in the terminal window,
$ echo $SUBJECTS_DIR

To see the value of all environment variables in the terminal window,
$ env | sort

You can change what SUBJECTS_DIR is set to in the terminal window by editing the file /home/developer/.bashrc  I would put any export command to change SUBJECTS_DIR from the subejcts provided with freesurfer at the end of that file.

- R.

On Jun 15, 2022, at 17:04, Rachel Wagner <rwagne2@uwo.ca> wrote:

        External Email - Use Caution        


Hello, 
 
I am trying to take my SPM images and cortically project them with free surfer (SpmPainting - Free Surfer Wiki (harvard.edu). As it might be quite obvious, I have very little experience using these softwares.
 
I am typing in the suggested code as follows: 
developer@developer-VirtualBox:~$ mri_convert $SUBJECTS_DIR/subjectname/mri/brain.mgz brain.img
mri_convert /usr/local/freesurfer/7.2.0/subjects/subjectname/mri/brain.mgz brain.img
reading from /usr/local/freesurfer/7.2.0/subjects/subjectname/mri/brain.mgz...
error: mghRead(/usr/local/freesurfer/7.2.0/subjects/subjectname/mri/brain.mgz, -1): could not open file
developer@developer-VirtualBox:~$ ^C
developer@developer-VirtualBox:~$
 
Is there something I am doing incorrectly?
 
Thank you!
Rachel
_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer