yeatmanlab / AFQ

Automated Fiber Quantification
73 stars 52 forks source link

Dependency of MATLAB image processing toolbox #14

Open htakemur opened 7 years ago

htakemur commented 7 years ago

Hi Jason and all,

This is not really a "bug" or issue, but I am posting because just recently I noticed that there is a dependency on MATLAB toolbox.

I tried to use AFQ in the computer of my colleagues. The code stopped at AFQ_WholebrainTractography.m where they performed dtiClean (line 99). dtiClean has a dependency on Image Processing Toolbox. Excluding dtiClean command from the pipeline certainly made many problems in subsequent analysis. It did not make any problem in my MATLAB, because I have an Image processing toolbox.

I think that it is useful for making a note in somewhere in the Wiki describing about which toolbox AFQ is using. Image Processing Toolbox seems to be an important one. I am not fully sure about how much others (Statistics? Optimizations?) are necessary or not.

ShuyueWang commented 4 years ago

Hi Hiromasa, It's been several years from your comment...Hope you still remember this...I seem to have a similar issue, that code stopped at AFQ_WholebrainTractography.m, and the error was in dtiClean (roiMask = zeros(diff(bb)+1)) : error using zeros, size vector must be a row vector with real element. Image processing toolbox was installed. Then, I checked the FA results of test data computed from dtiComputerFA.m, while the values were all NAN. Strangely, I ran example.m without any problems few months ago......Even weirder, sometimes it's ok (I did not change anything). I wonder what this could be. I am apprecaite if you could provide any suggestion. Thanks a lot!

htakemur commented 4 years ago

Hi @ShuyueWang

It is difficult to remotely assess errors, which are not very reproducible. I will suggest to first explore the environment where the same errors are reproduced --- such as testing the same code on different MATLAB version or different computer. This will give us a sense on from where the error is coming from (e.g. some dependency of codes on MATLAB versions or local computing environment issues).

Other thoughts is that probably you may check whether FSL is installed in your environment or not. Some of vistasoft function calls FSL BET, to extract brain mask. If there is a problem in communicating between FSL and MATLAB, perhaps it creases some errors in creating in roiMask.

I guess that this will not fully resolve the issue, but I have to say that without figuring out where the error is reproducibly occurring, it is difficult to assess the issue.

Other thing you can do is that using MATLAB debug mode to explore from where the source of the error may be coming from.