help > rBPM for SPM8?
Showing 1-14 of 14 posts
Feb 22, 2011 04:02 PM | Eugenio Abela
rBPM for SPM8?
Hi,
can rBPM/BnPM be integrated into SPM8?
Cheers,
Eugenio
can rBPM/BnPM be integrated into SPM8?
Cheers,
Eugenio
Mar 9, 2012 07:03 PM | Bennett Landman
RE: rBPM for SPM8?
Sorry for the delay in reponse. rBPM is built upon the BPM toolkit.
The BPM authors detail some support for SPM8 (see the manual in the
new download). Currently, we fully support SPM5, but would be happy
to discuss SPM8 updates.
Nov 14, 2012 11:11 AM | Kun-Hsien Chou
RE: rBPM for SPM8?
Dear rBPM developer
When i use the newest BPMe_3.0 with SPM8, i found the following problem:
Error using fileparts
Too many output arguments.
Error in wfu_bpm_path_in_struct (line 22)
[pathstr, name, ext, version] = fileparts(BPM.mask);
Error in wfu_bpm_con_man (line 15)
BPM = wfu_bpm_path_in_struct(BPM_fname, BPM);
Error in wfu_bpm>button2Callback (line 193)
wfu_bpm_con_man;
Could anyone help me to deal with this error ? Thanks very much !
PS: I use SPM8 (ver.4667) with MAC OSX 10.8.2 and Matlab R2012a. The error occurred when i want to use "Contrast Manager" after running "BPM analysis".
When i use the newest BPMe_3.0 with SPM8, i found the following problem:
Error using fileparts
Too many output arguments.
Error in wfu_bpm_path_in_struct (line 22)
[pathstr, name, ext, version] = fileparts(BPM.mask);
Error in wfu_bpm_con_man (line 15)
BPM = wfu_bpm_path_in_struct(BPM_fname, BPM);
Error in wfu_bpm>button2Callback (line 193)
wfu_bpm_con_man;
Could anyone help me to deal with this error ? Thanks very much !
PS: I use SPM8 (ver.4667) with MAC OSX 10.8.2 and Matlab R2012a. The error occurred when i want to use "Contrast Manager" after running "BPM analysis".
Nov 14, 2012 12:11 PM | Bennett Landman
RE: rBPM for SPM8?
I've asked the author to look into this and follow up.
Nov 14, 2012 12:11 PM | Kun-Hsien Chou
RE: rBPM for SPM8?
Dear Bennett Landman
After googling this problem, i found the problem may come from the version of Matlab.
I will try to use Matlab R2010a and retest the BPMe_3.0 with SPM8, thanks for your help!
After googling this problem, i found the problem may come from the version of Matlab.
I will try to use Matlab R2010a and retest the BPMe_3.0 with SPM8, thanks for your help!
Nov 14, 2012 03:11 PM | Kun-Hsien Chou
RE: rBPM for SPM8?
Dear Bennett Landman
Everything looks ok after running BPMe_3.0 robust correlation module in SPM8 with Matlab R2010.
I have some further questions and problems when i play with Model II regression and hope you could give me a hand:
1. What is "predefined prior " and how could i get or calculate this predefined prior for Model II regression ?
2. The manual mentioned that if i don't have a "predefined prior " for Model II regression , i need to specify the window size for the main modality image and regressor image respectively. Could you give some hints for identify these values for each image modality respectively ?
3. Currently i follow the manual to play with the function of Model II regression, after setting all the parameters, i get following error:
Dimension of Priors does not match
??? Attempted to access prior_mu(1); index out of bounds because numel(prior_mu)=0.
Error in ==> modelII_bpm_glm at 59
mu(i,1) = prior_mu(i);
Error in ==> modelII_bpm_ancova at 336
[beta_coef,XX,dof(:,:,slice_no),sig2(:,:,slice_no),Es] =
modelII_bpm_glm(data,confound,col_conf,brain_mask(:,:,slice_no),ngsubj,beta_coef,E,sig2_slice,dof_slice,XX_slice,mu,fmuimg);
Error in ==> wfu_bpm_execute at 43
[X,dof,sig2,mask,nsubj,nr,Vtemp] = modelII_bpm_ancova(BPM);
Error in ==> wfu_bpm_analysis at 347
[results] = wfu_bpm_execute(BPM);
Error in ==> wfu_bpm>button1Callback at 188
wfu_bpm_analysis;
??? Error while evaluating uicontrol Callback
Sorry to bother you and thanks for your kindly help.
PS: I use Matlab R2010a with SPM8 and Mac OSX 10.8.2
Best
Paul
Everything looks ok after running BPMe_3.0 robust correlation module in SPM8 with Matlab R2010.
I have some further questions and problems when i play with Model II regression and hope you could give me a hand:
1. What is "predefined prior " and how could i get or calculate this predefined prior for Model II regression ?
2. The manual mentioned that if i don't have a "predefined prior " for Model II regression , i need to specify the window size for the main modality image and regressor image respectively. Could you give some hints for identify these values for each image modality respectively ?
3. Currently i follow the manual to play with the function of Model II regression, after setting all the parameters, i get following error:
Dimension of Priors does not match
??? Attempted to access prior_mu(1); index out of bounds because numel(prior_mu)=0.
Error in ==> modelII_bpm_glm at 59
mu(i,1) = prior_mu(i);
Error in ==> modelII_bpm_ancova at 336
[beta_coef,XX,dof(:,:,slice_no),sig2(:,:,slice_no),Es] =
modelII_bpm_glm(data,confound,col_conf,brain_mask(:,:,slice_no),ngsubj,beta_coef,E,sig2_slice,dof_slice,XX_slice,mu,fmuimg);
Error in ==> wfu_bpm_execute at 43
[X,dof,sig2,mask,nsubj,nr,Vtemp] = modelII_bpm_ancova(BPM);
Error in ==> wfu_bpm_analysis at 347
[results] = wfu_bpm_execute(BPM);
Error in ==> wfu_bpm>button1Callback at 188
wfu_bpm_analysis;
??? Error while evaluating uicontrol Callback
Sorry to bother you and thanks for your kindly help.
PS: I use Matlab R2010a with SPM8 and Mac OSX 10.8.2
Best
Paul
Nov 14, 2012 04:11 PM | Xue Yang
RE: rBPM for SPM8?
Hi Paul,
1. The predefined prior is the proportion of the standard deviation of noise of each random regressor images to the main modality image (or the inverse proportion signal to noise ratio (SNR) of the regressor images to the main modality image). For example, the estimated SNR of the main modality is 20, the estimated SNR of one regressor image is 30, than you can set the predefined prior to be 20/30.
2. The specified window size is used to estimate the standard deviation of noise of each images. The default estimation method is the stdfilt function in MATLAB. Please refer to the MATLAB function for more detail of selecting the window size.
3. Did you set up a predefined prior or set up a window size?
Thanks for your interest. Please let me know if you have further questions.
Xue
1. The predefined prior is the proportion of the standard deviation of noise of each random regressor images to the main modality image (or the inverse proportion signal to noise ratio (SNR) of the regressor images to the main modality image). For example, the estimated SNR of the main modality is 20, the estimated SNR of one regressor image is 30, than you can set the predefined prior to be 20/30.
2. The specified window size is used to estimate the standard deviation of noise of each images. The default estimation method is the stdfilt function in MATLAB. Please refer to the MATLAB function for more detail of selecting the window size.
3. Did you set up a predefined prior or set up a window size?
Thanks for your interest. Please let me know if you have further questions.
Xue
Nov 14, 2012 04:11 PM | Kun-Hsien Chou
RE: rBPM for SPM8?
Hi Xue
Thanks for your detail explanation. I have some further questions:
1. For question 3, i followed the manual and setting window size for PET (5 5 5) and GM image (3 3 3), but the error still occurred.
2. For question 2, if i want to perform Model II correlation for task fmri series (original size = 3*3*3) and VBM GM volume image (original voxel size = 1*1*1) , which window size are reasonable for each image modality ?
Many thanks!
Paul
Thanks for your detail explanation. I have some further questions:
1. For question 3, i followed the manual and setting window size for PET (5 5 5) and GM image (3 3 3), but the error still occurred.
2. For question 2, if i want to perform Model II correlation for task fmri series (original size = 3*3*3) and VBM GM volume image (original voxel size = 1*1*1) , which window size are reasonable for each image modality ?
Many thanks!
Paul
Nov 15, 2012 05:11 PM | Xue Yang
RE: rBPM for SPM8?
Hi Paul,
I'm so sorry that there is a bug in the code. It is fixed now.
For question 2, I would look at the images to choose the window size, and may try different window size using the MATLAB stdfilt function to find a good window size. For more accurate prior estimation, I will try SNR estimation methods to estimate the prior. I think you can find a good SNR estimation method that fits your data. For simplest, you may use the default window size of the stdfilt function ([3 3 3]) or your smoothing window size.
Thanks for your interest!
Xue
I'm so sorry that there is a bug in the code. It is fixed now.
For question 2, I would look at the images to choose the window size, and may try different window size using the MATLAB stdfilt function to find a good window size. For more accurate prior estimation, I will try SNR estimation methods to estimate the prior. I think you can find a good SNR estimation method that fits your data. For simplest, you may use the default window size of the stdfilt function ([3 3 3]) or your smoothing window size.
Thanks for your interest!
Xue
Nov 18, 2012 09:11 AM | Kun-Hsien Chou
RE: rBPM for SPM8?
Hi Xue
Thanks you newest version. It can run very smoothly during beta estimation but have some error when using "Contrast Manager". I found the following error after specify the contrast in "Contrast Manager" module. Could you help me to solve this error ? Thank you very much !
calling contrast manager ...
Reset BPM.mat path: /Users/PaulSmith/Analysis/BPM_Test
??? Error using ==> times
Matrix dimensions must agree.
Error in ==> nFisherInf at 11
ray = beta(1:nbr).*estsig2(1:nbr);
Error in ==> modelII_compute_Tmap at 19
nI = nFisherInf(beran,sig2(m,n),voxelXtX,mu2,nsubj);
Error in ==> wfu_bpm_con_man at 379
Smap(:,:,slice_no) = modelII_compute_Tmap(BETA_slice, XtX, c, brain_mask, sig2,
Smap(:,:,slice_no),M,N,nr,mu.^2,nsubj,BPM.fmuimg);
Error in ==> wfu_bpm>button2Callback at 193
wfu_bpm_con_man;
??? Error while evaluating uicontrol Callback
Best
Paul
Thanks you newest version. It can run very smoothly during beta estimation but have some error when using "Contrast Manager". I found the following error after specify the contrast in "Contrast Manager" module. Could you help me to solve this error ? Thank you very much !
calling contrast manager ...
Reset BPM.mat path: /Users/PaulSmith/Analysis/BPM_Test
??? Error using ==> times
Matrix dimensions must agree.
Error in ==> nFisherInf at 11
ray = beta(1:nbr).*estsig2(1:nbr);
Error in ==> modelII_compute_Tmap at 19
nI = nFisherInf(beran,sig2(m,n),voxelXtX,mu2,nsubj);
Error in ==> wfu_bpm_con_man at 379
Smap(:,:,slice_no) = modelII_compute_Tmap(BETA_slice, XtX, c, brain_mask, sig2,
Smap(:,:,slice_no),M,N,nr,mu.^2,nsubj,BPM.fmuimg);
Error in ==> wfu_bpm>button2Callback at 193
wfu_bpm_con_man;
??? Error while evaluating uicontrol Callback
Best
Paul
Nov 21, 2012 05:11 PM | Xue Yang
RE: rBPM for SPM8?
Hi Paul,
Sorry about that. Do you like to try it again?
Thanks,
Xue
Sorry about that. Do you like to try it again?
Thanks,
Xue
Nov 22, 2012 11:11 AM | Kun-Hsien Chou
RE: rBPM for SPM8?
Hi Xue
Thanks for your help. The new version runs smoothly in my Mac !
Many Thanks !
Paul
Thanks for your help. The new version runs smoothly in my Mac !
Many Thanks !
Paul
Nov 22, 2012 02:11 PM | Bennett Landman
RE: rBPM for SPM8?
Thank you for helping us to improve the package.
Oct 15, 2015 11:10 AM | Gerard Bischof - department of nuclear medicine
too many agruments error with rBPM with SPM5
Hello everyone and Hello Paul,
Did this ever got resolved for you? As I am getting the same error message (see below), when attempting to load the bpm.mat file into the contrast manager -- I tried it with and without loading the brainmask (in the latter case I used the one provided with a threshold of .1). Any help or advice here?
Thanks so much,
GĂ©rard N Bischof, PhD
Error using fileparts
Too many output arguments.
Error in wfu_bpm_path_in_struct (line 22)
[pathstr, name, ext, version] = fileparts(BPM.mask);
Error in wfu_bpm_con_man (line 15)
BPM = wfu_bpm_path_in_struct(BPM_fname, BPM);
Error in wfu_bpm>button2Callback (line 193)
wfu_bpm_con_man;
Error while evaluating uicontrol Callback
Did this ever got resolved for you? As I am getting the same error message (see below), when attempting to load the bpm.mat file into the contrast manager -- I tried it with and without loading the brainmask (in the latter case I used the one provided with a threshold of .1). Any help or advice here?
Thanks so much,
GĂ©rard N Bischof, PhD
Error using fileparts
Too many output arguments.
Error in wfu_bpm_path_in_struct (line 22)
[pathstr, name, ext, version] = fileparts(BPM.mask);
Error in wfu_bpm_con_man (line 15)
BPM = wfu_bpm_path_in_struct(BPM_fname, BPM);
Error in wfu_bpm>button2Callback (line 193)
wfu_bpm_con_man;
Error while evaluating uicontrol Callback