I have python code doing in principle:
import tifffile
data = np.empty((l, m, n), dtype=np.float32)
tifffile.imsave(file_name, data, imagej=True)
which produces a tiff-file in a format that works further down the line. However this can be quite memory intensive. Therefore I want to write something like:
writer = tifffile.TiffWriter(file_name, imagej=True)
for page in data:
writer.write(page)
This produces a tiff-file too, but the format is different than in the example above.
I believe tifffile.imsave
is just a wrapper for tifffile.TiffWriter.write
. What options do I need to use to reproduce the same result with TiffWriter
that I get with imsave