spunt / bspmview

MATLAB program for viewing 3D fMRI statistical images
http://www.bobspunt.com/software/bspmview
53 stars 26 forks source link

Unable to write files #9

Closed annapm-kcl closed 8 years ago

annapm-kcl commented 8 years ago

Hi, I've recently downloaded the toolbox but I'm having similar issues that another user had. I added my comment to that thread (#3) but then realised it was closed.

Just to repeat, this is the error I'm getting:

Error using save Unable to write file /software/system/spm/spm-12-20160310/toolbox/bspmview/supportfiles/defpref.mat: No such file or directory.

Error in bspmview>default_preferences (line 180) if initial, save(deffile, '-struct', 'def'); return; end

Error in bspmview>put_figure (line 441) default_preferences(1);

Error in bspmview (line 139) S = put_figure(ol, ul); she;

Error in spm (line 1009) evalin('base',xTB(i).prog);

Error while evaluating UIControl Callback

However I'm working on a multi-user system so it's not possible for me to log in as an administrator or have permission to write to this directory. Is there any way around this so that I can still use the toolbox, or select another directory to save my files to?

Thanks Anna

spunt commented 8 years ago

Hi Anna - Sorry about this, and thanks for re-submitting this as a new issue. Is this the first time you've tried to open bspmview on this system? If so, you might be able to get around this issue simply by adding a copy of defpref.mat.zip to /software/system/spm/spm-12-20160310/toolbox/bspmview/supportfiles. (Make sure to unzip the file, too.) This file stores user preferences and is created the first time bspmview is opened. Even if this does allow you to run bspmview on the system, you still may run into permissions issues if you try to change user preferences, since such changes are written to this file.

More generally, I should note that I didn't have multi-user systems in mind when writing bspmview so for now you may be best off using your own, local copy. The only feature you currently gain from having bspmview in the toolbox/ folder of spm is being able to open it from the spm GUI. Is it possible for you to use a local copy?

In the next week or so, I will try and look into making bspmview play well with multi-user systems.

Cheers, Bob

spunt commented 8 years ago

Hi Anna - In response to another user reporting a write permissions issue, I just pushed an update to the software that I hope will solve this problem for good by writing the user preference file to the user's home directory by default. To make this file recognizable I renamed it bspmview_preferences.mat. Let me know if this doesn't solve your problem.

Cheers, Bob