Skip to content

Instantly share code, notes, and snippets.

View Czaki's full-sized avatar

Grzegorz Bokota Czaki

View GitHub Profile
@Czaki
Czaki / saveimage_tiff.py
Created October 1, 2022 16:09
How to save imagej tiff using tiffile with resolution
import typing
import numpy as np
import tifffile
def save_imagej_tiff(save_path: str, data: np.ndarray, scale: tuple[float, ...], units: str, com):
"""Save image as tiff to path or buffer
:param scale: image scale
:param data: image for save
:param units: units of image