3e3f30a2
David Mayerich
added a matlab fu...
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
function S = stimImageStack(filemask)
files = dir(filemask);
%figure out the file size
I = imread([files(1).folder '/' files(1).name]);
X = size(I, 1);
Y = size(I, 2);
Z = length(files);
S = zeros(X, Y, Z, 'uint8');
h = waitbar(0, ['Loading ' num2str(Z) ' images...']);
for i = 1:Z
I = rgb2gray(imread([files(1).folder '/' files(1).name]));
S(:, :, i) = I;
waitbar(i/Z, h);
end
close(h);
end
|