Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
scott committed May 4, 2017
1 parent bbf57f9 commit cea696c
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions svca4_extractRefGui.m
Original file line number Diff line number Diff line change
Expand Up @@ -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,:)'];
Expand All @@ -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);
Expand Down

0 comments on commit cea696c

Please sign in to comment.