unravel.image_io.h5_to_tifs module#

Use io_h5_to_tifs from UNRAVEL to load a h5/hdf5 image and save it as tifs.

Inputs:
  • image.h5 either from -i path/image.h5 or largest *.h5 in cwd

  • This assumes that the first dataset in the hdf5 file has the highest resolution.

Outputs:
  • ./<tif_dir_out>/slice_`*`.tif series

  • ./parameters/metadata (text file)

Usage:#

io_h5_to_tifs -i path/image.h5 -t autofl [-v]

unravel.image_io.h5_to_tifs.parse_args()[source]#
unravel.image_io.h5_to_tifs.find_largest_h5_file()[source]#

Find and return the path to the largest .h5 file in the current directory

unravel.image_io.h5_to_tifs.load_h5(hdf5_path, desired_axis_order='xyz', return_res=False)[source]#

Load full res image from an HDF5 file (.h5) and return ndarray Default: axis_order=xyz (other option: axis_order=”zyx”) Default: returns: ndarray If return_res=True returns: ndarray, xy_res, z_res (resolution in um)

unravel.image_io.h5_to_tifs.metadata_from_h5(hdf5_path)[source]#

Returns tuple with xy_voxel_size and z_voxel_size in microns from full res HDF5 image

unravel.image_io.h5_to_tifs.save_as_tifs(ndarray, tif_dir_out, ndarray_axis_order='xyz')[source]#

Save <ndarray> as tifs in <Path(tif_dir_out)>

unravel.image_io.h5_to_tifs.main()[source]#