Siff-to-Tiff functions
You might be using a ScanImage-FLIM microscope, but only want to use regular
intensity imaging tools and analyses. SiffPy supports most of what you likely
want to do, or returns a numpy array that you can just pipe in to some other pathway
or analysis code, but some tools just want a plain .tiff. SiffPy provides a few
simple functions to convert to .tiff. For now, it only implements the ScanImage
.tiff specification (which is not OME compliant!!), but soon I will add OME-TIFF
support as a keyword argument.
I will also (soon) implement a command line tool to call the siff_to_tiff Rust code
directly. Not yet though!
SiffPy hosts a wrapper function for the siffreadermodule function (described below)
which can be called easily
from siffpy import siff_to_tiff
my_input_path = "somewhere_like_here"
my_target_path = "this_place_looks_good/a_cool_directory"
siff_to_tiff(my_target_path, target_file = my_target_path)
- siffpy.siff_to_tiff(source_file: StrLike, target_file: 'StrLike' | None = None, mode: str = 'ScanImage') None
Converts a .siff file to a .tiff file containing only intensity information. For siffcompressed data, this should be smaller (because it just discards arrival times). For siff data that’s not too big, this will likely create a larger file.
## Arguments
- source_filestr or str-like
Path to a .siff file. Will immediately be converted to str
- target_fileOptional[str-like]
Path to where the .tiff should be saved. If None, saves to the same directory as the source file, with the same name but with the extension changed to .tiff. Otherwise immediately converted to str
- modestr
Can be ScanImage or (in progress) ome. ScanImage is the default. This is not OME-compliant, so ImageJ/Fiji (for example) will just parse it as a flattened image series. When ome is implemented, that mode will be readable by most bio image viewers.
Warning: the function below is autodocumented using the DOCSTRING attached to the
siffreadermodule’s siff_to_tiff function, which may be out of date from the
current implementation. The more reliable documentation is in the siff_to_tiff
function’s stub file in siffreadermodule/__init__.pyi.
- corrosiffpy.siff_to_tiff(sourcepath, savepath=None, mode='ScanImage')
Converts a .siff file to a .tiff file using the corrosiff library.