I am trying to batch script roi extraction from image (nii) to then perform ROI analysis over multiple ROIs and subjects.
I am using the example lines provided:
fname = roi_list{1};
roi = maroi_image(fname);
I get an error early on while loading the roi.
I have seen a couple of posts that resolved a similar issue by adding marsbar('on'). It didn't work for me.
I tried to versions of matlab: 2016b and 2019a - same error
I am using spm8
I am able to use the line params.vol = spm_vol(params) outside the script.
So it must be something (trivial) related to how params is defined, but I am unable to spot it.
Can anyone help please?
Thanks,
Ilaria
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
the script now runs without errors and roi.mat is generated.
However, when I attempt to visualize the rois from marsbar - roi definition - view
They do not appear in the gui in the folder where they are. Thus I understand that marsbar does not recognize them.
Does anyone have a clue?
I noticed that the there is one difference between the roi build via scripting and via gui:
the label field is empty:
Dear All,
I am trying to batch script roi extraction from image (nii) to then perform ROI analysis over multiple ROIs and subjects.
I am using the example lines provided:
fname = roi_list{1};
roi = maroi_image(fname);
I get an error early on while loading the roi.
I have seen a couple of posts that resolved a similar issue by adding marsbar('on'). It didn't work for me.
I tried to versions of matlab: 2016b and 2019a - same error
I am using spm8
I am able to use the line params.vol = spm_vol(params) outside the script.
So it must be something (trivial) related to how params is defined, but I am unable to spot it.
Can anyone help please?
Thanks,
Ilaria
I thought I had found a workaround by using
the script now runs without errors and roi.mat is generated.
However, when I attempt to visualize the rois from marsbar - roi definition - view
They do not appear in the gui in the folder where they are. Thus I understand that marsbar does not recognize them.
Does anyone have a clue?
I noticed that the there is one difference between the roi build via scripting and via gui:
the label field is empty:
val =
[maroi_matrix - 11 - binarized]
Can this be the problem?
Thanks!
Ilaria
I'm really sorry I missed this one. If you still haven't solved this - can you post over at https://marsbar.discourse.group/ ?