general-discussion > Error using niak_read_minc
Showing 1-2 of 2 posts
Results per page:
Aug 17, 2016  12:08 PM | Yiming Xiao
Error using niak_read_minc

I recently downloaded NIAK-boss-0.13.0 on my macbook pro to use in MATLAB 2016a.
However, when I tried to read in a minc volume with niak_read_minc, i got the following error:

Warning: System MACI64 unknown!

> In niak_gb_vars (line 140)
In niak_read_hdr_minc (line 69)
In niak_read_minc (line 66)
Error using niak_read_hdr_minc (line 96)
niak:read: Could not parse the minc header !
Error in niak_read_minc (line 66)
hdr = niak_read_hdr_minc(file_name);

I am on OSX El Capitan, version 10.11.5.
I first sourced /opt/minc-itk4/
and then opened MATLAB in the terminal... add the NIAK path.

It also appears that in the MATLAB command, it won't recognize any minc tool functions..

Any reason why this is happening?

Really appreciate some help.

Aug 22, 2016  03:08 AM | Pierre Bellec
RE: Error using niak_read_minc
Dear Yiming,

Sorry for the late answer. I was in vacation and tried to limit my internet access. 

So, the warning you are getting in not important. It has been removed in more recent versions of NIAK. 

Have you tried adding the sourcing of /opt/minc-itk4/ to your .bashrc or .bash_profile ? Matlab initiates a new bash session for every system call, so simply sourcing the minc initialization script once before starting matlab won't be enough. Check that the following command works in matlab:
system('mincinfo -version')
if it doesn't, niak will not work. 

FYI, we have moved to deployment of niak using docker and octave, because we were running into too much trouble supporting Matlab/Octave x OS. This will not work if you require matlab-specific features, but it may be worth trying. Installation instructions are there: