matlab: how to save TIFF series?
The parameter 'append' seems to correspond to what you want.
outputFileName = 'img_stack.tif'
for K=1:length(img(1, 1, :))
imwrite(img(:, :, K), outputFileName, 'WriteMode', 'append');
end
EDIT: IMAGEJ has problems when opening multipletiffs saved like that. 'Compression','none' is solving the problem :) use:
imwrite(img(:, :, K), outputFileName, 'WriteMode', 'append', 'Compression','none');