Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion manualTests/test_setBatchCoregistrationFmap.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function test_setBatchCoregistrationFmapBasic()

[~, opt, BIDS] = getData(opt);

matlabbatch = [];
matlabbatch = {};
matlabbatch = setBatchCoregistrationFmap(matlabbatch, BIDS, opt, subID);

directory = fullfile(opt.derivativesDir, ...
Expand Down
2 changes: 1 addition & 1 deletion manualTests/test_setBatchCreateVDMs.m
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function test_setBatchCreateVDMsBasic()

[~, opt, BIDS] = getData(opt);

matlabbatch = [];
matlabbatch = {};
matlabbatch = setBatchCreateVDMs(matlabbatch, BIDS, opt, subID);

% matlabbatch{1}.spm.tools.fieldmap.calculatevdm.subj
Expand Down
2 changes: 1 addition & 1 deletion src/templates/bidsTemplateWorkflow.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function bidsTemplateWorkflow(opt)

printProcessingSubject(iSub, subLabel);

matlabbatch = [];
matlabbatch = {};

matlabbatch = setBatchSomeBatch(matlabbatch, BIDS, opt, subLabel);

Expand Down
2 changes: 1 addition & 1 deletion src/workflows/bidsConcatBetaTmaps.m
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ function bidsConcatBetaTmaps(opt, funcFWHM, deleteIndBeta, deleteIndTmaps)
% beta maps
outputName = ['4D_beta_', num2str(funcFWHM), '.nii'];

matlabbatch = [];
matlabbatch = {};
matlabbatch = setBatch3Dto4D(matlabbatch, beta_maps, RT, outputName);

% t-maps
Expand Down
4 changes: 2 additions & 2 deletions src/workflows/bidsCreateVDM.m
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ function bidsCreateVDM(opt)
[fileName, subFuncDataDir] = getBoldFilename(BIDS, subLabel, sessions{1}, runs{1}, opt);
spmup_basics(fullfile(subFuncDataDir, fileName), 'mean');

matlabbatch = [];
matlabbatch = {};
matlabbatch = setBatchCoregistrationFmap(matlabbatch, BIDS, opt, subLabel);
saveAndRunWorkflow(matlabbatch, 'coregister_fmap', opt, subLabel);

matlabbatch = [];
matlabbatch = {};
matlabbatch = setBatchCreateVDMs(matlabbatch, BIDS, opt, subLabel);
saveAndRunWorkflow(matlabbatch, 'create_vdm', opt, subLabel);

Expand Down
2 changes: 1 addition & 1 deletion src/workflows/bidsFFX.m
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function bidsFFX(action, opt, funcFWHM)

printProcessingSubject(iSub, subLabel);

matlabbatch = [];
matlabbatch = {};

switch action

Expand Down
2 changes: 1 addition & 1 deletion src/workflows/bidsLesionAbnormalitiesDetection.m
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function bidsLesionAbnormalitiesDetection(opt)
end
end

matlabbatch = [];
matlabbatch = {};
matlabbatch = setBatchLesionAbnormalitiesDetection(matlabbatch, opt, images);

saveAndRunWorkflow(matlabbatch, 'LesionAbnormalitiesDetection', opt, subLabel);
Expand Down
2 changes: 1 addition & 1 deletion src/workflows/bidsLesionOverlapMap.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function bidsLesionOverlapMap(opt)

printProcessingSubject(iSub, subLabel);

matlabbatch = [];
matlabbatch = {};
matlabbatch = setBatchLesionOverlapMap(matlabbatch, BIDS, opt, subLabel);

saveAndRunWorkflow(matlabbatch, 'LesionOverlapMap', opt, subLabel);
Expand Down
2 changes: 1 addition & 1 deletion src/workflows/bidsLesionSegmentation.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function bidsLesionSegmentation(opt)

printProcessingSubject(iSub, subLabel);

matlabbatch = [];
matlabbatch = {};
matlabbatch = setBatchLesionSegmentation(matlabbatch, BIDS, opt, subLabel);

saveAndRunWorkflow(matlabbatch, 'LesionSegmentation', opt, subLabel);
Expand Down
8 changes: 4 additions & 4 deletions src/workflows/bidsRFX.m
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function bidsRFX(action, opt, funcFWHM, conFWHM)

case 'smoothContrasts'

matlabbatch = [];
matlabbatch = {};
matlabbatch = setBatchSmoothConImages(matlabbatch, opt, funcFWHM, conFWHM);

saveAndRunWorkflow(matlabbatch, ...
Expand All @@ -65,7 +65,7 @@ function bidsRFX(action, opt, funcFWHM, conFWHM)
% - needs to be improved (maybe??) as the structural and mask may vary for
% different analysis
% ------
matlabbatch = [];
matlabbatch = {};
matlabbatch = setBatchMeanAnatAndMask(matlabbatch, ...
opt, ...
funcFWHM, ...
Expand All @@ -74,7 +74,7 @@ function bidsRFX(action, opt, funcFWHM, conFWHM)

% TODO
% saving needs to be improved (maybe??) as the name may vary with FXHM and contrast
matlabbatch = [];
matlabbatch = {};
matlabbatch = setBatchFactorialDesign(matlabbatch, opt, funcFWHM, conFWHM);

% Load the list of contrasts of interest for the RFX
Expand All @@ -86,7 +86,7 @@ function bidsRFX(action, opt, funcFWHM, conFWHM)
% TODO
% saving needs to be improved (maybe??) as the name may vary with FXHM and contrast
rfxDir = getRFXdir(opt, funcFWHM, conFWHM);
matlabbatch = [];
matlabbatch = {};
matlabbatch = setBatchGroupLevelContrasts(matlabbatch, grpLvlCon, rfxDir);
saveAndRunWorkflow(matlabbatch, 'contrasts_rfx', opt);

Expand Down
2 changes: 1 addition & 1 deletion src/workflows/bidsRealignReslice.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function bidsRealignReslice(opt)

printProcessingSubject(iSub, subLabel);

matlabbatch = [];
matlabbatch = {};
[matlabbatch, ~] = setBatchRealign( ...
matlabbatch, ...
BIDS, ...
Expand Down
2 changes: 1 addition & 1 deletion src/workflows/bidsRealignUnwarp.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function bidsRealignUnwarp(opt)

printProcessingSubject(iSub, subLabel);

matlabbatch = [];
matlabbatch = {};
[matlabbatch, ~] = setBatchRealign( ...
matlabbatch, ...
BIDS, ...
Expand Down
4 changes: 2 additions & 2 deletions src/workflows/bidsResliceTpmToFunc.m
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function bidsResliceTpmToFunc(opt)
[anatImage, anatDataDir] = getAnatFilename(BIDS, subLabel, opt);
TPMs = validationInputFile(anatDataDir, anatImage, 'c[123]');

matlabbatch = [];
matlabbatch = {};
matlabbatch = setBatchReslice(matlabbatch, ...
fullfile(meanFuncDir, meanImage), ...
cellstr(TPMs));
Expand All @@ -54,7 +54,7 @@ function bidsResliceTpmToFunc(opt)

expression = sprintf('(i1+i2+i3)>%f', opt.skullstrip.threshold);

matlabbatch = [];
matlabbatch = {};
matlabbatch = setBatchImageCalculation(matlabbatch, input, output, meanFuncDir, expression);

saveAndRunWorkflow(matlabbatch, 'create_functional_brain_mask', opt, subLabel);
Expand Down
6 changes: 3 additions & 3 deletions src/workflows/bidsResults.m
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ function bidsResults(opt, funcFWHM, conFWHM)
case 'run'
warning('run level not implemented yet');

% matlabbatch = [];
% matlabbatch = {};
% saveMatlabBatch(matlabbatch, 'computeFfxResults', opt, subID);

case 'subject'

% For each subject
for iSub = 1:numel(opt.subjects)

matlabbatch = [];
matlabbatch = {};

subLabel = opt.subjects{iSub};

Expand Down Expand Up @@ -86,7 +86,7 @@ function bidsResults(opt, funcFWHM, conFWHM)

case 'dataset'

matlabbatch = [];
matlabbatch = {};

results.dir = getRFXdir(opt, funcFWHM, conFWHM);
results.contrastNb = 1;
Expand Down
2 changes: 1 addition & 1 deletion src/workflows/bidsRoiBasedGLM.m
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function bidsRoiBasedGLM(opt)

printProcessingSubject(iSub, subLabel);

matlabbatch = [];
matlabbatch = {};

matlabbatch = setBatchSubjectLevelGLMSpec(matlabbatch, BIDS, opt, subLabel, funcFWHM);

Expand Down
2 changes: 1 addition & 1 deletion src/workflows/bidsSTC.m
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function bidsSTC(opt)

printProcessingSubject(iSub, subLabel);

matlabbatch = [];
matlabbatch = {};
matlabbatch = setBatchSTC(matlabbatch, BIDS, opt, subLabel);

saveAndRunWorkflow(matlabbatch, 'STC', opt, subLabel);
Expand Down
2 changes: 1 addition & 1 deletion src/workflows/bidsSegmentSkullStrip.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function bidsSegmentSkullStrip(opt)

printProcessingSubject(iSub, subLabel);

matlabbatch = [];
matlabbatch = {};
matlabbatch = setBatchSelectAnat(matlabbatch, BIDS, opt, subLabel);

% dependency from file selector ('Anatomical')
Expand Down
2 changes: 1 addition & 1 deletion src/workflows/bidsSmoothing.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function bidsSmoothing(funcFWHM, opt)

printProcessingSubject(iSub, subLabel);

matlabbatch = [];
matlabbatch = {};
matlabbatch = setBatchSmoothingFunc(matlabbatch, BIDS, opt, subLabel, funcFWHM);

saveAndRunWorkflow(matlabbatch, ['smoothing_FWHM-' num2str(funcFWHM)], opt, subLabel);
Expand Down
2 changes: 1 addition & 1 deletion src/workflows/bidsSpatialPrepro.m
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function bidsSpatialPrepro(opt)

parfor iSub = 1:numel(opt.subjects)

matlabbatch = [];
matlabbatch = {};

subLabel = opt.subjects{iSub};

Expand Down
2 changes: 1 addition & 1 deletion src/workflows/bidsWholeBrainFuncMask.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
opt.orderBatches.skullStripping = 2;

% make matlab batch for segment and skullstip
matlabbatch = [];
matlabbatch = {};
matlabbatch = setBatchSegmentation(matlabbatch, opt, meanFuncFileName);

matlabbatch = setBatchSkullStripping(matlabbatch, BIDS, opt, subLabel);
Expand Down
2 changes: 1 addition & 1 deletion tests/test_setBatch3Dto4D.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function test_setBatch3Dto4DBasic()

RT = 2;

matlabbatch = [];
matlabbatch = {};
matlabbatch = setBatch3Dto4D(matlabbatch, volumesList, RT);

expectedBatch{1}.spm.util.cat.vols = volumesList;
Expand Down
2 changes: 1 addition & 1 deletion tests/test_setBatchComputeVDM.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function test_setBatchComputeVDMBasic()
fmapType = 'phasediff';
refImage = fullfile(pwd, 'mean_sub-01-task-rest_bold.nii');

matlabbatch = [];
matlabbatch = {};
matlabbatch = setBatchComputeVDM(matlabbatch, fmapType, refImage);

expectedBatch = returnExpectedBatch(refImage);
Expand Down
2 changes: 1 addition & 1 deletion tests/test_setBatchFactorialDesign.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function test_setBatchFactorialDesignBasic()
opt = setOptions('vismotion');
opt.subjects = {'01' '02'};

matlabbatch = [];
matlabbatch = {};
matlabbatch = setBatchFactorialDesign(matlabbatch, opt, funcFWHM, conFWHM);

% TODO
Expand Down
4 changes: 2 additions & 2 deletions tests/test_setBatchMeanAnatAndMask.m
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function test_setBatchMeanAnatAndMaskBasic()
imcalc.output = 'meanAnat.nii';
imcalc.outdir{1} = pwd;
imcalc.expression = '(i1+i2)/2';
imcalc.options.dtype = 4;
imcalc.options.dtype = 16;

expectedBatch{1}.spm.util.imcalc = imcalc;

Expand All @@ -51,7 +51,7 @@ function test_setBatchMeanAnatAndMaskBasic()
imcalc.output = 'meanMask.nii';
imcalc.outdir{1} = pwd;
imcalc.expression = '(i1+i2)>0.75*2';
imcalc.options.dtype = 4;
imcalc.options.dtype = 16;

expectedBatch{2}.spm.util.imcalc = imcalc;

Expand Down
2 changes: 1 addition & 1 deletion tests/test_setBatchRealign.m
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function test_setBatchRealignBasic()
opt = setOptions('MoAE', subLabel);
[BIDS, opt] = getData(opt);

matlabbatch = [];
matlabbatch = {};
matlabbatch = setBatchRealign(matlabbatch, BIDS, opt, subLabel);

expectedBatch{1}.spm.spatial.realignunwarp.eoptions.weight = {''};
Expand Down
6 changes: 3 additions & 3 deletions tests/test_setBatchResults.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function test_setBatchResultsBasic()
result.Contrasts.p = 0.05;
result.Contrasts.k = 0;

matlabbatch = [];
matlabbatch = {};
matlabbatch = setBatchResults(matlabbatch, result);

expectedBatch = returnBasicExpectedResultsBatch();
Expand Down Expand Up @@ -74,7 +74,7 @@ function test_setBatchResultsExport()
result.Output = opt.result.Steps(iStep).Output;
result.space = opt.space;

matlabbatch = [];
matlabbatch = {};
matlabbatch = setBatchResults(matlabbatch, result);

expectedBatch = returnBasicExpectedResultsBatch();
Expand Down Expand Up @@ -124,7 +124,7 @@ function test_setBatchResultsMontage()
result.Output = opt.result.Steps(iStep).Output;
result.space = opt.space;

matlabbatch = [];
matlabbatch = {};
matlabbatch = setBatchResults(matlabbatch, result);

expectedBatch = returnBasicExpectedResultsBatch();
Expand Down
6 changes: 3 additions & 3 deletions tests/test_setBatchSegmentation.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function test_setBatchSegmentationPipeline()

opt.orderBatches.selectAnat = 1;

matlabbatch = [];
matlabbatch = {};
matlabbatch = setBatchSegmentation(matlabbatch, opt);

expectedBatch = returnExpectedBatch(spmLocation);
Expand All @@ -43,15 +43,15 @@ function test_setBatchSegmentationImages()
anatImage = returnLocalAnatFilename();

% check with one file
matlabbatch = [];
matlabbatch = {};
matlabbatch = setBatchSegmentation(matlabbatch, opt, anatImage);
expectedBatch = returnExpectedBatch(spmLocation);
expectedBatch{end}.spm.spatial.preproc.channel.vols{1} = anatImage;

assertEqual(expectedBatch, matlabbatch);

% check with several files passed as a cell
matlabbatch = [];
matlabbatch = {};
anatImage = {anatImage; anatImage};
matlabbatch = setBatchSegmentation(matlabbatch, opt, anatImage);
expectedBatch{end}.spm.spatial.preproc.channel.vols = anatImage;
Expand Down
2 changes: 1 addition & 1 deletion tests/test_setBatchSelectAnat.m
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function test_setBatchSelectAnatBasic()

[BIDS, opt] = getData(opt);

matlabbatch = [];
matlabbatch = {};
matlabbatch = setBatchSelectAnat(matlabbatch, BIDS, opt, subLabel);

expectedBatch{1}.cfg_basicio.cfg_named_file.name = 'Anatomical';
Expand Down
2 changes: 1 addition & 1 deletion tests/test_setBatchSkullStripping.m
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function test_setBatchSkullStrippingBasic()
imcalc.output = ['m' strrep(expectedFileName, '.nii', '_skullstripped.nii')];
imcalc.outdir = {expectedAnatDataDir};
imcalc.expression = sprintf('i1.*((i2+i3+i4)>%f)', opt.skullstrip.threshold);
imcalc.options.dtype = 4;
imcalc.options.dtype = 16;

expected_batch = {};
expected_batch{end + 1}.spm.util.imcalc = imcalc;
Expand Down
2 changes: 1 addition & 1 deletion tests/test_setBatchSmoothConImages.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function test_setBatchSmoothConImagesBasic()

[~, opt] = getData(opt);

matlabbatch = [];
matlabbatch = {};
matlabbatch = setBatchSmoothConImages(matlabbatch, opt, funcFWHM, conFWHM);

expectedBatch{1}.spm.spatial.smooth.fwhm = [6 6 6];
Expand Down
2 changes: 1 addition & 1 deletion tests/test_setBatchSmoothing.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function test_setBatchSmoothingBasic()

images = { fullfile(pwd, 'sub-01_T1w.nii') };

matlabbatch = [];
matlabbatch = {};
matlabbatch = setBatchSmoothing(matlabbatch, images, FWHM, prefix);

expectedBatch{1}.spm.spatial.smooth.fwhm = [6 6 6];
Expand Down
2 changes: 1 addition & 1 deletion tests/test_setBatchSmoothingFunc.m
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function test_setBatchSmoothingFuncBasic()
filename ext]);
system(sprintf('touch %s', fileName));

matlabbatch = [];
matlabbatch = {};
matlabbatch = setBatchSmoothingFunc(matlabbatch, BIDS, opt, subLabel, funcFWHM);

expectedBatch{1}.spm.spatial.smooth.fwhm = [6 6 6];
Expand Down
Loading