{"id":28815334,"url":"https://github.com/cgohlke/liffile","last_synced_at":"2026-04-12T01:16:25.640Z","repository":{"id":274232744,"uuid":"920928447","full_name":"cgohlke/liffile","owner":"cgohlke","description":"Read Leica image files (LIF, LOF, XLIF, XLCF, XLEF, and LIFEXT).","archived":false,"fork":false,"pushed_at":"2026-02-17T01:00:39.000Z","size":148,"stargazers_count":9,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-08T21:39:54.141Z","etag":null,"topics":["flim","fluorescence-lifetime-spectroscopy","fluorescence-microscopy-imaging","format-reader","image","leica","life-sciences-image","python"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/liffile/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cgohlke.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-01-23T02:45:58.000Z","updated_at":"2026-02-17T01:00:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"ab195b01-0454-4fed-82d4-074238a533b6","html_url":"https://github.com/cgohlke/liffile","commit_stats":null,"previous_names":["cgohlke/liffile"],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/cgohlke/liffile","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgohlke%2Fliffile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgohlke%2Fliffile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgohlke%2Fliffile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgohlke%2Fliffile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cgohlke","download_url":"https://codeload.github.com/cgohlke/liffile/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgohlke%2Fliffile/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31700994,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-11T21:17:31.016Z","status":"ssl_error","status_checked_at":"2026-04-11T21:17:24.556Z","response_time":54,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flim","fluorescence-lifetime-spectroscopy","fluorescence-microscopy-imaging","format-reader","image","leica","life-sciences-image","python"],"created_at":"2025-06-18T16:07:25.747Z","updated_at":"2026-04-12T01:16:25.633Z","avatar_url":"https://github.com/cgohlke.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"..\n  This file is generated by setup.py\n\nRead Leica image files (LIF, LOF, XLIF, XLCF, XLEF, and LIFEXT)\n===============================================================\n\nLiffile is a Python library to read image and metadata from Leica image files:\nLIF (Leica Image File), LOF (Leica Object File), XLIF (XML Image File),\nXLCF (XML Collection File), XLEF (XML Experiment File), and LIFEXT (Leica\nImage File Extension). These files are written by LAS X software to store\ncollections of images and metadata from microscopy experiments.\n\n:Author: `Christoph Gohlke \u003chttps://www.cgohlke.com\u003e`_\n:License: BSD-3-Clause\n:Version: 2026.4.11\n:DOI: `10.5281/zenodo.14740657 \u003chttps://doi.org/10.5281/zenodo.14740657\u003e`_\n\nQuickstart\n----------\n\nInstall the liffile package and all dependencies from the\n`Python Package Index \u003chttps://pypi.org/project/liffile/\u003e`_::\n\n    python -m pip install -U liffile[all]\n\nSee `Examples`_ for using the programming interface.\n\nSource code and support are available on\n`GitHub \u003chttps://github.com/cgohlke/liffile\u003e`_.\n\nRequirements\n------------\n\nThis revision was tested with the following requirements and dependencies\n(other versions may work):\n\n- `CPython \u003chttps://www.python.org\u003e`_ 3.12.10, 3.13.13, 3.14.4 64-bit\n- `NumPy \u003chttps://pypi.org/project/numpy\u003e`_ 2.4.4\n- `Imagecodecs \u003chttps://pypi.org/project/imagecodecs\u003e`_ 2026.3.6\n  (required for decoding TIFF, JPEG, PNG, and BMP)\n- `Tifffile \u003chttps://pypi.org/project/tifffile/\u003e`_ 2026.3.3\n  (required for reading multi-page TIFF)\n- `Xarray \u003chttps://pypi.org/project/xarray\u003e`_ 2026.2.0 (recommended)\n- `Matplotlib \u003chttps://pypi.org/project/matplotlib/\u003e`_ 3.10.8 (optional)\n\nRevisions\n---------\n\n2026.4.11\n\n- Add channel name resolution to LifImage via coords['C'] and coords['S'].\n- Drop support for Python 3.11.\n\n2026.2.16\n\n- Change timestamps to None if not present (breaking).\n- Fix inefficient timestamp parsing.\n- Fix inefficient LifFile.close().\n- Add tilescan property to LifImage.\n\n2026.2.15\n\n- Add experimental frame-based interface to LifImage.\n- Fix code review issues.\n\n2026.1.22\n\n- Fix reading sequence of LifMemoryBlocks.\n- Change unknown axis code to '?'.\n\n2026.1.14\n\n- Improve code quality.\n\n2025.12.12\n\n- Remove deprecated LifFile.series and xml_element_smd properties (breaking).\n- Improve code quality.\n\n2025.11.8\n\n- Add option to find other LifImageSeries attributes than path.\n- Return UniqueID in LifImage.attrs.\n- Factor out BinaryFile base class.\n\n2025.9.28\n\n- Derive LifFileError from ValueError.\n- Minor fixes.\n- Drop support for Python 3.10.\n\n2025.5.10\n\n- Support Python 3.14.\n\n2025.4.12\n\n- Improve case_sensitive_path function.\n\n2025.3.8\n\n- Support LOF files without LMSDataContainerHeader XML element.\n\n2025.3.6\n\n- Support stride-aligned RGB images.\n\n2025.2.20\n\n- …\n\nRefer to the CHANGES file for older revisions.\n\nNotes\n-----\n\nThe API is not stable yet and might change between revisions.\n\n`Leica Microsystems GmbH \u003chttps://www.leica.com/\u003e`_ is a manufacturer of\nmicroscopes and scientific instruments.\nLeica image files are proprietary formats written by Leica acquisition\nsoftware such as LAS X and LAS AF to store microscopy images and metadata.\n\nThe Leica Image File (LIF) begins with a magic number followed by a UTF-16\nXML header that describes images and metadata, then stores the raw pixel data\nfor each image in contiguous data blocks.\nImages may be multi-dimensional (X, Y, Z, T, C, ...) with multiple channels,\nand a single file can contain many independent image series.\nRelated formats include LOF (single-object variant), XLIF, XLEF, and XLCF\n(XML-based containers), XLLF (folder-view), and LIFEXT (optional image data\nextensions).\n\nThis library is not feature-complete. Unsupported features currently include\nXLLF, image mosaics and pyramids, bit increments, and non-image data such as\nraw FLIM/TCSPC histogram data.\n\nThe library has been tested with only a limited number of version 2 files.\n\nThe Leica image file formats are documented in:\n\n- Leica Image File Formats - LIF, XLEF, XLLF, LOF. Version 3.2.\n  Leica Microsystems GmbH. 21 September 2016.\n- Annotations to Leica Image File Formats for LAS X Version 3.x. Version 1.4.\n  Leica Microsystems GmbH. 24 August 2016.\n- TSC SP8 FALCON File Format Description. LAS X Version 3.5.0.\n\nOther implementations for reading Leica image files are\n`readlif \u003chttps://github.com/Arcadia-Science/readlif\u003e`_ and\n`Bio-Formats \u003chttps://github.com/ome/bioformats\u003e`_.\n\nExamples\n--------\n\nRead a FLIM lifetime image and metadata from a LIF file:\n\n.. code-block:: python\n\n    \u003e\u003e\u003e with LifFile('tests/data/FLIM.lif') as lif:\n    ...     for image in lif.images:\n    ...         _ = image.name\n    ...     image = lif.images['Fast Flim']  # by name\n    ...     assert image.dtype == 'float16'\n    ...     assert image.sizes == {'Y': 1024, 'X': 1024}\n    ...     lifetimes = image.asxarray()\n    ...\n    \u003e\u003e\u003e lifetimes\n    \u003cxarray.DataArray 'Fast Flim' (Y: 1024, X: 1024)\u003e Size: 2MB\n    array([[...]],\n          shape=(1024, 1024), dtype=float16)\n    Coordinates:\n      * Y        (Y) float64... 0.0005564\n      * X        (X) float64... 0.0005564\n    Attributes...\n        path:           FLIM_testdata.lif/sample1_slice1/FLIM Compressed/Fast Flim\n        UniqueID:       694efd02-95a9-436e-0fa6-f146120b1e15\n        F16:            {'Name': 'F16',...\n        TileScanInfo:   {'Tile': {'FieldX': 0,...\n        ViewerScaling:  {'ChannelScalingInfo': {...\n\nIterate over selected XLEF image frames in ZTM dimension order:\n\n.. code-block:: python\n\n    \u003e\u003e\u003e with LifFile('tests/data/XYZCST/XYZCST.xlef') as lif:\n    ...     image = lif.images[0]  # by index\n    ...     image.sizes\n    ...     frames = image.frames(C=1, Z=slice(1, 3), T=[1, 0], M=None)\n    ...     frames.sizes\n    ...     for index, frame in frames.items():\n    ...         index, frame.shape\n    ...\n    {'T': 2, 'M': 4, 'C': 3, 'Z': 5, 'Y': 1200, 'X': 1600}\n    {'Z': 2, 'T': 2, 'M': 4, 'Y': 1200, 'X': 1600}\n    ((0, 0, 0), (1200, 1600))\n    ((0, 0, 1), (1200, 1600))\n    ...\n    ((1, 1, 2), (1200, 1600))\n    ((1, 1, 3), (1200, 1600))\n\nView image and metadata in a LIF file from the console::\n\n    $ python -m liffile tests/data/FLIM.lif\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcgohlke%2Fliffile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcgohlke%2Fliffile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcgohlke%2Fliffile/lists"}