vistalab/vistasoft — pull request #102 by mick-d (2014-03-27 22:18:27+00:00)
Title: Correct systematic error generated with dtiInitParams.eddyCorrect=-1

`dtiInitDir` always set the `ecFile` to a path no matter the value of the `eddyCorrect` parameter set in the `dtiInitParams` structure. As a result the variable `ecFile`, which becomes `ecXformFile` in `dtiRawResample`, is never empty: even with `dtiInitParams.eddyCorrect = -1`, `isempty(ecXformFile)` in `dtiRawResample` (line 58 in code extract below) will evaluate to `False`, the subsequent test will succeed and lead to try loading the unexisting `ecXformFile` (thus generating an error).
```
if(isempty(ecXformFile))
xform = [];
elseif(ischar(ecXformFile))
load(ecXformFile);
else
xform = ecXformFile;
end
```

A simple fix is to set `ecFile` to an empty string in `dtiInitDir`