Hello:
I need to call mri_convert utility from Java code. The problem is when I am making a system call, I am getting the following error :
FreeSurfer license file /Application/freesurfer/.license not found. If you are outside the NMR-Martinos center, go to http://surfer.nmr.mgh.harvard.edu to get a valid license file (it's free). If you are inside the NMR-Martinos center, make sure to source the standard environment. <<<<<<
The mri_convert runs from the shell without problem and the .license file is in the right directory.
I am including the following env variables into the system call:
String[] env = {"FREESURFER_HOME=/Application/freesurfer", "FSFAST_HOME=/Applications/freesurfer/fsfast", "SUBJECTS_DIR=/Applications/freesurfer/subjects", "MNI_DIR=/Applications/freesurfer/mni", "GSL_DIR=/Applications/freesurfer/lib/gsl", "FSL_DIR=/Applications/freesurfer/fsl", "FUNCTIONALS_DIR=$FREESURFER_HOME/sessions", "FSLOUTPUTTYPE=NIFTI_GZ", sPATH, "DISPLAY=:0.0", "HOME=/tmp", "DYLD_LIBRARY_PATH=/Applications/freesurfer/lib/gsl/lib", "MINC_BIN_DIR=/Applications/freesurfer/mni/bin", "MINC_LIB_DIR=/Applications/freesurfer/mni/lib", "MNI_DATAPATH=/Applications/freesurfer/mni/data", "LOCAL_DIR=/Applications/freesurfer/local", "FMRI_ANALYSIS_DIR=/Applications/freesurfer/fsfast",
"MNI_PERL5LIB=/Applications/freesurfer/mni/lib/../System/Library/Perl/5.8.6",
"PERL5LIB=/Applications/freesurfer/mni/lib/../System/Library/Perl/5.8.6", "LD_LIBRARY_PATH=/Applications/freesurfer/lib/gsl/lib", "FSLDIR=/Applications/freesurfer/fsl", "FSL_BIN=/Applications/freesurfer/fsl/bin", "FSLTCLSH=/Applications/freesurfer/fsl/bin/tclsh", "FSLWISH=/Applications/freesurfer/fsl/bin/wish", "FSLGNUPLOT=/Applications/freesurfer/fsl/bin/gnuplot", "FSLDISPLAY=/Applications/freesurfer/fsl/bin/display", "FSLCONVERT=/Applications/freesurfer/fsl/bin/convert", "FSLBROWSER=/Applications/freesurfer/fsl/tcl/fslwebbrowser", "FSLCONFDIR=/Applications/freesurfer/fsl/config" };
<<<
Am I missing something?
Yes, the mri_convert runs fine when called from the shell. And I don't see any other env variables related to the free surfer.
Thank you,
Alex
Hey Alex, Just from looking at the first two lines of your environment variables I think you might have forgot the 's' on Applications for FREESURFER_HOME.
String[] env = {"FREESURFER_HOME=/Application/freesurfer", "FSFAST_HOME=/Applications/freesurfer/fsfast",
mishkin
On Mon, Feb 25, 2008 at 6:13 PM, Alexander Zaitsev (CNI) azaitsev@bwh.harvard.edu wrote:
Hello:
I need to call mri_convert utility from Java code. The problem is when I am making a system call, I am getting the following error :
FreeSurfer license file /Application/freesurfer/.license not found. If you are outside the NMR-Martinos center, go to http://surfer.nmr.mgh.harvard.edu to get a valid license file (it's free). If you are inside the NMR-Martinos center, make sure to source the standard environment. <<<<<<
The mri_convert runs from the shell without problem and the .license file is in the right directory.
I am including the following env variables into the system call:
String[] env = {"FREESURFER_HOME=/Application/freesurfer", "FSFAST_HOME=/Applications/freesurfer/fsfast", "SUBJECTS_DIR=/Applications/freesurfer/subjects", "MNI_DIR=/Applications/freesurfer/mni", "GSL_DIR=/Applications/freesurfer/lib/gsl", "FSL_DIR=/Applications/freesurfer/fsl", "FUNCTIONALS_DIR=$FREESURFER_HOME/sessions", "FSLOUTPUTTYPE=NIFTI_GZ", sPATH, "DISPLAY=:0.0", "HOME=/tmp", "DYLD_LIBRARY_PATH=/Applications/freesurfer/lib/gsl/lib", "MINC_BIN_DIR=/Applications/freesurfer/mni/bin", "MINC_LIB_DIR=/Applications/freesurfer/mni/lib", "MNI_DATAPATH=/Applications/freesurfer/mni/data", "LOCAL_DIR=/Applications/freesurfer/local", "FMRI_ANALYSIS_DIR=/Applications/freesurfer/fsfast","MNI_PERL5LIB=/Applications/freesurfer/mni/lib/../System/Library/Perl/5.8.6",
"PERL5LIB=/Applications/freesurfer/mni/lib/../System/Library/Perl/5.8.6", "LD_LIBRARY_PATH=/Applications/freesurfer/lib/gsl/lib", "FSLDIR=/Applications/freesurfer/fsl", "FSL_BIN=/Applications/freesurfer/fsl/bin", "FSLTCLSH=/Applications/freesurfer/fsl/bin/tclsh", "FSLWISH=/Applications/freesurfer/fsl/bin/wish", "FSLGNUPLOT=/Applications/freesurfer/fsl/bin/gnuplot", "FSLDISPLAY=/Applications/freesurfer/fsl/bin/display", "FSLCONVERT=/Applications/freesurfer/fsl/bin/convert", "FSLBROWSER=/Applications/freesurfer/fsl/tcl/fslwebbrowser", "FSLCONFDIR=/Applications/freesurfer/fsl/config" };
<<<
Am I missing something?
Yes, the mri_convert runs fine when called from the shell. And I don't see any other env variables related to the free surfer.
Thank you,
Alex
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
freesurfer@nmr.mgh.harvard.edu