Re: [Freesurfer] Matlab 2016b and localGI

2017-08-11 Thread Chris Watson
Hi, I took a look at this and saw that the error comes from the "getmatlab"
script ($FREESURFER_HOME/fsfast/bin/getmatlab). It is a CSH script, which I
thought might be the issue.

Specifically, the script checks for the existence of matlab by
(unsurprisingly)

set MATLAB = `which matlab`;

On Dr. J's system, this was problematic due to "matlab" being aliased, so
calling "getmatlab" directly exited with the error. Hard-coding the path
for matlab in the "getmatlab" script is a (non-portable) solution.

However, I am not sure why it would throw an error, in any case. I tried it
on my system and it returned the correct location of matlab. I am running
CentOS 7.3 and using Freesurfer v5.3
(x86_64-unknown-linux-gnu-stable5-20130513). The version of "getmatlab" is
Revision 1.2

Chris

On Fri, Aug 11, 2017 at 12:27 PM, Alan Francis 
wrote:

> Hi Jennifer -
>
> Ostensibly your pathways and environment variables look correct. I ran
> into this problem once before, so I changed from BASH to the enhanced C
> shell and it worked. You may want to try that. All you need to do is to
> exit out of bash and set the environment in tcsh and it could work.
>
> best,
>
> Alan
>
> On Thu, Aug 10, 2017 at 4:56 PM, Juranek, Jenifer <
> jenifer.jura...@uth.tmc.edu> wrote:
>
>> Hi,
>>
>> Hope someone can identify my user error...I've listed below key bits of
>> info (system info, cmdline and error message, echo $PATH, cat .bashrc, cat
>> startup.m).
>>
>> Really appreciate someone taking a look and walking me through a solution
>> to my error?
>>
>> Many Thanks!
>>
>> Jenifer
>>
>>
>> 1) Running Freesurfer_v6 on RHEL Centos7.3
>>
>> and matlab 2016b (with imaging processing toolbox)
>>
>> 2) recon-all -s  -localGI
>>
>> returns the following:
>>
>> #@# Local Gyrification Index lh Thu Aug 10 15:39:03 CDT 2017
>>
>>  mris_compute_lgi --i lh.pial
>>
>> ERROR: Matlab is required to run mris_compute_lgi!
>> Linux localhost.localdomain 3.10.0-514.el7.x86_64 #1 SMP Wed Oct 19
>> 11:24:13 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux
>>
>>
>> 3) matlab is in my path
>>
>> [jjuranek@localhost subjects]$ echo $PATH
>> /home/jjuranek/freesurfer/bin:/home/jjuranek/freesurfer/fsfa
>> st/bin:/home/jjuranek/freesurfer/tktools:/home/jjuranek/fsl/
>> bin:/home/jjuranek/freesurfer/mni/bin:/home/jjuranek/fsl/
>> bin:/home/jjuranek/freesurfer/bin:/home/jjuranek/freesurfer/
>> fsfast/bin:/home/jjuranek/freesurfer/tktools:/home/
>> jjuranek/freesurfer/mni/bin:/usr/local/bin:/usr/local/sbin:
>> /usr/bin:/usr/sbin:/bin:/sbin:/home/jjuranek/.local/bin:/
>> home/jjuranek/bin:/home/jjuranek/matlab/R2016b/bin/matlab
>>
>>
>> 4) my .bashrc file is as follows
>>
>> # .bashrc
>>
>> # Source global definitions
>> if [ -f /etc/bashrc ]; then
>> . /etc/bashrc
>> fi
>>
>> # User specific aliases and functions
>>
>> export FREESURFER_HOME=/home/jjuranek/freesurfer
>> source $FREESURFER_HOME/SetUpFreeSurfer.sh
>>
>> matlab=/home/jjuranek/matlab/R2016b/bin/matlab
>> alias matlab=$matlab
>>
>> export PATH=$PATH:/home/jjuranek/matlab/R2016b/bin/matlab
>>
>> #/home/jjuranek/matlab/R2016b/bin/matlab
>> #MATLAB is selecting SOFTWARE OPENGL rendering.
>>
>>
>> 5) my startup.m file is as follows
>>
>> % FreeSurfer -%
>> fshome = getenv('FREESURFER_HOME');
>> fsmatlab = sprintf('%s/matlab',fshome);
>> if (exist(fsmatlab) == 7)
>> addpath(genpath(fsmatlab));
>> end
>> clear fshome fsmatlab;
>> %-%
>>
>> % FreeSurfer FAST %
>> fsfasthome = getenv('FSFAST_HOME');
>> fsfasttoolbox = sprintf('%s/toolbox',fsfasthome);
>> if (exist(fsfasttoolbox) == 7)
>> path(path,fsfasttoolbox);
>> end
>> clear fsfasthome fsfasttoolbox;
>> %-%
>>
>> % FreeSurfer LGI %
>> FSH = getenv('FREESURFER_HOME');
>>
>> fshmatlab = sprintf('%s/matlab',FSH);
>> path(path,fshmatlab);
>> clear fshmatlab FSH;
>>
>>
>>
>> ___
>> Freesurfer mailing list
>> Freesurfer@nmr.mgh.harvard.edu
>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>>
>>
>> The information in this e-mail is intended only for the person to whom it
>> is
>> addressed. If you believe this e-mail was sent to you in error and the
>> e-mail
>> contains patient information, please contact the Partners Compliance
>> HelpLine at
>> http://www.partners.org/complianceline . If the e-mail was sent to you
>> in error
>> but does not contain patient information, please contact the sender and
>> properly
>> dispose of the e-mail.
>>
>>
>
>
> --
> |~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|
>
> *Alan N. Francis PhD*
> Instructor - Imaging Neuroscience
> Brain Imaging Center
> McLean Hospital
> Harvard Medical School
> 115 Mill Street, Belmont, MA 02478
> al...@bwh.harvard.edu 
> afran...@mclean.harvard.edu
>
>
> |~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~

Re: [Freesurfer] Matlab 2016b and localGI

2017-08-11 Thread Alan Francis
Hi Jennifer -

Ostensibly your pathways and environment variables look correct. I ran into
this problem once before, so I changed from BASH to the enhanced C shell
and it worked. You may want to try that. All you need to do is to exit out
of bash and set the environment in tcsh and it could work.

best,

Alan

On Thu, Aug 10, 2017 at 4:56 PM, Juranek, Jenifer <
jenifer.jura...@uth.tmc.edu> wrote:

> Hi,
>
> Hope someone can identify my user error...I've listed below key bits of
> info (system info, cmdline and error message, echo $PATH, cat .bashrc, cat
> startup.m).
>
> Really appreciate someone taking a look and walking me through a solution
> to my error?
>
> Many Thanks!
>
> Jenifer
>
>
> 1) Running Freesurfer_v6 on RHEL Centos7.3
>
> and matlab 2016b (with imaging processing toolbox)
>
> 2) recon-all -s  -localGI
>
> returns the following:
>
> #@# Local Gyrification Index lh Thu Aug 10 15:39:03 CDT 2017
>
>  mris_compute_lgi --i lh.pial
>
> ERROR: Matlab is required to run mris_compute_lgi!
> Linux localhost.localdomain 3.10.0-514.el7.x86_64 #1 SMP Wed Oct 19
> 11:24:13 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux
>
>
> 3) matlab is in my path
>
> [jjuranek@localhost subjects]$ echo $PATH
> /home/jjuranek/freesurfer/bin:/home/jjuranek/freesurfer/
> fsfast/bin:/home/jjuranek/freesurfer/tktools:/home/jjuranek/fsl/bin:/home/
> jjuranek/freesurfer/mni/bin:/home/jjuranek/fsl/bin:/home/
> jjuranek/freesurfer/bin:/home/jjuranek/freesurfer/fsfast/
> bin:/home/jjuranek/freesurfer/tktools:/home/jjuranek/
> freesurfer/mni/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/
> usr/sbin:/bin:/sbin:/home/jjuranek/.local/bin:/home/
> jjuranek/bin:/home/jjuranek/matlab/R2016b/bin/matlab
>
>
> 4) my .bashrc file is as follows
>
> # .bashrc
>
> # Source global definitions
> if [ -f /etc/bashrc ]; then
> . /etc/bashrc
> fi
>
> # User specific aliases and functions
>
> export FREESURFER_HOME=/home/jjuranek/freesurfer
> source $FREESURFER_HOME/SetUpFreeSurfer.sh
>
> matlab=/home/jjuranek/matlab/R2016b/bin/matlab
> alias matlab=$matlab
>
> export PATH=$PATH:/home/jjuranek/matlab/R2016b/bin/matlab
>
> #/home/jjuranek/matlab/R2016b/bin/matlab
> #MATLAB is selecting SOFTWARE OPENGL rendering.
>
>
> 5) my startup.m file is as follows
>
> % FreeSurfer -%
> fshome = getenv('FREESURFER_HOME');
> fsmatlab = sprintf('%s/matlab',fshome);
> if (exist(fsmatlab) == 7)
> addpath(genpath(fsmatlab));
> end
> clear fshome fsmatlab;
> %-%
>
> % FreeSurfer FAST %
> fsfasthome = getenv('FSFAST_HOME');
> fsfasttoolbox = sprintf('%s/toolbox',fsfasthome);
> if (exist(fsfasttoolbox) == 7)
> path(path,fsfasttoolbox);
> end
> clear fsfasthome fsfasttoolbox;
> %-%
>
> % FreeSurfer LGI %
> FSH = getenv('FREESURFER_HOME');
>
> fshmatlab = sprintf('%s/matlab',FSH);
> path(path,fshmatlab);
> clear fshmatlab FSH;
>
>
>
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>
>
> The information in this e-mail is intended only for the person to whom it
> is
> addressed. If you believe this e-mail was sent to you in error and the
> e-mail
> contains patient information, please contact the Partners Compliance
> HelpLine at
> http://www.partners.org/complianceline . If the e-mail was sent to you in
> error
> but does not contain patient information, please contact the sender and
> properly
> dispose of the e-mail.
>
>


-- 
|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|

*Alan N. Francis PhD*
Instructor - Imaging Neuroscience
Brain Imaging Center
McLean Hospital
Harvard Medical School
115 Mill Street, Belmont, MA 02478
al...@bwh.harvard.edu 
afran...@mclean.harvard.edu


|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|~|
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.