Converting large Raw file to tiff

Hello,

I am trying to work with the following data set
http://cdn.klacansky.com/open-scivis-datasets/pig_heart/pig_heart_2048x2048x2612_int16.raw

I would like to convert it to tiff stack. Unfortunately, the file is too large to open on many of the available software (paraview, fiji) and export it to a different format.
Any thoughts? Any ideas on how to convert it to tiff stack (interactive or batch solutions)?

Thank you.

Using Python and tifffile, e.g.:

import numpy
import tifffile

data = numpy.memmap(
    'pig_heart_2048x2048x2612_int16.raw',
    dtype='int16',
    shape=(2612, 2048, 2048),
    mode='r',
)

tifffile.imwrite(
    'pig_heart_2048x2048x2612_int16.ome.tif',
    data,
    metadata={'axes': 'ZYX'}
)
1 Like