Conversion of large Tiff image to Dax

Background

  • I would like to convert images that are in tiff format (40 GB) which are stochastic optical reconstruction microscopy images to dax format.
    Analysis goals
  • I would like to perform statistical analysis on the data extracted from the images.
    Challenges
  • Unable to convert file from tiff to dax, I would like to use bioformats but I am unsure if they support the processing of such large images.
  • A script in Matlab but I am getting a memory error although I am using a PC with 64GB RAM.

Bio-Formats would allow you to read the Tiff images but it would not output to the Dax format. Perhaps reusing some of the libraries from storm-analysis/tiffs_to_dax.py at 71ae493cbd17ddb97938d0ae2032d97a0eaa76b2 · ZhuangLab/storm-analysis · GitHub might be useful

Thank you for responding, does Bio-Formats output to nd2 format?

No, the full list of supported formats can be found here: Supported Formats — Bio-Formats 6.6.0 documentation. The formats that can be written to will be marked with a tick in the Export column. Though we would recommend keeping your data in an open format such as OME-TIFF.

I apologise for my naivety, but can Bio-formats be used to split a tiff file into smaller pieces so that it can be easily processed?

Yes, the easiest way to split a file would using the bfconvert command line tool which can be downloaded from Bio-Formats Downloads | Open Microscopy Environment (OME). If you wish to split out either the series, Z planes, channels or timepoints (or any combination of those) then you can use a command such as below. For example using the pattern character %t will split out the timepoints and each file will have the index included in the filename ( %s is the series index, %z is the Z section index, %c is the channel index, and %t is the timepoint index (all indices begin at 0).):

bfconvert /path/to/input.tiff output_series_%s_Z%z_C%c_T%t.tiff

If instead you wish to split a large planed image into tiles, each in a separate file, then you can use the same tool with the below command ( %x is the row index of the tile, %y is the column index of the tile, and %m is the overall tile index):

bfconvert -tilex 512 -tiley 512 /path/to/input.tiff output_tile_%x_%y_%m.tiff

1 Like