Skip to content
Permalink
Browse files

Merge pull request #198 from tiborauer/master

Specific debugs and update local settings
  • Loading branch information...
jpeelle committed Jul 9, 2019
2 parents e90bde7 + e0c68c4 commit ccfb72e4996b3b906738983c459d6132fc9dbb2c
@@ -96,8 +96,14 @@
end
elseif all(isfield(DICOMHEADERS{1},{'Private_0019_10bb' 'Private_0019_10bc' 'Private_0019_10bd'})) % GE
isb = cellfun(@(x) isfield(x,'DiffusionBValue'), DICOMHEADERS);
bvals(1:numel(DICOMHEADERS)) = DICOMHEADERS{find(isb,1,'first')}.DiffusionBValue;
bvals(~isb) = 0;
if any(isb)
bvals(1:numel(DICOMHEADERS)) = DICOMHEADERS{find(isb,1,'first')}.DiffusionBValue;
bvals(~isb) = 0;
elseif isfield(DICOMHEADERS{1},'Private_0043_1039') % Signa Excite 12.0 or later
bvals = cellfun(@(x) x.Private_0043_1039(1), DICOMHEADERS);
else
aas_log(aap,true,'No field for b-value found!')
end

bvecs = cell2mat(cellfun(@(x) [x.Private_0019_10bb; x.Private_0019_10bc; x.Private_0019_10bd], DICOMHEADERS,'UniformOutput', false))';

@@ -11,17 +11,9 @@
resp='';

switch task
case 'domain'
resp='session'; % this module needs to be run once per session
case 'description'
resp='Run list spikes';
case 'summary'
resp='List spikes\n';
case 'report'
dirn = aas_getsesspath(aap,i,j);
spfn = fullfile(dirn,'spikesandmoves.mat');
load(spfn);
aap.report.html=strcat(aap.report.html,sprintf('Spikes %d Moves %d<br>',size(spikes,1),size(moves,1)));
spl = load(aas_getfiles_bystream(aap,subj,sess,'listspikes'));
aap.report.html=strcat(aap.report.html,sprintf('Spikes %d Moves %d<br>',size(spl.TSspikes,1),size(spl.Mspikes,1)));
case 'doit'

subjname = aas_prepare_diagnostic(aap,subj);
@@ -34,16 +26,16 @@
% spm_realign.

% Load the movement parameters
rp = aas_getfiles_bystream(aap,subj,sess,'realignment_parameter'); % aas_movPars(aap,subj, [1 0 0; 0 0 0]);
rp = spm_load(rp);
Mfn = cellstr(aas_getfiles_bystream(aap,subj,sess,'realignment_parameter')); % aas_movPars(aap,subj, [1 0 0; 0 0 0]);
rp = spm_load(Mfn{strcmp(spm_file(Mfn, 'ext'),'txt')});
nsess = length(aap.acq_details.sessions);


% Load up differnces through time as produced by tsdiffana
tdfn = aas_getimages_bystream(aap,subj,sess,'tsdiffana');

try
load (tdfn, 'td', 'globals', 'slicediff');
qa = load (tdfn);
catch
aas_log(aap,1,sprintf('%s not found: Please run tsdiffana first',tdfn));
end
@@ -52,10 +44,10 @@
rotlimit_radians=aap.tasklist.currenttask.settings.rotlimit_degrees*pi/180;

%% Now find big changes from one image to the next
% td = mean (across voxels) of square difference between one volume and the next
% globals = mean global value across an image
% qa.qa.global.diff = mean (across voxels) of square difference between one volume and the next
% qa.qa.global.mean = mean global value across an image

tm = td/(mean(globals).^2); % RC/KM added .^2 16/6/2008
tm = qa.qa.global.diff/(mean(qa.qa.global.mean).^2); % RC/KM added .^2 16/6/2008

switch aap.tasklist.currenttask.settings.tmbaseline
case 'zero'
@@ -85,7 +77,7 @@

badimages=[false; (Rtm > tmlimit)];

TSspikes=[find(badimages),tm(badimages(2:end)),slicediff(badimages(2:end))];
TSspikes=[find(badimages),tm(badimages(2:end)),qa.qa.slice.diff(badimages(2:end))];

%% Now find big movements
% shift to sync with scan number
@@ -21,10 +21,10 @@
<protocol_structural ui='text'>t1_mpr</protocol_structural>
<protocol_t2 ui='text'>t2_spc</protocol_t2>
<dicomfilter ui='text'>*.IMA</dicomfilter>
<spmdir desc="Path(s) to SPM (>SPM12 r6470 required)" ui="dir">/usr/local/apps/psycapps/spm/spm12-r7219</spmdir>
<spmdir desc="Path(s) to SPM (>SPM12 r6470 required)" ui="dir">/usr/local/apps/psycapps/spm/spm12-r7487</spmdir>
<spmtoolsdir desc='Path(s) to SPM tools (colon separated list)' ui='dir'>/usr/local/apps/psycapps/CoSMoMVPA/CoSMoMVPA-1.1.0/mvpa</spmtoolsdir>
<linuxshell desc='Linux shell used to run linux commands' ui='text'>bash</linuxshell>
<fsldir desc='Path to fsl' ui='dir'>/usr/local/apps/psycapps/fsl/fsl-5.0.10</fsldir>
<fsldir desc='Path to fsl' ui='dir'>/usr/local/apps/psycapps/fsl/fsl-6.0.1</fsldir>
<fslsetup desc='Path to fsl setup script, executing before any fsl command' ui='text'>/usr/local/apps/psycapps/config/fsl_bash 5.0.10</fslsetup>
<fslshell desc='Shell used to run FSL' ui='text'>bash</fslshell>
<fsloutputtype desc='Output type used by FSL' ui='text'>NIFTI</fsloutputtype>
@@ -27,7 +27,7 @@
<spmtoolsdir desc='Path(s) to SPM tools (colon separated list)' ui='dir'></spmtoolsdir>
<linuxshell desc='Linux shell used to run linux commands' ui='text'>bash</linuxshell>
<fsldir desc='Path to fsl' ui='dir'>/gpfs/software/fsl/5.0.10</fsldir>
<fslsetup desc='Path to fsl setup script, executing before any fsl command' ui='text'></fslsetup>
<fslsetup desc='Path to fsl setup script, executing before any fsl command' ui='text'>/gpfs/home/ryb17eeu/imaging_pipelines/bin/fsl_bash</fslsetup>
<fslshell desc='Shell used to run FSL' ui='text'>bash</fslshell>
<fsloutputtype desc='Output type used by FSL' ui='text'>NIFTI</fsloutputtype>
<freesurferdir desc='Path to freesurfer' ui='dir'>/gpfs/software/freesurfer/6.0</freesurferdir>

0 comments on commit ccfb72e

Please sign in to comment.
You can’t perform that action at this time.