Back to the main page.

Bug 2039 - Reading *.smr files

Status ASSIGNED
Reported 2013-03-09 13:24:00 +0100
Modified 2013-09-18 14:22:24 +0200
Product: FieldTrip
Component: fileio
Version: unspecified
Hardware: PC
Operating System: Linux
Importance: P3 normal
Assigned to: Jim Herring
URL:
Tags:
Depends on:
Blocks:
See also:

Hamid - 2013-03-09 13:24:00 +0100

I am not able to read *.smr files, The first error I get, %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ??? Undefined function or method 'mexprog' for input arguments of type 'double'. Error in ==> ns_SetLibrary at 39 [ns_RESULT] = mexprog(18, filename); Error in ==> read_ced_son at 93 ns_RESULT = ns_SetLibrary(which('nsCedSon.dll')); Error in ==> ft_read_header at 394 orig = read_ced_son(filename,'readevents','no','readdata','no'); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% This is because matlab don't accept mexprog.dll anymore, I added mexprog.mexa64 to my path but I get this error: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ??? Error using ==> read_ced_son at 97 Could not get NeuroShare library info, please use the NS_SETLIBRARY function. Error in ==> ft_read_header at 394 orig = read_ced_son(filename,'readevents','no','readdata','no'); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% This is because when it calls ns_SetLibrary(which('nsCedSon.dll')); there is no nsCedSon.dll, I added this file but it does not work again I think this toolbox 'neuroshare' is old now and needs to be updated.


Jim Herring - 2013-09-18 09:00:39 +0200

If I replace the Neuroshare toolbox with the most recent version and add the nsCedSon.dll files (32-bit and 64-bit) it works for me but some adjustments have to be made to ft_read_data to switch between the 64-bit and 32-bit .dll file. I will follow up on this.


Jim Herring - 2013-09-18 09:58:47 +0200

The neuroshare toolbox currently distributed with FieldTrip is from 2003/2004, the most recent version (2.5) is from 2010 and can be downloaded here: http://sourceforge.net/projects/neuroshare/files/Matlab%20Import%20Filter/ The most recent version of nsCedSon.dll (.dll created by CED to read .smr files) can be found here: http://www.ced.co.uk/upnssonu.shtml


Eelke Spaak - 2013-09-18 14:22:24 +0200

the best would be to have a native implementation that does not rely on windows libraries. Ask the ced people directly for a working matlab implementation on linux. alternatively, ask for documentation and write the code yourself (i.e. Jim).