Code covered by the BSD License  

Highlights from
GUI for Multivariate Image Analysis of 4-dimensional data

image thumbnail
from GUI for Multivariate Image Analysis of 4-dimensional data by Kateryna Artyushkova
Multivariate Image Analysis of 4-dimensional image sequences using 2-step two-way and three-way ...

[M,mask]=profile_z(images);
function [M,mask]=profile_z(images);

  [a,b,n]=size(images);  
im=images(:,:,round(n/2));
for k=1:10
input=questdlg('Select ROI using mouse', 'selecting ROIs','OK    ', 'cancel','OK    ');
if input=='OK    '
figure(1)
[J,BW] = roifill(uint8(im));
mask(:,:,k)=BW;
roi=BW; 


    [I,J] = find(roi==1); %find indices of all pixels within ROIs
[m,p]=size(I);
[a,b,n]=size(images);
for i=1:n
   for j=1:m
    v(j)=images(I(j),J(j),i);     % creating ROI matrices containing pixels within ROIs
   end
   M(i,k)=mean(mean(v));
end
  m=sum(mask,3);
merged = immerge(images(:,:,6), m, 0.95);
 figure(2)
  set(2, 'Position', [820 203 320 517]);
 subplot(2,1,1)
  imagesc (merged);
  colormap gray
  %truesize
   subplot(2,1,2)
   
 plot(M)
else
    break
    close(1)
end
end


 

Contact us