@@ -23,6 +23,8 @@ function bidsSpatialPrepro(opt)
2323 end
2424 opt = loadAndCheckOptions(opt );
2525
26+ setGraphicWindow();
27+
2628 % load the subjects/Groups information and the task name
2729 [group , opt , BIDS ] = getData(opt );
2830
@@ -43,14 +45,11 @@ function bidsSpatialPrepro(opt)
4345
4446 printProcessingSubject(groupName , iSub , subID );
4547
46- % identify sessions for this subject
47- sessions = getInfo(BIDS , subID , opt , ' Sessions' );
48-
4948 matlabbatch = setBatchSelectAnat(matlabbatch , BIDS , opt , subID );
5049 opt.orderBatches.selectAnat = 1 ;
5150
5251 action = [];
53- if strcmp(opt .space , ' individual' )
52+ if strcmp(opt .space , ' individual' )
5453 action = ' realignUnwarp' ;
5554 end
5655 [matlabbatch , voxDim ] = setBatchRealign(matlabbatch , BIDS , subID , opt , action );
@@ -79,6 +78,12 @@ function bidsSpatialPrepro(opt)
7978
8079 spm_jobman(' run' , matlabbatch );
8180
81+ imgNb = copyGraphWindownOutput(opt , subID , ' realign' );
82+ if strcmp(opt .space , ' individual' )
83+ imgNb = copyGraphWindownOutput(opt , subID , ' unwarp' , imgNb );
84+ end
85+ imgNb = copyGraphWindownOutput(opt , subID , ' func2anatCoreg' , imgNb );
86+
8287 end
8388 end
8489
0 commit comments