vistalab / vistasoft

VISTASOFT is the main software repository of the VISTA lab at Stanford University.
http://vistalab.stanford.edu
148 stars 142 forks source link

Error message while running mrAnatAverageAcpcNifti #265

Closed Larry-Lai closed 7 years ago

Larry-Lai commented 7 years ago

I'm getting the following message consistently while running mrAnatAverageAcpcNifti. (Matlab 2017b/SPM12):

Direct calls to spm_defauts are deprecated. Please use spm('Defaults',modality) or spm_get_defaults instead.

alignLandmarks =

127.5000 135.5000 141.5000 127.5000 113.5000 133.5000 127.5000 135.5000 140.5000

Resampling reference image to ac-pc space, isotropic voxels... Error using prefutils>getFieldRequired (line 69) group VISTA does not exist

Error in prefutils (line 10) [varargout{1:nargout}] = feval(varargin{:});

Error in getpref (line 80) Group = prefutils('getFieldRequired',Preferences,group,...

Error in mrvWaitbar (line 20) verbose = getpref('VISTA', 'verbose');

Error in mrAnatResliceSpm (line 132) if(showProgress), h = mrvWaitbar(0,['Resampling with ' interpMethod ' interpolation...']); end

Error in mrAnatAverageAcpcNifti (line 302) [refImg,refXform] = mrAnatResliceSpm(refImg, tal2ref, bb, newMmPerVox, bSplineParams, showFigs);

Thanks for considering my request.

Regards Larry

MichaelLebrand commented 7 years ago

I had the same poblem and bypassed it by manually creating the VISTA group in my ~/.matlab/R2017a/matlabprefs.mat file using setpref('VISTA','verbose',1). To be fair I have no idea why that group didn't exist (maybe because I didn't use the toolboxtoolbox to install?) and what it does exactly (I think it initializes the waitbar, whatever that is), but it works now.

Larry-Lai commented 7 years ago

Hi Michael

Great, thanks for sharing. Could you please show me how to create this by using setpref('VISTA','verbose',1)?

Thanks for considering my request.

Cheers Larry

MichaelLebrand commented 7 years ago

You literally copy and paste that into your command window and you should be good to go. Verify that you created the field Vista>verbose>1 by loading your matlabprefs.mat file in your matlab/R2017a directory.

Larry-Lai commented 7 years ago

Hi Michael

Great, it worked! Thanks a lot.

--

setpref('VISTA','verbose',1) mrAnatAverageAcpcNifti Direct calls to spm_defauts are deprecated. Please use spm('Defaults',modality) or spm_get_defaults instead.

alignLandmarks =

131.5000 129.5000 86.5000 131.5000 104.5000 78.5000 131.5000 103.5000 107.5000

Resampling reference image to ac-pc space, isotropic voxels... writing C:\Subjects\T1Img\Sub_001\average.nii.gz...

Cheers Larry