help > Valid Contrast - error moving contrast Images
Showing 1-4 of 4 posts
Display:
Results per page:
Feb 8, 2023  12:02 PM | Becky Yang - Peking University
Valid Contrast - error moving contrast Images
Hi all, 
I was using PPPIv13.1 on a repeated measurements designing data, and it seems to have something wrong with the contrast manager. 

---------------------------------------------
here is the log :
--------------------
PPPI Version: 13.1.4-17-2014

Parameters used:
Processing subject: sub22
VOI file : F:\BJ_2021\GLM512_L1\sub22\VOI_LSTG21_mask.nii
Output file will be: sub22_LSTG21_session#_cond_PPI_regressors.txt
Contrast : No adjustment
Analysis : Psychophysiological Interactions
Extraction : eigenvariate
Tasks : _1_0ms_8ms_16ms_64ms_M
Method : Condition Specific
VOI has 81 voxels in 2x2x2 space
VOI has 81 voxels in 2x2x2 space. This is in the the same space as the input data and functional mask.
Valid Contrast
Valid Contrast
Valid Contrast
Valid Contrast
Valid Contrast
Valid Contrast
Valid Contrast
Valid Contrast
Valid Contrast
Valid Contrast
contrast image 21 : ...written con_0021.nii
spm{T} image 21 : ...written spmT_0021.nii
contrast image 22 : ...written con_0022.nii
spm{T} image 22 : ...written spmT_0022.nii
contrast image 23 : ...written con_0023.nii
spm{T} image 23 : ...written spmT_0023.nii
contrast image 24 : ...written con_0024.nii
spm{T} image 24 : ...written spmT_0024.nii
contrast image 25 : ...written con_0025.nii
spm{T} image 25 : ...written spmT_0025.nii
contrast image 26 : ...written con_0026.nii
spm{T} image 26 : ...written spmT_0026.nii
contrast image 27 : ...written con_0027.nii
spm{T} image 27 : ...written spmT_0027.nii
contrast image 28 : ...written con_0028.nii
spm{T} image 28 : ...written spmT_0028.nii
contrast image 29 : ...written con_0029.nii
spm{T} image 29 : ...written spmT_0029.nii
contrast image 30 : ...written con_0030.nii
spm{T} image 30 : ...written spmT_0030.nii
Saving SPM.mat : ...SPM.mat saved
Moving Contrast Images
error moving contrast PPI_0_minus_8
error moving contrast PPI_0_minus_8
Moving Contrast Images
error moving contrast PPI_0_minus_16
error moving contrast PPI_0_minus_16
Moving Contrast Images
error moving contrast PPI_0_minus_64
error moving contrast PPI_0_minus_64
Moving Contrast Images
error moving contrast PPI_0_minus_M
error moving contrast PPI_0_minus_M
Moving Contrast Images
error moving contrast PPI_8_minus_16
error moving contrast PPI_8_minus_16
Moving Contrast Images
error moving contrast PPI_8_minus_64
error moving contrast PPI_8_minus_64
Moving Contrast Images
error moving contrast PPI_8_minus_M
error moving contrast PPI_8_minus_M
Moving Contrast Images
error moving contrast PPI_16_minus_64
error moving contrast PPI_16_minus_64
Moving Contrast Images
error moving contrast PPI_16_minus_M
error moving contrast PPI_16_minus_M
Moving Contrast Images
error moving contrast PPI_64_minus_M
error moving contrast PPI_64_minus_M
ans =
struct:
swd: 'F:\BJ_2021\GLM512_L1\sub22\PPI_LSTG21'
xBF: [1×1 struct]
xY: [1×1 struct]
nscan: 192
SPMid: 'SPM12: spm_spm (v7120)'
xVi: [1×1 struct]
xGX: [1×1 struct]
xX: [1×1 struct]
Sess: [1×1 struct]
xM: [1×1 struct]
xVol: [1×1 struct]
Vbeta: [1×21 struct]
VResMS: [1×1 struct]
VM: [1×1 struct]
xCon: [1×30 struct]

---------------------------------------------------
Has anyone ever caught these problems?


-------------------------------------------------
here's my code:
-------------------------------------------------

P.subject = sprintf('sub%02d',sub);
P.directory= dir;

P.VOI=[pwd filesep 'VOI_LSMG40_mask.nii'];
P.Region='LSMG40';
P.Estimate=1;
P.contrast=0;
P.extract='eig';
P.Tasks={ '1' '0ms' '8ms' '16ms' '64ms' 'M'};
P.Weights=[];
P.analysis='psy';
P.method='cond';
P.CompContrasts=1;
P.Weighted=0;
P.ConcatR=0;
P.preservevarcorr=0;
P.Contrasts(1).left={'0ms'};
P.Contrasts(1).right={'8ms'};
P.Contrasts(1).STAT='T';
P.Contrasts(1).Weighted=0;
P.Contrasts(1).MinEvents=5;
P.Contrasts(1).name='0_minus_8';
P.Contrasts(2).left={'0ms'};
P.Contrasts(2).right={'16ms'};
P.Contrasts(2).STAT='T';
P.Contrasts(2).Weighted=0;
P.Contrasts(2).MinEvents=5;
P.Contrasts(2).name='0_minus_16';
P.Contrasts(3).left={'0ms'};
P.Contrasts(3).right={'64ms'};
P.Contrasts(3).STAT='T';
P.Contrasts(3).Weighted=0;
P.Contrasts(3).MinEvents=5;
P.Contrasts(3).name='0_minus_64';
P.Contrasts(4).left={'0ms'};
P.Contrasts(4).right={'M'};
P.Contrasts(4).STAT='T';
P.Contrasts(4).Weighted=0;
P.Contrasts(4).MinEvents=5;
P.Contrasts(4).name='0_minus_M';
P.Contrasts(5).left={'8ms'};
P.Contrasts(5).right={'16ms'};
P.Contrasts(5).STAT='T';
P.Contrasts(5).Weighted=0;
P.Contrasts(5).MinEvents=5;
P.Contrasts(5).name='8_minus_16';
P.Contrasts(6).left={'8ms'};
P.Contrasts(6).right={'64ms'};
P.Contrasts(6).STAT='T';
P.Contrasts(6).Weighted=0;
P.Contrasts(6).MinEvents=5;
P.Contrasts(6).name='8_minus_64';
P.Contrasts(7).left={'8ms'};
P.Contrasts(7).right={'M'};
P.Contrasts(7).STAT='T';
P.Contrasts(7).Weighted=0;
P.Contrasts(7).MinEvents=5;
P.Contrasts(7).name='8_minus_M';
P.Contrasts(8).left={'16ms'};
P.Contrasts(8).right={'64ms'};
P.Contrasts(8).STAT='T';
P.Contrasts(8).Weighted=0;
P.Contrasts(8).MinEvents=5;
P.Contrasts(8).name='16_minus_64';
P.Contrasts(9).left={'16ms'};
P.Contrasts(9).right={'M'};
P.Contrasts(9).STAT='T';
P.Contrasts(9).Weighted=0;
P.Contrasts(9).MinEvents=5;
P.Contrasts(9).name='16_minus_M';
P.Contrasts(10).left={'64ms'};
P.Contrasts(10).right={'M'};
P.Contrasts(10).STAT='T';
P.Contrasts(10).Weighted=0;
P.Contrasts(10).MinEvents=5;
P.Contrasts(10).name='64_minus_M';
PPPI(P)
save([ 'LSMG40' '.mat'],'P');

PPPI(P)

---------------------------------------------

PS:
Is this version of gPPI possibly have some code conflict with spm12 or xjview (an image viewer tool based spm toolbox)?
Here are several lines of the batch: PPPI.m , (it seems to be fixed after I commented out these lines),I don't know if there's a better version that could goes with spm12. 
-------------------------
% if ~strcmp(spm('Ver'),'SPM8')
% disp('PROGRAM ABORTED:')
% disp(' You must use SPM8 to process your data; however, you can use SPM.mat files')
% disp(' generated with SPM2 or SPM5. In these cases, simply specify the option SPMver')
% disp(' in single qoutes followed by a comma and the version number.')
% disp(' ')
% disp('Make sure to add SPM8 to your MATLAB path before re-running.')
% return
% end 

--------------------------------------------------


Best,
Becky 
Feb 8, 2023  12:02 PM | Becky Yang - Peking University
RE: Valid Contrast - error moving contrast Images
sorry I just saw the last same question with me and I am trying to use the new version of PPI contrast ,Thanks!


but still some wired about this version warning:
-------------------------------------

% if ~strcmp(spm('Ver'),'SPM8')
% disp('PROGRAM ABORTED:')
% disp(' You must use SPM8 to process your data; however, you can use SPM.mat files')
% disp(' generated with SPM2 or SPM5. In these cases, simply specify the option SPMver')
% disp(' in single qoutes followed by a comma and the version number.')
% disp(' ')
% disp('Make sure to add SPM8 to your MATLAB path before re-running.')
% return
% end

Best,
Becky
Feb 8, 2023  01:02 PM | Julius Steding - TU Dresden
RE: Valid Contrast - error moving contrast Images
Hi Becky,
if I understand your issue correctly, this should solve your problem:
Resolve the first line to

> if ~strcmp(spm('Ver'),'SPM8') && ~strncmpi(spm('Ver'),'SPM12',5)


see this message: https://www.nitrc.org/forum/message.php?...


Best, Julius

Originally posted by Becky Yang:
sorry I just saw the last same question with me and I am trying to use the new version of PPI contrast ,Thanks!


but still some wired about this version warning:
-------------------------------------

% if ~strcmp(spm('Ver'),'SPM8')
% disp('PROGRAM ABORTED:')
% disp(' You must use SPM8 to process your data; however, you can use SPM.mat files')
% disp(' generated with SPM2 or SPM5. In these cases, simply specify the option SPMver')
% disp(' in single qoutes followed by a comma and the version number.')
% disp(' ')
% disp('Make sure to add SPM8 to your MATLAB path before re-running.')
% return
% end

Best,
Becky
Feb 8, 2023  06:02 PM | Becky Yang - Peking University
RE: Valid Contrast - error moving contrast Images
Hi Julius,

It works! I solved this issue after replacing the code.  

Many thanks for your help!

Best, 
Becky