[FieldTrip] compiling ft_volumenormalise

Anne Urai anne.urai at gmail.com
Wed Mar 15 13:29:25 CET 2017


If anyone encounters the same problem, compilation works if I manually add
a bunch of spm functions (which are not recognised by mcc, probably because
they are in a class definition folder).

Specifically, including

  '-a', '~/Documents/fieldtrip/external/spm8/spm.m', ...
        '-a', '~/Documents/fieldtrip/external/spm8/templates/T1.nii', ...
        '-a', '~/Documents/fieldtrip/external/freesurfer/MRIread', ...
        '-a', '~/code/Tools/spmbug/dim.m', ...
        '-a', '~/code/Tools/spmbug/dtype.m', ...
        '-a', '~/code/Tools/spmbug/fname.m', ...
        '-a', '~/code/Tools/spmbug/offset.m', ...
        '-a', '~/code/Tools/spmbug/scl_slope.m', ...
        '-a', '~/code/Tools/spmbug/scl_inter.m', ...
        '-a', '~/code/Tools/spmbug/permission.m', ...
        '-a', '~/code/Tools/spmbug/niftistruc.m', ...
        '-a', '~/code/Tools/spmbug/read_hdr.m', ...
        '-a', '~/code/Tools/spmbug/getdict.m', ...
        '-a', '~/code/Tools/spmbug/read_extras.m', ...
        '-a', '~/code/Tools/spmbug/read_hdr_raw.m', ...

does the trick.

Happy compiling,
Anne

On 1 March 2017 at 19:38, Anne Urai <anne.urai at gmail.com> wrote:

> Hi FieldTrippers,
>
> I compile my code to run on the supercomputer cluster (without many matlab
> licenses), which usually works fine when I do something like:
>
> *addpath('~/Documents/fieldtrip');*
> *ft_defaults; *
> *addpath('~/Documents/fieldtrip/external/spm8');*
> *mcc('-mv', '-N', '-p', 'stats', '-p', 'images', '-p', 'signal', ...*
> *     '-R', '-nodisplay', '-R', '-singleCompThread', fname);*
>
> However, compiling the ft_volumenormalise function gives me some problems.
> Specifically, if source is the result of my beamformer analysis, this code
>
> *  cfg                       = [];*
> *  cfg.parameter             = 'pow';*
> *  cfg.nonlinear             = 'no'; % can warp back to individual*
> *  cfg.template               =
> '/home/aeurai/Documents/fieldtrip/external/spm8/templates/T1.nii';*
> *  cfg.write                 = 'no';*
> *  cfg.keepinside             = 'no'; % otherwise, ft_sourcegrandaverage
> will bug*
> *  source                     = ft_volumenormalise(cfg, source);*
>
> works fine when running it within Matlab. However, when I run the
> executable after compiling (which completes without error), a low-level spm
> function throws the following error:
>
> *the input is source data with 16777216 brainordinates on a [256 256 256]
> grid*
> *Warning: could not reshape "freq" to the expected dimensions*
> *> In ft_datatype_volume (line 136)*
> *In ft_checkdata (line 350)*
> *In ft_volumenormalise (line 98)*
> *In B6b_sourceContrast_volNormalise (line 57)*
> *Converting the coordinate system from ctf to spm*
> *Undefined function 'fname' for input arguments of type 'struct'*
> *Error in file_array (line 32)*
> *Error in spm_create_vol>create_vol (line 77)*
> *Error in spm_create_vol (line 16)*
> *Error in volumewrite_spm (line 71)*
> *Error in ft_write_mri (line 65)*
> *Error in align_ctf2spm (line 168)*
> *Error in ft_convert_coordsys (line 95)*
> *Error in ft_volumenormalise (line 124)*
> *Error in B6b_sourceContrast_volNormalise (line 57)*
> *MATLAB:UndefinedFunction*
>
> I'd be very grateful for hints from anyone who's successfully compiled the
> ft_normalise function! Adding the template T1.nii file, spm8 or freesurfer
> at compilation does not solve the problem.
> Thanks,
>
>> Anne E. Urai, MSc
> PhD student | Institut für Neurophysiologie und Pathophysiologie
> Universitätsklinikum Hamburg-Eppendorf | Martinistrasse 52, 20246 |
> Hamburg, Germany
> www.anneurai.net / @AnneEUrai <https://twitter.com/AnneEUrai>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20170315/3dc5cd2e/attachment-0001.html>


More information about the fieldtrip mailing list