From cea696c5d997e437426d1eb98e546202a21bdb98 Mon Sep 17 00:00:00 2001 From: scott Date: Thu, 4 May 2017 11:49:51 +0200 Subject: [PATCH] --- svca4_extractRefGui.m | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/svca4_extractRefGui.m b/svca4_extractRefGui.m index 2f03035..b07f482 100644 --- a/svca4_extractRefGui.m +++ b/svca4_extractRefGui.m @@ -179,8 +179,10 @@ function extract_Callback(hObject, eventdata, handles) %---------------------------------------------- for t=1:length(svca4.PET_standardDurations) PET_t=PET(:,:,:,t); - GRAYtac(s,t) = mean(GRAY(indGRAY).*PET_t(indGRAY)); + TEMP = GRAY(indGRAY).*PET_t(indGRAY); + GRAYtac(s,t) = sum(TEMP(:)); end + GRAYtac(s,:) = GRAYtac(s,:)/sum(GRAY(indGRAY)); % add times for saving myGRAY_TAC = [svca4.PET_standardStartTimes svca4.PET_standardEndTimes GRAYtac(s,:)']; @@ -207,13 +209,14 @@ function extract_Callback(hObject, eventdata, handles) fprintf(fid,'%.1f\t%.1f\t%.4f\n', myGRAY_TAC'); fclose(fid); end - - figure; - plot(svca4.PET_standardEndTimes,GRAYtac(s,:)) - figure; - imagesc(squeeze(PET(:,45,:,20))) - figure; - imagesc(squeeze(GRAY(:,45,:))) +%%%%%%%%%%%% testing - can be removed %%%%%%%%%%%%%%% +% figure; +% plot(svca4.PET_standardEndTimes,GRAYtac(s,:)) +% figure; +% imagesc(squeeze(PET(:,45,:,20))) +% figure; +% imagesc(squeeze(GRAY(:,45,:))) +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% calculate a reference TAC but instead of using quantiles just remove half of the randomly selected voxels % don't really need this now and should really double check the code! % indGRAY = find(GRAY~=0);