Duke-UNC Brain Imaging and Analysis Center
BIAC Forums | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password   Forgot your Password?
 All Forums
 Support Forums
 Analysis Software Support
 Problem in running FreeSurfer
 New Topic  Reply to Topic
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

xu
Junior Member

25 Posts

Posted - May 07 2007 :  3:56:05 PM  Show Profile  Reply with Quote
Hey all,

I got my FreeSurfer environment setting as below:

[xu@golgi: /] $ source /usr/local/packages/freesurfer-dev2-0-0/SetUpFreeSurfer.sh
Setting up environment for FreeSurfer/FS-FAST (and FSL)
FREESURFER_HOME /usr/local/packages/freesurfer-dev2-0-0
FSFAST_HOME /usr/local/packages/freesurfer-dev2-0-0/fsfast
SUBJECTS_DIR /data/users/xu/subjects
FUNCTIONALS_DIR /data/users/xu/sessions
MINC_BIN_DIR /usr/local/packages/freesurfer-mni/bin
MINC_LIB_DIR /usr/local/packages/freesurfer-mni/lib
PERL5LIB /usr/local/packages/freesurfer-mni/lib/5.8.0
Word too long.
Word too long.
Word too long.
Word too long.
FSL_DIR /usr/local/packages/fsl

But the correct results should be
SUBJECTS_DIR = /data/users/xu/freesurfer/subjects
FUNCTIONALS_DIR = /data/users/xu/freesurfer/sessions.
Someone can solve the problem for me will be much appreciated.

syam.gadde
BIAC Staff

USA
421 Posts

Posted - May 07 2007 :  4:03:29 PM  Show Profile  Reply with Quote
I think you want:
. /usr/local/packages/freesurfer-dev2-0-0/SetUpFreeSurfer.sh

"source" is for people running csh or tcsh (if you don't know, then you aren't). Does that fix it?
Go to Top of Page

xu
Junior Member

25 Posts

Posted - May 07 2007 :  4:12:36 PM  Show Profile  Reply with Quote
Thanks Saym,
I tried command as you recommended, but I got same result.

Amy

Go to Top of Page

petty
BIAC Staff

USA
453 Posts

Posted - May 07 2007 :  4:25:21 PM  Show Profile  Reply with Quote
you can set the variables on your own
export SUBJECTS_DIR=/data/users/xu/freesurfer/subjects
export FUNCTIONALS_DIR=/data/users/xu/freesurfer/sessions
Go to Top of Page

syam.gadde
BIAC Staff

USA
421 Posts

Posted - May 07 2007 :  5:28:02 PM  Show Profile  Reply with Quote
And if you want those variables to be set on every login automatically, you can add the "export" commands to your .bash_profile . It looks like you have stuff in your .cshrc but since you are using bash, I suggest running "nedit ~/.bash_profile", and then adding the commands Chris suggested, plus the SetUpFreesurfer.sh command to the end of that file:
export SUBJECTS_DIR=/data/users/xu/freesurfer/subjects
export FUNCTIONALS_DIR=/data/users/xu/freesurfer/sessions
. /usr/local/packages/freesurfer-dev2-0-0/SetUpFreeSurfer.sh

(Don't neglect the dot (.) in the third line -- it is important!)
Go to Top of Page

xu
Junior Member

25 Posts

Posted - May 08 2007 :  09:49:23 AM  Show Profile  Reply with Quote
Thanks Petty and Syam, you are right I can set directory my own, but I still have following error and can not run FreeSurfer, why?
-------------------------------------------------
[xu@golgi: ~] $ export SUBJECTS_DIR=/data/users/xu/freesurfer/subjects
[xu@golgi: ~] $ export FUNCTIONALS_DIR=/data/users/xu/freesurfer/sessions
[xu@golgi: ~] $ . /usr/local/packages/freesurfer-dev2-0-0/SetUpFreeSurfer.sh
Setting up environment for FreeSurfer/FS-FAST (and FSL)
FREESURFER_HOME /usr/local/packages/freesurfer-dev2-0-0
FSFAST_HOME /usr/local/packages/freesurfer-dev2-0-0/fsfast
SUBJECTS_DIR /data/users/xu/freesurfer/subjects
FUNCTIONALS_DIR /data/users/xu/freesurfer/sessions
MINC_BIN_DIR /usr/local/packages/freesurfer-mni/bin
MINC_LIB_DIR /usr/local/packages/freesurfer-mni/lib
PERL5LIB /usr/local/packages/freesurfer-mni/lib/5.8.0
Word too long.
Word too long.
Word too long.
FSL_DIR /usr/local/packages/fsl
[xu@golgi: /data/users/xu/freesurfer] $ ls
FSE0012 FSE0234 FSE0268 FSE0443_S003
FSE0153 FSE0239 FSE0402 FSE0473
FSE0196 FSE0240 FSE0414 sessions
FSE0224_S002 FSE0264 FSE0419 subjects
[xu@golgi: /data/users/xu/freesurfer] $ ls FSE0012
series005
[xu@golgi: /data/users/xu/freesurfer] $ recon-all -i FSE0012/series005/ -autorecon1 -subjid FSE0012
INFO: SUBJECTS_DIR is /data/users/xu/freesurfer/subjects
Actual FREESURFER_HOME /usr/local/packages/freesurfer-dev2-0-0
AIX golgi 2 5 0028DA6A4C00
Word too long.
Word too long.
Word too long.
Word too long.
Setting: No such file or directory
up: No such file or directory
environment: No such file or directory
for: No such file or directory
FreeSurfer/FS-FAST: No such file or directory
(and: No such file or directory
FSL): No such file or directory
FREESURFER_HOME: No such file or directory
FSFAST_HOME: No such file or directory
SUBJECTS_DIR: No such file or directory
FUNCTIONALS_DIR: No such file or directory
MINC_BIN_DIR: No such file or directory
MINC_LIB_DIR: No such file or directory
PERL5LIB: No such file or directory
FSL_DIR: No such file or directory
/data/users/xu/freesurfer/subjects/FSE0012
\n mri_convert /data/users/xu/freesurfer/FSE0012/series005 /data/users/xu/freesurfer/subjects/FSE0012/mri/orig/001.mgz \n
mri_convert /data/users/xu/freesurfer/FSE0012/series005 /data/users/xu/freesurfer/subjects/FSE0012/mri/orig/001.mgz
corRead(): can't open file /data/users/xu/freesurfer/FSE0012/series005/COR-.info
reading from /data/users/xu/freesurfer/FSE0012/series005...
AIX golgi 2 5 0028DA6A4C00

recon-all exited with ERRORS at Tue May 8 09:32:38 EDT 2007
------------------------------------------

and can not run runfreesurfer script:

-----------------------------------------------
> pwd
/data/users/xu/freesurfer/FSE0012
> ls
series005
> runfreesurfer FSE0012 series005
SUBJECTS_DIR /data/users/xu/freesurfer/subjects
echo: No match.
AutoRecon1 did not finish properly
-----------------------------------------

Thanks a lot,
Amy
Go to Top of Page

petty
BIAC Staff

USA
453 Posts

Posted - May 08 2007 :  10:10:53 AM  Show Profile  Reply with Quote
your subject doesn't actually have any anatomical data in the folder you specified.

before you get started you need to first convert the dicom images you are trying to process to mgz format. follow the steps here: http://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/Conversion
Go to Top of Page

jim.voyvodic
BIAC Faculty

138 Posts

Posted - May 08 2007 :  11:31:02 AM  Show Profile  Reply with Quote
You shouldn't need to convert DICOM to MGZ. I run freesurfer on DICOM images all the time.

Jim
Go to Top of Page

jim.voyvodic
BIAC Faculty

138 Posts

Posted - May 08 2007 :  11:38:47 AM  Show Profile  Reply with Quote
If you are running recon-all, you can't just specify the directory name though. You must specify the first image in that directory (it will then find all the rest).
Try:
recon-all -i FSE0012/series005/*_00001.dcm -autorecon1 -subjid FSE0012

If you use the 'runfreesurfer' script you don't need to specify the DICOM file because the script adds it to the directory name automatically.

Jim
Go to Top of Page

petty
BIAC Staff

USA
453 Posts

Posted - May 08 2007 :  11:45:35 AM  Show Profile  Reply with Quote
except there is no series005 folder, or dicoms.
Go to Top of Page

jim.voyvodic
BIAC Faculty

138 Posts

Posted - May 08 2007 :  11:49:13 AM  Show Profile  Reply with Quote
That's funny, it was there a minute ago when I looked.
/data/users/xu/freesurfer/FSE0012/series005
Images looked fine to me.

J
Go to Top of Page

petty
BIAC Staff

USA
453 Posts

Posted - May 08 2007 :  11:55:46 AM  Show Profile  Reply with Quote
oops, i looked into /data/users/xu/subjects/FSE0012
Go to Top of Page

xu
Junior Member

25 Posts

Posted - May 08 2007 :  12:09:57 PM  Show Profile  Reply with Quote
Thanks Dr. Voyvodic and Petty,
Before I thought I got SUBJECTS_DIR problem, but it looks not now since I set SUBJECTS_DIR properly. My problem maybe that did not finish running runfreesurfer properly because some of my subjects running more than 10 days could not finish, so I just simply turn off my computer to stop it then I got this problem and still can not fix it. I can not run runfreesurfer now.

Thanks again,
Amy
Go to Top of Page

josh.bizzell
BIAC Staff

USA
118 Posts

Posted - May 08 2007 :  12:30:31 PM  Show Profile  Reply with Quote
Amy,
One problem I was having with the recon-all and runfreesurfer on a different machine (not Golgi) is that the recon-all script has a "-f" flag at the shell declaration line (i.e. "#!/bin/tcsh -f"), which as I understand it, causes any environment variables set in your .cshrc (or .tcshrc) file to be ignored.

I solved this by editing "runfreesurfer" to explicitly send the $SUBJECTS_DIR variable to the recon-all command using the -sd flag.

BTW: If you run "runfreesurfer", a file called recon.log should be created in the folder where you've saved your subject data and run the command. If the program crashes again, could you post the contents of this file?

Josh


Go to Top of Page

xu
Junior Member

25 Posts

Posted - May 08 2007 :  12:38:07 PM  Show Profile  Reply with Quote
Thanks Dr. Voyvodic and Petty,
I tried two ways as following:
------------------------------------------
[xu@golgi: /data/users/xu/freesurfer/FSE0012] $ recon-all -i FSE0012/series005/*_00208.dcm -autorecon1 -subjid FSE0012
set: No match.

------------------------------
> runfreesurfer FSE0012 series005
SUBJECTS_DIR /data/users/xu/freesurfer/subjects
echo: No match.
AutoRecon1 did not finish properly
-----------------------------------
Why?

Thanks,
Amy

Edited by - xu on May 08 2007 4:47:21 PM
Go to Top of Page

petty
BIAC Staff

USA
453 Posts

Posted - May 08 2007 :  12:46:28 PM  Show Profile  Reply with Quote
there is no "FSE0012/series005" in "/data/users/xu/freesurfer/subjects"

your SUBJECTS_DIR path is incorrect for where your data actually is, set it to "/data/users/xu/freesurfer" and try the above commands again.
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
BIAC Forums © 2000-2010 Brain Imaging and Analysis Center Go To Top Of Page
This page was generated in 0.47 seconds. Snitz Forums 2000