Thanks Sebastien, - it is still in "fast" category
>> if exist('dummy.ome.tiff','file'), delete('dummy.ome.tiff');end
>> I = zeros(1191,2559,1,1,5,'uint16');
>> tic;bfsave(I,'dummy.ome.tiff');toc
Elapsed time is 2.663927 seconds.
This is 0.5328s per frame.
However, for a "single" frame, it is 0.274s - roughly twice faster.
Here is the dependence on number of frames for bfsave (albeit in acquisition, we don't create memory block)
1 - 0.274s
5 - 0.5328
20 - 0.5801
40 - 0.6009
162 - 0.5954 (our data size)
this code
- Code: Select all
acc = zeros(1,nPlanes);
for index = 1 : nPlanes
I = imread([folder filesep file_names{index}],extension);
t0 = tic;
writer.saveBytes(index-1, getBytes(I));
telapsed = toc(t0);
acc(index)=telapsed;
end
writer.close();
speed = mean(acc);
gives 5.74s per frame.
again, similar function where writer made "global", gives 11.1s p.f.
Mystery persists..
Best,
Y.