cpp-lln-lab / bidspm

an SPM centric BIDS app
https://bidspm.readthedocs.io/en/latest/general_information.html
GNU General Public License v3.0
5 stars 13 forks source link

[BUG] `opt.results(1).montage.background` does note update the background for each subject #645

Closed marcobarilari closed 2 years ago

marcobarilari commented 2 years ago

Is there an existing issue for this?

Expected Behavior

No response

Current Behavior

subfun checkMontage within bidsResults queries correctly the background for the first subject and assing path (char) to opt.results(iRes).montage.background (it was struct from get_option.m).

for the second subject, checkMontage check montagege receives a path (path) so

background = opt.results(iRes).montage.background;

% TODO refactor with getInclusiveMask
if isstruct(background)
[..]

does not query for second subject eh UNIT1 but takes for granted that the path is the one user wants and pass over

Error message

No response

Environment

- OS:
- Matlab:
- SPM:

Branch

- branch:
- version: 2.0.0

Anything else?

No response

Remi-Gau commented 2 years ago

Confirmed.

Also happens in MNI space actually.

The batch for the results of a subject blnd02 contains: sub-blnd01_space-MNI152NLin2009cAsym_desc-preproc_T1w.nii

matlabbatch{1}.spm.stats.results.export{2}.montage.background = {'/home/remi/gin/Christine/olfaction_blind/derivatives/cpp_spm/outputs/derivatives/cpp_spm-preproc/sub-blnd01/anat/sub-blnd01_space-MNI152NLin2009cAsym_desc-preproc_T1w.nii'};