No no, I previously set the path and the error is still the same. The problem is not with the path. 

Adriana.

On 18 June 2015 at 14:24, Andreas Finkelmeyer <[log in to unmask]> wrote:

You don’t need Analyze to run the function, but the folder/location where you saved the Matlab script(s) needs to be part of your Matlab path (that’s what the error is indicating).

 

http://uk.mathworks.com/help/matlab/matlab_env/what-is-the-matlab-search-path.html

 

Andreas

 

 

From: Adriana Roca [mailto:[log in to unmask]]
Sent: 18 June 2015 14:19
To: Andreas Finkelmeyer
Cc: [log in to unmask]
Subject: Re: [SPM] Unix executable files. And .obj conversion in .nii

 

Hello Andreas, 

 

Thank you very much for your quick response. I've tried your script and unfortunately, it doesn't work. The Matlab error is: Undefined function or variable 'decodeOBJ' 

Maybe because I have not Analyze software installed on my Mac and I am using Matlab 2015. Anyway, I really appreciate your effort to help on this. 

 

Could be very helpful if you (or other SPMer) have another possible solution for this.

 

Thank you very much in advance. 

 

Best regards, 

Adriana. 

 

 

On 18 June 2015 at 12:58, Andreas Finkelmeyer <[log in to unmask]> wrote:

Adriana,

 

there is a Matlab script on MatlabCentral that I have used to read Analyze .obj files, but it is a little bit older and may not work with more recent .obj file versions.

 

http://nl.mathworks.com/matlabcentral/fileexchange/14727-decodeobj-v2--analyze-object-maps-reader-v2

 

I’ve added the ability to read a few extra header fields and to work with a newer obj version to this script myself (attached). These scripts will give you header information of the obj file as well as an “object map”. Depending on what you whish to do, this may be enough. You can use them to write your own Nifti images (e.g. with spm_write_vol), but you will have to provide the missing Nifti header/volume info, which may not be trivial. You may be able to copy the header info from the files you used to create these drawings in Analyze, though it may not be 100% correct.

 

Cheers,

Andreas

 

 

 

===================================================

Andreas Finkelmeyer, Ph.D.

Academic Psychiatry, Institute of Neuroscience

Wolfson Research Centre, Campus for Ageing and Vitality

Newcastle University

Newcastle upon Tyne

NE4 5PL, UK

 

Tel.: +44 (0)191 208 1357

Web: www.ncl.ac.uk/ion

 

 

 

 

 

From: SPM (Statistical Parametric Mapping) [mailto:[log in to unmask]] On Behalf Of Adriana Roca
Sent: 18 June 2015 11:34
To: [log in to unmask]
Subject: [SPM] Unix executable files. And .obj conversion in .nii

 

Hi All, 

 

I am trying to open files which are object maps drew in Analyze software in Windows in my Mac. After the file transference, they appear as “unix executable files”, which means that my computer doesn’t know what extension is it, means that it can’t even recognise the files. 

I would like to open these files in my Mac and then, convert the .obj from analyse in .nii. Does anyone know how can I do to make visible this files on my Mac, and how to convert .obj from Analyze in .nii (if it were possible)?

Thank you in advance. 

 

Best regards,


Adriana.