Open jonclayden opened 6 years ago
Others can help more than me, but please note: The c-code is in mrDiffusion/src/dtiSplitTensor.c
There is also a routine that compiles mex functions (but I forget which one). A good step would be to find the routine (mexcompile? makemex?) and see if you can create the mex file on your operating system and version of Matlab.
Thanks. I did try that, but the compilation failed, probably due to a problem with the system configuration or a lack of suitable compilers. For the time being I’m working around it by deleting the Win64 mex file and falling back on the slower interpreted version of this function, but if I can get the recompilation to work I’ll post an update.
To follow up as promised: I couldn't get dtiCompileMex
to work on this platform, but after rebuilding dtiSplitTensor.c by hand using mex
, and loading the dt6 file again, I see a new error:
An error occurred in mrDiffusion:
Tensor data must be a real XxYxZx6xN array (ie. 6 elements per voxel).
Thrown in:
[...]\vistasoft\mrDiffusion\file\dt6\dtiLoadDt6Gui.m line 69
Mathworks Technical Support encountered the same error. (I had a ticket open with them as I initially thought the crash was from MATLAB itself.)
To reiterate, the interpreted MATLAB version of this function works as expected, without errors, although of course it is slower.
Hello! Did you ever solve the issue that caused the new error? I've been trying to use MrDiffusion and have been encountering the same problem.
@rexscience No, I just reverted to the interpreted version of the function. I only use Windows when teaching, and speed isn't critical in that context, so the interpreted version was fine for my purposes.
I have the same problem. Using the dtiSplitTensor complied on my old computer (windows 8, matlab 2012) works most of the time anyway - I couldn't get the mesh to work on MATLAB 2017 and so installed MATLAB 2012....
I'll be glad to hear f you find a better solution
I've encountered the same problem on Windows 10, MATLAB 2017b. The MATLAB crashes with the original dtiSplitTensor.mexw64. And it throws out an error relating to data size and type saying that Tensor data must be a real XxYxZx6xN array when utilizing the locally mexified dtiSplitTensor.mexw64. Any updates on the solutions?
Do people still encounter this issue? I digged a bit, and it seems the error happens in the dtiSplitTensor.c. In matlab, the tensor data XxYxZx6x1 is treated same as XxYxZx6. (Maybe order version of Matlab treat it difference.) So, the dtiSplitTensor.m works just fine, after deleting dtiSplitTensor.mexci64 (or dtiSplitTensor.mexw64). But it's EXTREMLY slow, so almost impossible to use.
@Dongcui763 In my case, manually, re-compile with below code worked. mex -v -compatibleArrayDims dtiSplitTensor.c
@iPsych Thanks for your reply. It really helps me a lot. The dtiSplitTensor.mexw64 generated from your example code works for me. It turns out that the mex option -compatibleArrayDims has been missed out during my previous re-compilations.
Thanks for making VISTASOFT available to the community. I find mrDiffusion very easy to use, and I'm trying to use it for demonstration in my teaching.
However, when I load my dt6 file (or even the one from the example dataset) from the file menu in
dtiFiberUI
, I'm seeing persistent MATLAB crashes. This is on my university's managed installation of Windows 10 Enterprise with MATLAB 2017a. Switching between SPM12 and SPM8 makes no difference.The crash logs aren't very informative (example below), and I initially thought it was a bug in MATLAB itself, but when I step through the code I see the crash at this line, which makes me wonder if the mex version of
dtiSplitTensor
is the cause. Unfortunately I can't recompile the source files because the installation does not include the compiler toolchain.Is this likely to be the issue? Are there any incompatibilities that you know of that might underlie this? Thanks in advance.