-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing 'niftiRead.c' file #303
Comments
It seems that this file, dtiCompileMex.m, does indeed have a bug for the reason you say. The apparent but was introduced in 2013: d96d293#diff-8ee67c097b9526d9288582abcabd771e It is possible that the code ran at the time, and that niftiRead.c has been deleted since then. In any case, it looks to me like that part of the code should be reverted. I can make this part of the code by reverting it. However, I then get errors from later lines such as Warning: Something went wrong! Where is directory?
> In dtiCompileMex (line 97)
Error using cd
Cannot CD to (No directory specified).
Error in dtiCompileMex (line 99)
cd(srcDir); All of which makes me wonder how necessary this compile code is. Does anyone use dtiCompileMex? If so, how, since it seems to produce a lot of errors. -Jon |
Oopsie. Did I break something? |
Possibly, back in 2013. But then again, maybe the code ran when it was introduced, and fails now because files have subsequently been removed. Not sure. In any case, the bit of code in question can be fixed by reverting these lines: -cd(fileparts(which('niftiRead.c')));
+cd(fileparts(which('readFileNifti.c')));
disp('Compiling read/writeFileNifti ...');
try
- mex niftiRead.c nifti1_io.c znzlib.c zlib/adler32.c zlib/compress.c zlib/crc32.c zlib/deflate.c zlib/gzio.c zlib/infback.c zlib/inffast.c zlib/inflate.c zlib/inftrees.c zlib/trees.c zlib/zutil.c
- mexFiles{end+1} = ['niftiRead.' mexext];
+ mex readFileNifti.c nifti1_io.c znzlib.c zlib/adler32.c zlib/compress.c zlib/crc32.c zlib/deflate.c zlib/gzio.c zlib/infback.c zlib/inffast.c zlib/inflate.c zlib/inftrees.c zlib/trees.c zlib/zutil.c
+ mexFiles{end+1} = ['readFileNifti.' mexext];
mex writeFileNifti.c nifti1_io.c znzlib.c zlib/adler32.c zlib/compress.c zlib/crc32.c zlib/deflate.c zlib/gzio.c zlib/infback.c zlib/inffast.c zlib/inflate.c zlib/inftrees.c zlib/trees.c zlib/zutil.c
mexFiles{end+1} = ['writeFileNifti.' mexext];
catch However, many of the subsequent calls to mex also fail, due to what looks like a path problem (or problems), starting with line 75: functionsToCompile={ ... Which makes me wonder if anyone in fact calls this function. |
Following up on this, I am trying to run dtiCompileMex.m on a MacOS Mojave Version 10.14.6 with Matlab 2019a, but get errors throughout, not only errors in the paths, but also in compiling dtiFiberTracker.cxx dtiFitTensor.c and several others. |
To further clarify, I can compile other code that requires lapack succesfully (e.g. the Matlab example), but get the following error when trying to compile dtiFitTensor.c: Building with 'Xcode with Clang'. |
In dtiFitTensor.c, I think there is a small mistake on line 594 which states 'return 0;' in a void return function. Changing this to 'return;' solves the compile issue Dora encountered above. |
I was trying to run 'dtiCompileMex.m' in mrDiffusion in MATLAB R2017a, but I get the following error:
Searching through the entire vistasoft on github, I don't even see a 'niftiRead.c', only a 'readFileNifti.c' which seems to have been modified about five years ago (but I'm guessing many people have been able to run the program since then). There also seems to have been a problem last year regarding something similar on MATLAB R2017a (#229).
Hope someone can point me in the right direction so I can compile the script. Thanks!
The text was updated successfully, but these errors were encountered: