raacampbell / matlab_elastix

MATLAB Elastix wrapper
http://www.mathworks.com/matlabcentral/fileexchange/52982-matlab-elastix
GNU Lesser General Public License v3.0
26 stars 12 forks source link

elastix.m LD_LIBRARY_PATH assignment resulting in error #21

Closed larsrollik closed 5 years ago

larsrollik commented 5 years ago

When running elastix.m on linux, then following section produces an error:

% Run the command and report back if it failed fprintf('Running: %s\n',CMD) if isunix CMD=['LD_LIBRARY_PATH= ', CMD]; end

Commenting out this prefixing solves the issue.

raacampbell commented 5 years ago

What is the error?

raacampbell commented 5 years ago

But also:

>> system('transformix --version')
transformix: error while loading shared libraries: libANNlib.so: cannot open shared object file: No such file or directory

Which causes a failure right at the start (same for elastix.m) and commenting out the line you mention does not fix this.

raacampbell commented 5 years ago

Report library errors correctly to screen: f1e8e1298486bb3a6996e4b7205e12b3879ca573

larsrollik commented 5 years ago

Sorry, if I was not clear enough about the error.

CMD=['LD_LIBRARY_PATH= ', CMD]; resulted in an error on my machine, because CMD equals a command string similar to elastix -key param instead of an LD_LIBRARY_PATH.

raacampbell commented 5 years ago

I noticed that and it indeed looks wrong but I get no error, which is odd. I'll double check.

raacampbell commented 5 years ago

Yep. I get no error, but you are correct that it can't be right. I'll just remove it.

raacampbell commented 5 years ago

Describe what to do if a library error happens on Linux: 253c25227b75968594cbd517c8e64b41f74f595f Get rid of clearly incorrect lines in elastix.m and transformix.m: 8c54fb5eb39bd265e2be0aa41bdf81621c9f63b2