Image Reading, Metadata Conversion, and Image Writing for Microscopy Images in Python

Overview

AICSImageIO

Build Status Documentation Code Coverage DOI

Image Reading, Metadata Conversion, and Image Writing for Microscopy Images in Pure Python


Features

  • Supports reading metadata and imaging data for:

    • OME-TIFF
    • TIFF
    • CZI -- (pip install aicsimageio[czi])
    • LIF -- (pip install readlif>=0.6.4)
    • ND2 -- (pip install aicsimageio[nd2])
    • DV -- (pip install aicsimageio[dv])
    • PNG, GIF, etc. -- (pip install aicsimageio[base-imageio])
    • Files supported by Bio-Formats -- (pip install aicsimageio bioformats_jar)
  • Supports writing metadata and imaging data for:

    • OME-TIFF
    • PNG, GIF, etc. -- (pip install aicsimageio[base-imageio])
  • Supports reading and writing to fsspec supported file systems wherever possible:

    • Local paths (i.e. my-file.png)
    • HTTP URLs (i.e. https://my-domain.com/my-file.png)
    • s3fs (i.e. s3://my-bucket/my-file.png)
    • gcsfs (i.e. gcs://my-bucket/my-file.png)

    See Cloud IO Support for more details.

Installation

Stable Release: pip install aicsimageio
Development Head: pip install git+https://github.com/AllenCellModeling/aicsimageio.git

AICSImageIO is supported on Windows, Mac, and Ubuntu. For other platforms, you will likely need to build from source.

Extra Format Installation

TIFF and OME-TIFF reading and writing is always available after installing aicsimageio, but extra supported formats can be optionally installed using [...] syntax.

  • For a single additional supported format (e.g. CZI): pip install aicsimageio[czi]
  • For a single additional supported format (e.g. CZI), development head: pip install "aicsimageio[czi] @ git+https://github.com/AllenCellModeling/aicsimageio.git"
  • For a single additional supported format (e.g. CZI), specific tag (e.g. v4.0.0.dev6): pip install "aicsimageio[czi] @ git+https://github.com/AllenCellModeling/[email protected]"
  • For multiple additional supported formats: pip install aicsimageio[base-imageio,czi]
  • For all additional supported formats: pip install aicsimageio[all]
  • Due to the GPL license, LIF support is not included with the [all] extra, and must be installed manually with pip install aicsimageio readlif>=0.6.4
  • Due to the GPL license, Bio-Formats support is not included with the [all] extra, and must be installed manually with pip install aicsimageio bioformats_jar

Documentation

For full package documentation please visit allencellmodeling.github.io/aicsimageio.

Quickstart

Full Image Reading

If your image fits in memory:

from aicsimageio import AICSImage

# Get an AICSImage object
img = AICSImage("my_file.tiff")  # selects the first scene found
img.data  # returns 5D TCZYX numpy array
img.xarray_data  # returns 5D TCZYX xarray data array backed by numpy
img.dims  # returns a Dimensions object
img.dims.order  # returns string "TCZYX"
img.dims.X  # returns size of X dimension
img.shape  # returns tuple of dimension sizes in TCZYX order
img.get_image_data("CZYX", T=0)  # returns 4D CZYX numpy array

# Get the id of the current operating scene
img.current_scene

# Get a list valid scene ids
img.scenes

# Change scene using name
img.set_scene("Image:1")
# Or by scene index
img.set_scene(1)

# Use the same operations on a different scene
# ...

Full Image Reading Notes

The .data and .xarray_data properties will load the whole scene into memory. The .get_image_data function will load the whole scene into memory and then retrieve the specified chunk.

Delayed Image Reading

If your image doesn't fit in memory:

from aicsimageio import AICSImage

# Get an AICSImage object
img = AICSImage("my_file.tiff")  # selects the first scene found
img.dask_data  # returns 5D TCZYX dask array
img.xarray_dask_data  # returns 5D TCZYX xarray data array backed by dask array
img.dims  # returns a Dimensions object
img.dims.order  # returns string "TCZYX"
img.dims.X  # returns size of X dimension
img.shape  # returns tuple of dimension sizes in TCZYX order

# Pull only a specific chunk in-memory
lazy_t0 = img.get_image_dask_data("CZYX", T=0)  # returns out-of-memory 4D dask array
t0 = lazy_t0.compute()  # returns in-memory 4D numpy array

# Get the id of the current operating scene
img.current_scene

# Get a list valid scene ids
img.scenes

# Change scene using name
img.set_scene("Image:1")
# Or by scene index
img.set_scene(1)

# Use the same operations on a different scene
# ...

Delayed Image Reading Notes

The .dask_data and .xarray_dask_data properties and the .get_image_dask_data function will not load any piece of the imaging data into memory until you specifically call .compute on the returned Dask array. In doing so, you will only then load the selected chunk in-memory.

Mosaic Image Reading

Read stitched data or single tiles as a dimension.

Readers that support mosaic tile stitching:

  • LifReader
  • CziReader

AICSImage

If the file format reader supports stitching mosaic tiles together, the AICSImage object will default to stitching the tiles back together.

img = AICSImage("very-large-mosaic.lif")
img.dims.order  # T, C, Z, big Y, big X, (S optional)
img.dask_data  # Dask chunks fall on tile boundaries, pull YX chunks out of the image

This behavior can be manually turned off:

img = AICSImage("very-large-mosaic.lif", reconstruct_mosaic=False)
img.dims.order  # M (tile index), T, C, Z, small Y, small X, (S optional)
img.dask_data  # Chunks use normal ZYX

If the reader does not support stitching tiles together the M tile index will be available on the AICSImage object:

img = AICSImage("some-unsupported-mosaic-stitching-format.ext")
img.dims.order  # M (tile index), T, C, Z, small Y, small X, (S optional)
img.dask_data  # Chunks use normal ZYX

Reader

If the file format reader detects mosaic tiles in the image, the Reader object will store the tiles as a dimension.

If tile stitching is implemented, the Reader can also return the stitched image.

reader = LifReader("ver-large-mosaic.lif")
reader.dims.order  # M, T, C, Z, tile size Y, tile size X, (S optional)
reader.dask_data  # normal operations, can use M dimension to select individual tiles
reader.mosaic_dask_data  # returns stitched mosaic - T, C, Z, big Y, big, X, (S optional)

Single Tile Absolute Positioning

There are functions available on both the AICSImage and Reader objects to help with single tile positioning:

img = AICSImage("very-large-mosaic.lif")
img.mosaic_tile_dims  # Returns a Dimensions object with just Y and X dim sizes
img.mosaic_tile_dims.Y  # 512 (for example)

# Get the tile start indices (top left corner of tile)
y_start_index, x_start_index = img.get_mosaic_tile_position(12)

Metadata Reading

from aicsimageio import AICSImage

# Get an AICSImage object
img = AICSImage("my_file.tiff")  # selects the first scene found
img.metadata  # returns the metadata object for this file format (XML, JSON, etc.)
img.channel_names  # returns a list of string channel names found in the metadata
img.physical_pixel_sizes.Z  # returns the Z dimension pixel size as found in the metadata
img.physical_pixel_sizes.Y  # returns the Y dimension pixel size as found in the metadata
img.physical_pixel_sizes.X  # returns the X dimension pixel size as found in the metadata

Xarray Coordinate Plane Attachment

If aicsimageio finds coordinate information for the spatial-temporal dimensions of the image in metadata, you can use xarray for indexing by coordinates.

from aicsimageio import AICSImage

# Get an AICSImage object
img = AICSImage("my_file.ome.tiff")

# Get the first ten seconds (not frames)
first_ten_seconds = img.xarray_data.loc[:10]  # returns an xarray.DataArray

# Get the first ten major units (usually micrometers, not indices) in Z
first_ten_mm_in_z = img.xarray_data.loc[:, :, :10]

# Get the first ten major units (usually micrometers, not indices) in Y
first_ten_mm_in_y = img.xarray_data.loc[:, :, :, :10]

# Get the first ten major units (usually micrometers, not indices) in X
first_ten_mm_in_x = img.xarray_data.loc[:, :, :, :, :10]

See xarray "Indexing and Selecting Data" Documentation for more information.

Cloud IO Support

File-System Specification (fsspec) allows for common object storage services (S3, GCS, etc.) to act like normal filesystems by following the same base specification across them all. AICSImageIO utilizes this standard specification to make it possible to read directly from remote resources when the specification is installed.

from aicsimageio import AICSImage

# Get an AICSImage object
img = AICSImage("http://my-website.com/my_file.tiff")
img = AICSImage("s3://my-bucket/my_file.tiff")
img = AICSImage("gcs://my-bucket/my_file.tiff")

# All other normal operations work just fine

Remote reading requires that the file-system specification implementation for the target backend is installed.

  • For s3: pip install s3fs
  • For gs: pip install gcsfs

See the list of known implementations.

Saving to OME-TIFF

The simpliest method to save your image as an OME-TIFF file with key pieces of metadata is to use the save function.

from aicsimageio import AICSImage

AICSImage("my_file.czi").save("my_file.ome.tiff")

Note: By default aicsimageio will generate only a portion of metadata to pass along from the reader to the OME model. This function currently does not do a full metadata translation.

For finer grain customization of the metadata, scenes, or if you want to save an array as an OME-TIFF, the writer class can also be used to customize as needed.

import numpy as np
from aicsimageio.writers import OmeTiffWriter

image = np.random.rand(10, 3, 1024, 2048)
OmeTiffWriter.save(image, "file.ome.tif", dim_order="ZCYX")

See OmeTiffWriter documentation for more details.

Other Writers

In most cases, AICSImage.save is usually a good default but there are other image writers available. For more information, please refer to our writers documentation.

Benchmarks

AICSImageIO is benchmarked using asv. You can find the benchmark results for every commit to main starting at the 4.0 release on our benchmarks page.

Development

See our developer resources for information related to developing the code.

Citation

If you find aicsimageio useful, please cite this repository as:

AICSImageIO Contributors (2021). AICSImageIO: Image Reading, Metadata Conversion, and Image Writing for Microscopy Images in Pure Python [Computer software]. GitHub. https://github.com/AllenCellModeling/aicsimageio

Free software: BSD-3-Clause

(The LIF component is licensed under GPLv3 and is not included in this package) (The Bio-Formats component is licensed under GPLv2 and is not included in this package)

Comments
  • Map `bioformats` images with tiles in x-y dimension in `dask`

    Map `bioformats` images with tiles in x-y dimension in `dask`

    Description

    The recent bioformats reader adds fantastic support for all things bioformats, but dask chunks were mapped as planes which is less than ideal when working with whole slide images or and image with very large x-y planes. Fortunately, most of the logic to support tiling was already present so I added some code to split the y and x axis up by tiles of arbitrary dimension and map those with da.map_blocks.

    There are two new kwargs in BioFile:

    dask_tiles -> use dask tiles, bool tile_size -> optional tuple of tile size in y and x, otherwise defaults to recommended by bioformats with `getOptimalTileHeight/Width'

    I've run some small test locally on WSIs from 2 formats with success, but the current test suite does not include any images where such tiling would be appropriate, so I'm keeping this as draft to see how best to progress and get feedback on how to proceed.

    quick memory profile on local data

    python -m memory_profiler bf-memtest.py
    
    
    import os
    os.environ["BIOFORMATS_MEMORY"] = "8g"
    import numpy as np
    from aicsimageio.readers.bioformats_reader import BioFile
    
    @profile
    def mem_consumption():
        bf = BioFile("./data/VAN0032-RK-3-10-PAS_IMS.scn",series=3, dask_tiles=True)
        partial_by_tile = bf.to_dask()[:, :, :, 1024:2048, 1024:4096].compute()
        bf = BioFile("./data/VAN0032-RK-3-10-PAS_IMS.scn",series=3, dask_tiles=False)
        partial_by_plane = bf.to_dask()[:, :, :, 1024:2048, 1024:4096].compute()
        assert np.array_equal(partial_by_tile, partial_by_plane)
    
    
    if __name__ == '__main__':
        mem_consumption()
    

    Terminal output

    Line #    Mem usage    Increment  Occurences   Line Contents
    ============================================================
         7  220.094 MiB -1415.418 MiB           2   @profile
         8                                         def mem_consumption(use_tiles=False):
         9  268.086 MiB  172.887 MiB           2       bf = BioFile("./data/VAN0032-RK-3-10-PAS_IMS.scn",series=3, dask_tiles=True)
        10  298.879 MiB   51.410 MiB           2       partial_by_tile = bf.to_dask()[:, :, :, 1024:2048, 1024:4096].compute()
        11  308.559 MiB    4.121 MiB           2       bf = BioFile("./data/VAN0032-RK-3-10-PAS_IMS.scn",series=3, dask_tiles=False)
        12 3475.008 MiB 4624.738 MiB           2       partial_by_plane = bf.to_dask()[:, :, :, 1024:2048, 1024:4096].compute()
        13 3475.008 MiB    0.301 MiB           2       assert np.array_equal(partial_by_tile, partial_by_plane)
    
    

    ^^ massive decrease in memory consumption to read a partial area, arrays are equal.

    Pull request recommendations:

    • [x] Name your pull request your-development-type/short-description. Ex: feature/read-tiff-files
    • [x] Provide relevant tests for your feature or bug fix.
    • [x] Provide or update documentation for any feature added by your pull request.
    enhancement 
    opened by NHPatterson 31
  • feature/tiledtiffreader

    feature/tiledtiffreader

    This PR creates a Reader that uses the bfio OME Tiled Tiff reader. This reader will only read images that have the tile width and height tags set to 1024. We have optimized the reader in a few different ways, including having it perform lazy, multithreaded reading by default. This made it easy to wrap with a delayed array, because almost no pre-processing was needed.

    This particular implementation sets up the ability to create additional Reader wrappings, including our ome.zarr implementation. I did see there was an open PR for ome.zarr, so it may be redundant. However, to implement our zarr reader/writer we only need to change the backend for bfio. We have not implemented it here since we are in the process of updating our ome.zarr reader/writer to follow the NGFF v0.3 spec (we currently only conform to v0.1).

    Before opening up additional PRs for other readers and writers, I thought I would open this to see what else you would like to see.

    Note: This work was done as a followup to a meeting we had toward the end of last year. In an oversight on my part, we forgot to invite Jackson.

    enhancement 
    opened by Nicholas-Schaub 30
  • feature/bioformats-reader

    feature/bioformats-reader

    Description

    This PR implements a (java-backed) bioformats reader via jpype, with the jar coming from bioformats_jar.

    This requires bioformats_jar (which will install jpype), and also requires that the user has java in their environment. (The easiest way to do that in a python env is to use conda install -c conda-forge openjdk).

    From discussions, I think we all see this as a fallback reader, with the ultimate goal still being to provide pure python readers. But in the meantime, this brings all of the bioformats supported formats into the same Reader API here, and also adds a dask-backed bioformats reader, which I believe might be new?

    The classes added here are:

    • aicsimageio.readers.bioformats_reader.BioFile - the lowest level reader object, with an API somewhat similar to TiffFile. can be used as a context manager (with BioFile('path') as f: ...) and offers these public attributes:
      • set_series
      • core_meta - (named tuple with core metadata)
      • open/close
      • to_numpy - greedy reader (always TCZRX[c], where [c] is for RGB)
      • to_dask - delayed reader (always TCZRX[c])
      • ome_metadata - returns parsed metadata as ome_types.OME
      • ome_xml - returns OME XML string
    • aicsimageio.readers.bioformats_reader.BioformatsReader - wraps a BioFile and implements the Reader protocol.

    This also adds a convenience function aicsimageio.utils.ome_utils.bioformats_ome that can be used to retrieve ome_types.OME from any bioformats supported file. (This was the original motivation for https://github.com/tlambert03/ome-types/pull/102 ... and allows me to close that)

    Pull request recommendations:

    • [x] Name your pull request your-development-type/short-description. Ex: feature/read-tiff-files
    • [x] Link to any relevant issue in the PR description. Ex: Resolves [gh-12], adds tiff file format support
      • relevant: https://github.com/AllenCellModeling/aicsimageio/issues/147
    • [x] Provide relevant tests for your feature or bug fix.
    • [x] Provide or update documentation for any feature added by your pull request.
    enhancement 
    opened by tlambert03 25
  • feature/glob-reader

    feature/glob-reader

    Description

    This PR implements GlobReader and will eventually close #166. As discussed in the issue users provide a glob string that points to several tiff files and indexer which maps those filenames to coordinates. This is a work in progress and I'd welcome any feedback.

    Currently GlobReader only fully supports reading multiple single frame tiff-like files. I have also tested it with 3d tiffs which seems to work for immediate reading but a bug in tifffile seems to interfere with lazily loading 3d tiffs with dask. I will keep tabs on the next version of tifffile and add tests for the 3d case when possible.

    I'll post a few specific questions I have back on #166 about how to continue with this.

    enhancement 
    opened by jrussell25 24
  • TiffReader (and OmeTiffReader) slow for dask chunked reads

    TiffReader (and OmeTiffReader) slow for dask chunked reads

    System and Software

    • aicsimageio Version: 3.3.1
    • Python Version: 3.7
    • Operating System: OSX 10.13.6

    Description

    I've generated OME-tiff-stack files from micro-manager 2.0 gamma. Pulling a single xy slice from a stack using get_image_dask_data("YX", czst=random).compute() takes approx 15 seconds. This is tested using %timeit module in jupyter notebooks. Pulling a single xy slice from a small stack is more performant (approx 700ms) ... but isn't the purpose of dask delayed reading to be less vulnerable to data file sizes? Is there some incompatibility with jupyter that i'm not aware of?

    Here's some sample code that I used:

    def random_pull_dask(c_max, z_max, s_max, t_max, aicsimage):
        c = np.random.randint(c_max)
        z = np.random.randint(z_max)
        s = np.random.randint(s_max)
        t = np.random.randint(t_max)
        return aicsimage.get_image_dask_data("YX", C=c, Z=z, S=s, T=t).compute()
    
    img = AICSImage(path_to_top_ometiff)
    %timeit -n 3 -r 5 data = random_pull_dask(4, 5, 4, 50, img)
    

    The large dataset has max dimensions (C, Z, S, T) = (4, 5, 4, 50) with 2048x2048 16-bit images. The small dataset has max dimensions (C, Z, S, T) = (4, 5, 4, 10).

    Expected Behavior

    What did you expect to happen instead? I expected the dask delayed read to scale less or not at all with the size of the dataset. This appears to be a 20x slowdown in read for only a 5x difference in data size.

    Reproduction

    A minimal example that exhibits the behavior.

    Environment

    Any additional information about your environment

    enhancement discussion 
    opened by bryantChhun 24
  • admin/prepare-bioformats_reader-to-work-with-new-bioformats_jar-based-on-scyjava

    admin/prepare-bioformats_reader-to-work-with-new-bioformats_jar-based-on-scyjava

    Description

    This PR prepares the bioformats reader to work with the scyjava-based bioformats_jar update coming in https://github.com/tlambert03/bioformats_jar/pull/4. Mostly this just means updating the error messages and readme a bit.

    With this PR, aicsimageio should work both with the current version of bioformats_jar and the new one after that is released

    Pull request recommendations:

    • [ ] Name your pull request your-development-type/short-description. Ex: feature/read-tiff-files
    • [ ] Link to any relevant issue in the PR description. Ex: Resolves [gh-], adds tiff file format support
    • [ ] Provide relevant tests for your feature or bug fix.
    • [ ] Provide or update documentation for any feature added by your pull request.

    Thanks for contributing!

    documentation enhancement admin 
    opened by tlambert03 23
  • admin/doc-updates

    admin/doc-updates

    This PR will likely be open for a bit. This is it. This is the PR that will add all the doc updates, additions, and cleanups for the 4.0 release. On that note. I will be adding more reviewers on this PR than normal because more eyes on documentation is great. If you really don't care about this, remove yourself as a reviewer, it's okay, I really won't be offended!

    To "review" this PR, please see current 4.0 documentation and simply add a comment to this PR for things that don't make sense. As we go I will update this PR with changes and we can review normally (hint: GitHub's "rich diff" on markdown is useful).


    It would also be great to get eyes on our draft release notes which are copied below. Since these are copied to other forums (image.sc), this is largely the most important quick intro to the library until someone goes to the README.

    Release Notes:

    AICSImageIO 4.0.0

    We are happy to announce the release of AICSImageIO 4.0.0!

    AICSImageIO is a library for image reading, metadata converstion, and image writing for microscopy formats in pure Python. It aims to be able to read microscopy images into a single unified API regardless of size, format, or location while additionally writing images and converting metadata to a standard common format.

    A lot has changed and this post will only have the highlights. If you are new to the library, please see our full documentation for alway up-to-date usage and information and for a quickstart README.

    Highlights

    Writers

    While we are actively working on metadata translation functions, we are working on setting ourselves up for the easiest method for format converstion. For now, we have added a simple save function to the AICSImage object that will convert the pixel data and general key pieces of metadata to OME-TIFF for all (or select set) of scenes in the file.

    from aicsimageio import AICSImage
    
    AICSImage("my_file.czi").save("my_file.ome.tiff")
    

    For users that want greater flexibility and specificity in image writing, we have entirely reworked our writers module and this release contains three writers: TwoDWriter, TimeseriesWriter, and OmeTiffWriter. The objective of this rework was to make n-dimensional image writing much easier, and most importantly, to make metadata attachment as easy as possible. And, we now support multi-scene / multi-image OME-TIFF writing when providing a List[ArrayLike].

    A comparison of 3.x OmeTiffWriter vs 4.x:

    3.x OmeTiffWriter Usage

    from aicsimageio.writers import OmeTiffWriter
    
    with OmeTiffWriter("my_file.ome.tiff") as writer:
        writer.save(
            img_data,  # np.ndarray
            dimension_order="CZYX",
            channel_names=["a", "b", "c"],
            pixels_physical_size=(0.108, 0.108, 0.108),  # XYZ ordered tuple
        )
    

    4.x OmeTiffWriter Usage

    from aicsimageio.writers import OmeTiffWriter
    from aicsimageio.types import PhysicalPixelSizes
    
    OmeTiffWriter.save(
        img_data,  # np.ndarray OR da.Array OR list of previous
        "my_file.ome.tiff",
        dim_order="CZYX",
        channel_names=["a", "b", "c"],
        pixels_physical_size=PhysicalPixelSizes(0.108, 0.108, 0.108),  # ZYX new `PhysicalPixelSizes` object
    )
    

    OME TIFF Further Notes

    Our OmeTiffReader and OmeTiffWriter now validate the read or produced OME metadata. Thanks to the ome-types library for the heavy lifting, we can now ensure that all metadata produced by this library is valid to the OME specification.

    Better Scene Management

    Over time while working with 3.x, we found that many formats contain a Scene or Image dimension that can be entirely different from the other instances of that dimension in pixel type, channel naming, image shape, etc. To solve this we have changed the AICSImage and Reader objects to statefully manage Scene while all other dimensions are still available.

    In practice, this means on the AICSImage and Reader objects the user no longer receives the Scene dimension back in the data or dimensions properties (or any other related function or property).

    To change scene while operating on a file you can call AICSImage.set_scene(scene_id) while retrieving which scenes are valid by using AICSImage.scenes.

    from aicsimageio import AICSImage
    
    many_scene_img = AICSImage("my_file.ome.tiff")
    many_scene_img.current_scene  # the current operating scene
    many_scene_img.scenes  # returns tuple of available scenes
    many_scene_img.set_scene("Image:2")  # sets the current operating scene to "Image:2"
    

    Scene Management Notes

    Due to these changes, we no longer use the "S" dimension to represent "Scene". We use it to represent the "Samples" dimension (RGB). More details in the full list of changes.

    Mosaic Tile Stitching

    For certain imaging formats we will stitch together the mosaic tiles stored in the image prior to returning the data. Currently the two formats supported by this functionality are LIF and CZI.

    from aicsimageio import AICSImage
    
    stitched_image = AICSImage("tiled.lif")
    stitched_image.dims  # very large Y and X
    

    Xarray

    The entire library now rests on xarray. We store all metadata, coordinate planes, and imaging data all in a single xarray.DataArray object. This allows for not only selecting by indices with the already existing aicsimageio methods: get_image_data and get_image_dask_data, but additionally to select by coordinate planes.

    Mosaic Images and Xarray Together

    A prime example of where xarray can be incredibly powerful for microscopy images is in large mosaic images. Due to how large certain mosaic images can become, we stitch and provide back the data as an out-of-memory dask array enabling users to only pull specific spatial chunks out of the image that they need at any given time.

    from aicsimageio import AICSImage
    
    # Read and stitch together a tiled image
    large_stitched_image = AICSImage("tiled.lif")
    
    # Only load in-memory the first 300x300 micrometers (or whatever unit) in Y and X dimensions
    larged_stitched_image.xarray_dask_data[:, :, :, 300, 300].data.compute()
    

    FSSpec Adoption

    Across the board we have adopted fsspec for file handling. With 4.x you can now provide any URI supported by the fsspec library or any implementations of fsspec (s3fs (AWS S3), gcsfs (Google Cloud Storage), adlfs (Azure Data Lake), etc.).

    In many cases, this means we now support direct read and write from local or remote data as a base part of our API.

    from aicsimageio import AICSImage
    
    wb_img = AICSImage("https://www.your-site.com/your-file.ome.tiff")
    s3_img = AICSImage("s3://your-bucket/your-dir/your-file.ome.tiff")
    gs_img = AICSImage("gs://your-bucket/your-dir/your-file.ome.tiff")
    

    To read from remote storage, you must install the related fsspec implementation library. For s3 for example, you must install s3fs.

    Roadmap and Motivation

    After many discussions with the community we have finally written a roadmap and accompanying documentation for the library. If you are interested, please feel free to read them. Roadmap and Accompanying Documentation

    Full List of Changes

    • Added support for reading all image data (including metadata and coordinate information) into xarray.DataArray objects. This can be accessed with AICSImage.xarray_data, AICSImage.xarray_dask_data, or Reader equivalents. Where possible, we create and attach coordinate planes to the xarray.DataArray objects to support more options for indexed data selection such as timepoint selection by unit of time, or pixel selection by micrometers.
    • Added support for reading multi-channel RGB imaging data utilizing a new Samples (S) dimension. This dimension will only appear in the AICSImage, Reader, and the produced np.ndarray, da.Array, xr.DataArray if present in the file and will be the last dimension, i.e. if provided an RGB image, AICSImage and related object dimensions will be "...YXS", if provided a single sample / greyscale image, AICSImage and related object dimensions will be "...YX". (This change also applies to DefaultReader and PNG, JPG, and similar formats)
    • OmeTiffReader now validates the found XML metadata against the referenced specification. If your file has invalid OME XML, this reader will fail and roll back to the base TiffReader. (In the process of updating this we found many bugs in our 3.x series OmeTiffWriter, our 4.x OmeTiffReader fixes these bugs at read time but that doesn't mean the file contains valid OME XML. Recommended to upgrade and start using the new and improved, and validated, OmeTiffWriter.)
    • DefaultReader now fully supports reading "many-image" formats such as GIF, MP4, etc.
    • OmeTiffReader.metadata is now returned as the OME object from ome-types. This change additionally removes the vendor.OMEXML object.
    • Dimensions received an overhaul -- when you use AICSImage.dims or Reader.dims you will be returned a Dimensions object. Using this object you can get the native order of the dimensions and each dimensions size through attributes, i.e. AICSImage.dims.X returns the size of the X dimension, AICSImage.dims.order returns the string native order of the dimensions such as "TCZYX". Due to these changes we have removed all size functions and size_{dim} properties from various objects.
    • Replaced function get_physical_pixel_size with attribute physical_pixel_sizes that returns a new PhysicalPixelSizes NamedTuple object. This now allows attribute axis for each physical dimension, i.e. PhysicalPixelSizes.X returns the size of each X dimension pixel. This object can be cast to a base tuple but be aware that we have reversed the order from XYZ to ZYX to match the rest of the library's standard dimension order.
    • Replaced function get_channel_names with attribute channel_names.
    • Replaced function dtype with attribute dtype.
    • Removed all distributed cluster and client spawning.
    • Removed context manager usage from all objects.

    Contributors and Reviewers this Release (alphabetical)

    Jackson Maxfield Brown (JacksonMaxfield) Julie Cass (jcass11) Jianxu Chen (jxchen01) Bryant Chhun (bryantChhun) Rory Donovan-Maiye (donovanr) Christoph Gohlke (cgohlke) Josh Moore (joshmoore) Sebastian Rhode (sebi06) Jamie Sherman (heeler) Madison Swain-Bowden (AetherUnbound) Dan Toloudis (toloudis) Matheus Viana (vianamp)

    documentation admin 
    opened by evamaxfield 23
  • set_scene does not change scene when scene ids are duplicated

    set_scene does not change scene when scene ids are duplicated

    System and Software

    • aicsimageio Version: 4.7.0
    • Python Version 3.10.4
    • Operating System: Mac OS 12.3.1 / M1

    Description

    When loading a file via bioformats (a leica LOF) with multiple scenes which are named identically, changing the scene via scene index does not work; no error occurs, but the active scene does not change.

    I needed to update the bio formats jar to a more recent version manually since the packaged version does not have LOF support. I have no ability to control scene naming.

    >>> import aicsimageio
    >>> img = aicsimageio.AICSImage('example.lof', reader=aicsimageio.readers.bioformats_reader.BioformatsReader)
    >>> img.scenes
    ('example-c1', 'example-c1', 'example-c1', 'example-c1')
    >>> img.current_scene_index
    0
    img.set_scene(3)
    img.current_scene_index
    0
    
    bug admin 
    opened by jil24 20
  • Support reading mosaic LIF

    Support reading mosaic LIF

    System and Software

    • aicsimageio Version: 3.3.3
    • Python Version: 3.7.6
    • Operating System: Ubuntu 18.04

    Description

    Failed to read a lif file with multiple Fov, it fails at this line with the error: ValueError: cannot reshape array of size 104857600 into shape (2048,2048).

    It appears the it failed to extract the number of FoV which should be 25 (i.e. 2048x2048x25 = 104857600)

    I added a line before where it fails to print out some extra information:

    print('===debug===>', typed_array.shape, x_size, y_size, selected_ranges)
    
    

    And here is the output:

    ===debug===> (104857600,) 2048 2048 {'S': range(0, 40), 'T': range(0, 1), 'C': range(0, 4), 'Z': range(0, 10)}
    

    Expected Behavior

    The sample image should have 40 wells, 25 FoV per well, 10 z-slices per Fov, and 4 channel.

    Reproduction

    A minimal example that exhibits the behavior.

    Unfortunately, we cannot provide the sample file. But if you have any idea about the cause of this bug, happy to test it.

    Thank you.

    enhancement 
    opened by oeway 19
  • Add a dedicated reader for Leica SCN files (`tifffile` backend)

    Add a dedicated reader for Leica SCN files (`tifffile` backend)

    Description

    This PR adds a dedicated reader for Leica SCN files (the vendor format for the Leica SCN-400 and SCN-400F slide scanner) that can access macro, label, and full resolution images from multiple scenes. It has been tested with RGB bright field scans and fluorescence scans, but not yet for either scan type with Z-stacks (I don't believe time-lapse imaging is possible with this scanner).

    tifffile already supported this format and can access all layers. This PR maps the image metadata to what is expected by aicsimageio. This is significantly faster than using bioformats.

    Tests for the reader and the AICSImage are added.

    Pull request recommendations:

    • [x] Name your pull request your-development-type/short-description. Ex: feature/read-tiff-files
    • [x] Provide relevant tests for your feature or bug fix.
    • [ ] Provide or update documentation for any feature added by your pull request.

    I should be able to do something similar for .svs soon, addressing #228.

    For testing, 2 images will need to be added: this image and an image from my lab. Please let me know how I can send this to you, it is fine if it is in the public domain.

    enhancement 
    opened by NHPatterson 17
  • Fully construct and return the mosaic image for CZI files

    Fully construct and return the mosaic image for CZI files

    Hi again,

    I have a question regarding reading a CZI file. czifile.py library gives me the shape (2, 1, 10, 22800, 28960, 3) of my czi file. When I use aicsimageio I get this shape:

    img = AICSImage('my.czi')

    Shape: (1, 1, 3, 10, 1200, 1600)

    I have two questions:

    1. How to read the entire image and not only a part of it?
    2. How to extract the number of scenes in the slide? 'S' refers to 1 but I have two scenes in the slide.

    Thank you very much in advance

    enhancement 
    opened by snowformatics 17
  • feature/add-physical-pixel-size-to-tiff-reader

    feature/add-physical-pixel-size-to-tiff-reader

    Description

    closes https://github.com/AllenCellModeling/aicsimageio/issues/450 by implementing physical_pixel_sizes for the default TiffReader

    Pull request recommendations:

    • [ ] Name your pull request your-development-type/short-description. Ex: feature/read-tiff-files
    • [ ] Link to any relevant issue in the PR description. Ex: Resolves [gh-], adds tiff file format support
    • [ ] Provide relevant tests for your feature or bug fix.
    • [ ] Provide or update documentation for any feature added by your pull request.

    Thanks for contributing!

    enhancement 
    opened by tlambert03 2
  • bugfix/catch-invalid-XMLAnnotationID

    bugfix/catch-invalid-XMLAnnotationID

    Description

    fixes https://github.com/AllenCellModeling/aicsimageio/issues/454

    This PR is sufficient to get the xml/h5 dataset linked in the original issue reading with the bioformats reader... (and lets me think a bit longer about how I want to handle invalid schemas over in ome-types)

    Pull request recommendations:

    • [x] Name your pull request your-development-type/short-description. Ex: feature/read-tiff-files
    • [x] Link to any relevant issue in the PR description. Ex: Resolves [gh-], adds tiff file format support
    • [ ] Provide relevant tests for your feature or bug fix.
    • [ ] Provide or update documentation for any feature added by your pull request.

    Thanks for contributing!

    opened by tlambert03 6
  • Feature: Add units to PhysicalPixelSize tuple?  (or just document it as an assumed unit)

    Feature: Add units to PhysicalPixelSize tuple? (or just document it as an assumed unit)

    I found myself wondering what the units of PhysicalPixelSizes was. I see that there's no docstring, and if I look around the repo a bit, it doesn't seem very standardized. (where we pull from ome-types, including in my bioformats reader, it looks like we pretty much just grab the physical_pixel_size for X and Y, but don't look at the units value there :joy:)

    It would be fine by me either way if PhysicalPixelSize was just always assumed to be microns or meters or something (provided it was documented with that assumption and reader plugins knew they should do the conversion)... but we could also have a unit member of the named tuple? Problem of course there is that it's a bit breaking, if anyone did something like dz, dy, dx = file.physical_pixel_sizes. so very open to any other suggestions!

    opened by tlambert03 5
  • .git/objects/pack is huge, consider history rewrite?

    .git/objects/pack is huge, consider history rewrite?

    i'm on a super slow internet at the moment and wanted to do a little work on aicsimageio. I tried to clone the repo and it took a long time... though the direct zip download was only 2MB (most of which are the presentations, the source itself is only 800K unzipped)

    the full repo is 337 MB, and 333M of that is in .git/objects/pack ... which i suspect indicates that at one point in the past, test images were included in the repo? I wonder how folks would feel about a git filter-branch rewrite? https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/removing-sensitive-data-from-a-repository

    opened by tlambert03 12
  • Process TIFF Tags for Metadata on TiffReader

    Process TIFF Tags for Metadata on TiffReader

    Use Case

    Please provide a use case to help us understand your request in context

    https://forum.image.sc/t/reading-pixel-size-from-image-file-with-python/74798/20

    Solution

    Please describe your ideal solution

    During initial setup of the TiffReader object, process TIFF Tags for additional metadata (ImageJ puts physical pixel sizes in the Tiff Tags for example)

    Alternatives

    Please describe any alternatives you've considered, even if you've dismissed them

    enhancement 
    opened by evamaxfield 4
  • bugfix/empty-scene-name

    bugfix/empty-scene-name

    Description

    Resolves https://github.com/AllenCellModeling/aicsimageio/issues/447, where scenes without names are labelled None. This should ensure empty scene names are replaced with unique scene names that allows current_scene_index to work properly.

    Pull request recommendations:

    • [x] Name your pull request your-development-type/short-description. Ex: feature/read-tiff-files
    • [x] Link to any relevant issue in the PR description. Ex: Resolves [gh-], adds tiff file format support
    • [x] Provide relevant tests for your feature or bug fix.
    • [x] Provide or update documentation for any feature added by your pull request.
    opened by LegendLukaz 11
Releases(v4.9.4)
  • v4.9.4(Dec 6, 2022)

    What's Changed

    • bugfix/Fix UnboundLocalError in TiffGlobReader by @ianhi in https://github.com/AllenCellModeling/aicsimageio/pull/449

    Full Changelog: https://github.com/AllenCellModeling/aicsimageio/compare/v4.9.3...v4.9.4

    Source code(tar.gz)
    Source code(zip)
  • v4.9.3(Nov 15, 2022)

    AICSImageIO v4.9.3

    AICSImageIO is a library for image reading, writing, and metadata conversion in pure Python with readers for many Bio and Microscopy related formats (TIFF, CZI, ND2, DV, LIF).

    What's Changed

    • fix/position-names-in-nd2-tests by @tlambert03 in https://github.com/AllenCellModeling/aicsimageio/pull/437
    • fix single dimension index when requested as a returned dim by @toloudis in https://github.com/AllenCellModeling/aicsimageio/pull/438
    • admin/citation-update by @evamaxfield in https://github.com/AllenCellModeling/aicsimageio/pull/440
    • try to handle I the same way as Q coming out of tifffile reading by @toloudis in https://github.com/AllenCellModeling/aicsimageio/pull/445

    Full Changelog: https://github.com/AllenCellModeling/aicsimageio/compare/v4.9.2...v4.9.3

    Source code(tar.gz)
    Source code(zip)
  • v4.9.2(Aug 24, 2022)

    AICSImageIO v4.9.2

    AICSImageIO is a library for image reading, writing, and metadata conversion in pure Python with readers for many Bio and Microscopy related formats (TIFF, CZI, ND2, DV, LIF).

    This release include the option to add physical pixel sizes to the ArrayLikeReader (#426), a bugfix related to non-naturally indexed CZI scenes (#432), a hopeful patch to catch some edge cases regarding passing specific indices as a list or tuple to our get_image_data (and related) calls (#429), and finally, some documentation improvements regarding the installation of CZI support (#433).

    What's Changed

    • feature/add-physical-pixel-sizes-param-to-array-like by @colobas in https://github.com/AllenCellModeling/aicsimageio/pull/426
    • bugfix/czi-scene-selection-for-inconsistent-scenes-regression by @toloudis in https://github.com/AllenCellModeling/aicsimageio/pull/432
    • bugfix/convert-dimension-spec-lists-to-slices-when-possible by @toloudis in https://github.com/AllenCellModeling/aicsimageio/pull/429
    • admin/include-fsspec-dep-for-czi-in-readme by @evamaxfield in https://github.com/AllenCellModeling/aicsimageio/pull/433

    New Contributors

    • @colobas made their first contribution in https://github.com/AllenCellModeling/aicsimageio/pull/426

    Full Changelog: https://github.com/AllenCellModeling/aicsimageio/compare/v4.9.1...v4.9.2

    Source code(tar.gz)
    Source code(zip)
  • v4.9.1(Aug 2, 2022)

    AICSImageIO v4.9.1

    AICSImageIO is a library for image reading, writing, and metadata conversion in pure Python with readers for many Bio and Microscopy related formats (TIFF, CZI, ND2, DV, LIF).

    This release has a suite of bugfixes for the Dimensions object typing, CZI file formats scene indexing, CZI file formats channel names extraction, CZI file formats pixel type, and then finally a couple of changes related to a breaking change in the upstream filesystem handler (fsspec).

    What's Changed

    • bugfix/dynamic-dimension-typing by @evamaxfield in https://github.com/AllenCellModeling/aicsimageio/pull/419
    • bugfix/czi-scene-indexing by @toloudis in https://github.com/AllenCellModeling/aicsimageio/pull/417
    • admin/add-fsspec-to-upstream-checks by @evamaxfield in https://github.com/AllenCellModeling/aicsimageio/pull/422
    • bugfix/extract-czi-channel-names-more-safely by @toloudis in https://github.com/AllenCellModeling/aicsimageio/pull/418
    • Fix/czireader float32 dtype by @toloudis in https://github.com/AllenCellModeling/aicsimageio/pull/423
    • admin/ignore-fsspec-2022.7.0 by @evamaxfield in https://github.com/AllenCellModeling/aicsimageio/pull/424
    • bugfix/fsspec-local-file-opener-cpp-buffer-for-czi by @evamaxfield in https://github.com/AllenCellModeling/aicsimageio/pull/425

    Full Changelog: https://github.com/AllenCellModeling/aicsimageio/compare/v4.9.0...v4.9.1

    Source code(tar.gz)
    Source code(zip)
  • v4.9.0(Jul 19, 2022)

    This release introduces a new feature, scene stacking!

    The original issue that spawned this entire feature can be seen here: #335 We currently have a decent number of users that loop over all scenes and stack them into a single array manually. This release adds a function to both the AICSImage and all Reader objects that will do that for you, with some additional options as to how to stack.

    many_scene_image = AICSImage("many-scenes.czi")
    all_scenes_np = many_scene_image.get_stack()
    all_scenes_da = many_scene_image.get_dask_stack()
    all_scenes_xarray_np = many_scene_image.get_xarray_stack()
    all_scenes_xarray_da = many_scene_image.get_xarray_dask_stack()
    

    All of these have a few extra parameters which can be seen in our documentation for generate_stack

    What's Changed

    • feature/get-stack by @jrussell25 in https://github.com/AllenCellModeling/aicsimageio/pull/403
    • feature/lower-log-level-of-OME-TIFF-read-errors by @evamaxfield in https://github.com/AllenCellModeling/aicsimageio/pull/414
    • feature/image-container by @evamaxfield in https://github.com/AllenCellModeling/aicsimageio/pull/415

    Full Changelog: https://github.com/AllenCellModeling/aicsimageio/compare/v4.8.0...v4.9.0

    Other News

    We finally started working on a version 5, or "the plugin revamp" of this library! You can track our progress in the version 5 discussion post

    Source code(tar.gz)
    Source code(zip)
  • v4.8.0(May 27, 2022)

    The aicsimageio v4.8.0 release includes:

    • aicsimageio now ships with mypy type annotations. If you are using mypy, our types can now be properly imported and type checked against.
    • aicsimageio image containers and writer functions now have an fs_kwargs parameter to pass down any arguments for creating the fsspec Filesystem object with. i.e. AICSImage("s3://some-bucket/some-image.ome.tiff", fs_kwargs=dict(anon=True)) for anonymous / no credential S3 file reading.
    • BioformatsReader bugfixes for scene management / switching and preparing the reader for the next release of the underlying bioformats_jar version.

    We have also dropped support for Python 3.7 and added support for Python 3.10

    An additional minor package admin change has been added which runs our aicsimageio test suite multiple times a week but installs with our upstream dependencies main branches instead of released versions. This is so we can help catch bugs earlier in the release process rather than post release.

    What's Changed

    • admin/ship-mypy-type-annotations-drop-py37-add-py310-manage-test-dependencies-separate-for-each-tox-env by @JacksonMaxfield in https://github.com/AllenCellModeling/aicsimageio/pull/397
    • bugfix/pass-series-index-in-biofile-init by @JacksonMaxfield in https://github.com/AllenCellModeling/aicsimageio/pull/401
    • feature-and-admin/create-aicsimage-objects-with-fs-kwargs-and-remove-need-for-creds by @JacksonMaxfield in https://github.com/AllenCellModeling/aicsimageio/pull/407
    • admin/add-test-upstreams-action by @JacksonMaxfield in https://github.com/AllenCellModeling/aicsimageio/pull/406
    • admin/prepare-bioformats_reader-to-work-with-new-bioformats_jar-based-on-scyjava by @tlambert03 in https://github.com/AllenCellModeling/aicsimageio/pull/402

    Contributors

    @toloudis @AetherUnbound @tlambert03 @jrbourbeau @JacksonMaxfield

    Full Changelog: https://github.com/AllenCellModeling/aicsimageio/compare/v4.7.0...v4.8.0

    Source code(tar.gz)
    Source code(zip)
  • v4.7.0(Apr 19, 2022)

    We are pleased to annouce the release of aicsimageio v4.7.0!

    This release brings another new reader: the OmeTiffTiledReader.

    For certain tiled / mosaic OME-TIFFs, this reader massively speedups read performance and you can see all the benchmarks provided by @Nicholas-Schaub in the PR which added this reader: https://github.com/AllenCellModeling/aicsimageio/pull/387

    The new reader can be installed with pip install aicsimageio[bfio]

    Changelog

    • feature/tiledtiffreader by @Nicholas-Schaub in https://github.com/AllenCellModeling/aicsimageio/pull/387

    Reviewers

    • @JacksonMaxfield
    • @toloudis

    Full Changelog: https://github.com/AllenCellModeling/aicsimageio/compare/v4.6.4...v4.7.0

    Source code(tar.gz)
    Source code(zip)
  • v4.6.3(Mar 3, 2022)

    The previous v3 and below OMEXML.py continues to catch us. This patch should alleviate some issues created by it's functionality in the current reader by fixing out-of-order metadata information prior to reading.

    What's Changed

    • bugfix/add-logic-to-ensure-OME-XML-plane-elements-occur-last by @Nicholas-Schaub in https://github.com/AllenCellModeling/aicsimageio/pull/385

    New Contributors

    • @Nicholas-Schaub made their first contribution in https://github.com/AllenCellModeling/aicsimageio/pull/385

    Full Changelog: https://github.com/AllenCellModeling/aicsimageio/compare/v4.6.2...v4.6.3

    Source code(tar.gz)
    Source code(zip)
  • v4.6.2(Mar 1, 2022)

    A very small patch to fix CZI to OME converted metadata for the physical pixel sizes attribute. As such this change only affects usage of the ome_metadata property for CZIReader.

    What's Changed

    • admin/update-czi-to-ome-xslt-submodule by @JacksonMaxfield in https://github.com/AllenCellModeling/aicsimageio/pull/382

    Full Changelog: https://github.com/AllenCellModeling/aicsimageio/compare/v4.6.1...v4.6.2

    Source code(tar.gz)
    Source code(zip)
  • v4.6.1(Mar 1, 2022)

    This is a quick patch put in by @emay2022 to fix CZI physical pixel sizes. Users of AICSImageIO may notice that their CZI physical pixel sizes have changed after upgrading but we believe them to be accurate now as the original implmentation of parsing the CZI metadata was string based and not float calculation / unit conversion based.

    What's Changed

    • bugfix/czi-physical-size by @emay2022 in https://github.com/AllenCellModeling/aicsimageio/pull/384

    Contributors and Reviewers this Release

    • @emay2022
    • @ianhi
    • @toloudis
    • @JacksonMaxfield

    Full Changelog: https://github.com/AllenCellModeling/aicsimageio/compare/v4.6.0...v4.6.1

    Source code(tar.gz)
    Source code(zip)
  • v4.6.0(Feb 22, 2022)

    AICSImageIO 4.6.0

    This release wraps up our licensing and dependency management work.

    In v4.3.0 we changed the install patterns of BioformatsReader and LifReader due to their GPL licenses. We have followed the same process to change the install pattern for CziReader.

    • CziReader -- was installable with pip install aicsimageio[czi] but must now be installed with pip install aicsimageio aicspylibczi>=3.0.5

    aicspylibczi is a completely separate libraries that carries with it a GPL license, if you use this reader, be sure to see how your code should now be licensed and add this library to your own dependency list because our install option is no longer available.

    Changelog

    • Fix many issues with reader selection during AICSImage object init #367
    • Upgrade nd2 supporting lib dependency version #379
    • Remove CZI install pattern #376
    • Add more information and documentation to logged error on corrupt file #380

    To review all changes made in this release please see our full CHANGELOG.

    Contributors and Reviewers this Release (alphabetical)

    Jackson Maxfield Brown (@JacksonMaxfield) Talley Lambert (@tlambert03) Madison Swain-Bowden (@AetherUnbound) Dan Toloudis (@toloudis)

    Source code(tar.gz)
    Source code(zip)
  • v4.5.0(Nov 5, 2021)

    AICSImageIO 4.5.0

    We are happy to announce the release of AICSImageIO 4.5.0!

    AICSImageIO is a library for image reading, metadata conversion, and image writing for microscopy formats in pure Python. It aims to be able to read microscopy images into a single unified API regardless of size, format, or location, while additionally writing images and converting metadata to a standard common format.

    If you are new to the library, please see our full documentation for always up-to-date usage and a quickstart README.

    Highlights

    TIFF Glob Reading

    This release adds a TiffGlobReader! Incredibly useful for all the datasets comprised of image stacks stored as multiple TIFFs. And with it, a specific indexer pattern already stored for MicroManager users.

    # Given files with names like "s001_t002_c03_z04.tif"
    reader = TiffGlobReader("path/to/data/*.tif")
    
    # We can use this to read single image tiffs generated by MicroManager
    # Micromanager creates directories for each position so we need to recursively glob 
    # for the images files and pass the list to TiffGlobReader.
    # Note that all images are named according to "img_channel000_position001_time000000003_z004.tif"
    glob_files = glob.glob("path/to/data/**/*.tif", recursive=True)
    
    # since the numbers in Micromanager files are not in STCZ order we
    # need to use a different indexer than default. For convenience
    # when working MicroManager generated files you can use the provided indexer: TiffGlobReader.MicroManagerIndexer
    mm_reader = TiffGlobReader(glob_files, indexer=TiffGlobReader.MicroManagerIndexer)
    
    # as an example of making a custom indexer
    # you can manually create the MicroManagerIndexer like so:
    import pandas as pd
    from pathlib import Path
    import re
    
    def mm_indexer(path_to_img):
        inds = re.findall(r”d+”, Path(path_to_img).name)
        series = pd.Series(inds, index=["C", "S", "T", "Z"]).astype(int)
        return series
    
    mm_reader = TiffGlobReader(glob_files, indexer=mm_indexer)
    

    Thanks to @jrussell25 and @ianhi for these additions!

    YX Chunking for Large Files Read by BioformatsReader

    If the image you are trying to read using BioformatsReader has YX planes that are incredibly large, you may find the new parameters dask_tiles and tile_size useful to additionally chunk the YX dimensions by the provided tile size.

    bf_default = BioformatsReader("my_file.svs")
    bf_tiled = BioformatsReader("my_file.svs", dask_tiles=True)
    bf_tiled_custom = BioformatsReader("my_file.svs", dask_tiles=True, tile_size=(1024, 1024))
    
    assert bf_default.dask_data.chunksize == (1, 1, 1, 4096, 4096)
    assert bf_tiled.dask_data.chunksize == (1, 1, 1, 240, 240)
    assert bf_tiled_custom.dask_data.chunksize == (1, 1, 1, 1024, 1024)
    

    Thanks to @NHPatterson for this addition!

    Other Changes

    The Dimensions object now has a __getitem__.

    img = AICSImage("my_file.tiff")
    img.dims # <Dimensions T:50, C:1, Z: 1, Y: 480, X: 480>
    img.dims["T", "Y"] = (50, 480)
    

    Contributors and Reviewers this Release (alphabetical)

    Jackson Maxfield Brown (@JacksonMaxfield) Ian Hunt-Isaak (@ianhi) Talley Lambert (@tlambert03) Heath Patterson (@NHPatterson) Madison Swain-Bowden (@AetherUnbound) John Russell (@jrussell25) Dan Toloudis (@toloudis)

    Source code(tar.gz)
    Source code(zip)
  • v4.4.0(Oct 12, 2021)

    AICSImageIO 4.4.0

    We are happy to announce the release of AICSImageIO 4.4.0!

    AICSImageIO is a library for image reading, metadata conversion, and image writing for microscopy formats in pure Python. It aims to be able to read microscopy images into a single unified API regardless of size, format, or location, while additionally writing images and converting metadata to a standard common format.

    If you are new to the library, please see our full documentation for always up-to-date usage and a quickstart README.

    Highlights

    Native Python ND2 and DV Support

    This release adds two native Python readers specific to the ND2 and DeltaVision file formats. Additionally, both of these file format readers are licensed under BSD and as such we include them in our normal pip extra install options.

    pip install aicsimageio[nd2,dv]
    
    nd2_img = AICSImage("my-file.nd2")
    dv_img = AICSImage("my-file.dv")
    

    Major thanks to @tlambert03 for both of these additions.

    Contributors and Reviewers this Release (alphabetical)

    Jackson Maxfield Brown (@JacksonMaxfield) Talley Lambert (@tlambert03) Madison Swain-Bowden (@AetherUnbound) Dan Toloudis (@toloudis)

    Source code(tar.gz)
    Source code(zip)
  • v4.3.0(Oct 11, 2021)

    AICSImageIO 4.3.0

    This release has been published to begin the process of managing some of our dependencies and their licenses.

    AICSImageIO is built off of many independent file format readers, each with their own licensing. For many of our supported formats, the library that provides us the capability to read the format is licensed under a permissive license such as MIT or BSD. However, some of our formats are released under GPL licenses. Previously, AICSImageIO has included all of these dependencies in our pip extra install options, and released our package under BSD license. However, after our latest release, we received push-back on this practice and as such, we have begun the process of stripping out the specific installation of GPL licensed dependencies.

    This does not mean that AICSImageIO no longer supports the various file formats covered by GPL license. We still do, however we will no longer provide a pip extra install option for such formats and we will include specific reference to readers that utilize such GPL licenses.

    In this release, the two readers that have had their extra install options removed are:

    • LifReader -- was installed with pip install aicsimageio[lif] but must now be installed with pip install aicsimageio readlif>=0.6.4
    • BioformatsReader -- was installed with pip install aicsimageio[bioformats] but must now be installed with pip install aicsimageio bioformats_jar

    Both readlif and bioformats_jar are completely separate libraries that carry with them their own GPL licenses and as such, if you use either of these readers, be sure to see how your code should now be licensed and add these libraries to your own dependency list because our install option is no longer available.

    Moving forward, we plan to use this same installation pattern for any more GPL licensed file format readers. AICSImageIO will make them generally available, but will document that the downstream user must install both aicsimageio and the supporting file format library independent so that AICSImageIO remains BSD licensed.

    Changelog

    • Support for reading LIF files must now be installed separately due to licensing conflicts. (pip install aicsimagieo readlif>=0.6.4) #332
    • Support for reading Bio-Formats supported files must now be installed separately due to licensing conflicts. (pip install aicsimageio bioformats_jar) #329
    • More detailed error message and documentation on how to configure BioFormats reading. #324
    • Shortened reader import paths for any reader. #326

    To review all changes made in this release please see our full CHANGELOG.

    Contributors and Reviewers this Release (alphabetical)

    Chris Allan (@chris-allan) Sébastien Besson (@sbesson) Jackson Maxfield Brown (@JacksonMaxfield) Talley Lambert (@tlambert03) Josh Moore (@joshmoore) Peter Sobolewski (@psobolewskiPhD) Madison Swain-Bowden (@AetherUnbound) Jason Swedlow (@jrswedlow) Dan Toloudis (@toloudis)

    Source code(tar.gz)
    Source code(zip)
  • v4.2.0(Sep 27, 2021)

    AICSImageIO 4.2.0

    We are happy to announce the release of AICSImageIO 4.2.0!

    AICSImageIO is a library for image reading, metadata conversion, and image writing for microscopy formats in ~pure~ Python. It aims to be able to read microscopy images into a single unified API regardless of size, format, or location, while additionally writing images and converting metadata to a standard common format.

    If you are new to the library, please see our full documentation for always up-to-date usage and a quickstart README.

    Highlights

    Bio-Formats Support

    Breaking with our "reading and writing for microscopy formats in pure Python", and with a massive thanks to @tlambert03, we now support reading any file format supported by Bio-Formats.

    from aicsimageio import AICSImage
    
    nd2_img = AICSImage("my-file.nd2")
    dv_img = AICSImage("my-file.dv")
    oir_img = AICSImage("my-file.oir")
    

    Just like our other readers, to add this additional file format support you will need to install with pip install aicsimageio[bioformats]. Note: ensure that you have the Java executable available on your PATH, or exposed with the JAVA_HOME environment variable. Adding Java to a conda virtual environment can be done with conda install -c conda-forge openjdk.)

    For formats that can be read by both a native Python reader and the Bio-Formats reader, the native Python reader will always take precidence unless it has not been installed. I.e. CZI support can be added with either pip install aicsimageio[czi] or pip install aicsimageio[bioformats], if both are installed, our native Python reader will take precidence. The different readers may result in different pixel and metadata availablity. For full control over this behavior, specify the reader as a parameter.

    from aicsimageio import AICSImage
    from aicsimageio.readers.bioformats_reader import BioformatsReader
    from aicsimageio.readers.czi_reader import CziReader
    
    img_from_native = AICSImage("my-file.czi", reader=CziReader)
    img_from_bf = AICSImage("my-file.czi", reader=BioformatsReader)
    

    Contributing Documentation

    Aren't satisfied with the available options for image reading? Want to contribute to the project? Our updated Contributing documentation has an entire section on adding a new file format reader.

    We look forward to the continued growth of AICSImageIO in the community!

    Experimental CZI-to-OME Metadata

    For those following our experiments into "language agnostic methods for metadata translation and access" we have added experimental support for translating CZI metadata into OME metadata.

    from aicsimageio import AICSImage
    
    img = AICSImage("my-file.czi")
    img.ome_metadata
    

    You can find a comparison between the produced metadata from our XSLT and the produced metadata from Bio-Formats here. This is experimental, it is missing some metadata translations and may raise errors, however if you would like to try out this feature (or the XSLT itself in another language) please let us know how it goes.

    Contributors and Reviewers this Release (alphabetical)

    Matte Bailey (@MatteBailey) Sébastien Besson (@sbesson) Jackson Maxfield Brown (@JacksonMaxfield) Talley Lambert (@tlambert03) Josh Moore (@joshmoore) Madison Swain-Bowden (@AetherUnbound) Dan Toloudis (@toloudis)

    Source code(tar.gz)
    Source code(zip)
  • v4.1.0(Aug 10, 2021)

    AICSImageIO 4.1.0

    This minor release includes:

    • A specification for readers to convert the file format's metadata into the OME metadata model.
    • A utility function to process metadata translation with XSLT.
    • A bugfix to support tifffile>=2021.7.30. This is a breaking change only if you are using img.xarray_data.attrs["unprocessed"] (or any xarray_* variant). It changes the "unprocessed" metadata into a Dict[int , str] rather than a tifffile.TiffTags object.
    • A minor breaking change / bugfix for LIF scale metadata correction. LIF spatial scales should now be accurate.
    • An admin change of being less strict on dependencies so that aicsimageio can be installed in more environments.

    For links to the PRs that produced these changes, see our full CHANGELOG

    Contributors and Reviewers this Release (alphabetical)

    Matte Bailey (@MatteBailey) Jackson Maxfield Brown (@JacksonMaxfield) Madison Swain-Bowden (@AetherUnbound) Dan Toloudis (@toloudis)

    Source code(tar.gz)
    Source code(zip)
  • v4.0.0(Jun 7, 2021)

    AICSImageIO 4.0.0

    We are happy to announce the release of AICSImageIO 4.0.0!

    AICSImageIO is a library for image reading, metadata conversion, and image writing for microscopy formats in pure Python. It aims to be able to read microscopy images into a single unified API regardless of size, format, or location, while additionally writing images and converting metadata to a standard common format.

    A lot has changed and this post will only have the highlights. If you are new to the library, please see our full documentation for always up-to-date usage and a quickstart README.

    Highlights

    Mosaic Tile Stitching

    For certain imaging formats we will stitch together the mosaic tiles stored in the image prior to returning the data. Currently the two formats supported by this functionality are LIF and CZI.

    from aicsimageio import AICSImage
    
    stitched_image = AICSImage("tiled.lif")
    stitched_image.dims  # very large Y and X
    

    If you don't want the tiles to be stitched back together you can turn this functionality off with reconstruct_mosaic=False in the AICSImage object init.

    Xarray

    The entire library now rests on xarray. We store all metadata, coordinate planes, and imaging data all in a single xarray.DataArray object. This allows for not only selecting by indices with the already existing aicsimageio methods: get_image_data and get_image_dask_data, but additionally to select by coordinate planes.

    Mosaic Images and Xarray Together

    A prime example of where xarray can be incredibly powerful for microscopy images is in large mosaic images. For example, instead of selecting by index, with xarray you can select by spatial coordinates:

    from aicsimageio import AICSImage
    
    # Read and stitch together a tiled image
    large_stitched_image = AICSImage("tiled.lif")
    
    # Only load in-memory the first 300x300 micrometers (or whatever unit) in Y and X dimensions
    larged_stitched_image.xarray_dask_data.loc[:, :, :, :300, :300].data.compute()
    

    Writers

    While we are actively working on metadata translation functions, in the meantime we are working on setting ourselves up for the easiest method for format converstion. For now, we have added a simple save function to the AICSImage object that will convert the pixel data and key pieces of metadata to OME-TIFF for all of (or a select set of) scenes in the file.

    from aicsimageio import AICSImage
    
    AICSImage("my_file.czi").save("my_file.ome.tiff")
    

    For users that want greater flexibility and specificity in image writing, we have entirely reworked our writers module and this release contains three writers: TwoDWriter, TimeseriesWriter, and OmeTiffWriter. The objective of this rework was to make n-dimensional image writing much easier, and most importantly, to make metadata attachment as simple as possible. And, we now support multi-scene / multi-image OME-TIFF writing when providing a List[ArrayLike]. See full writer documentation here.

    OME Metadata Validation

    Our OmeTiffReader and OmeTiffWriter now validate the read or produced OME metadata. Thanks to the ome-types library for the heavy lifting, we can now ensure that all metadata produced by this library is valid to the OME specification.

    Better Scene Management

    Over time while working with 3.x, we found that many formats contain a Scene or Image dimension that can be entirely different from the other instances of that dimension in pixel type, channel naming, image shape, etc. To solve this we have changed the AICSImage and Reader objects to statefully manage Scene while all other dimensions are still available.

    In practice, this means on the AICSImage and Reader objects the user no longer receives the Scene dimension back in the data or dimensions properties (or any other related function or property).

    To change scene while operating on a file you can call AICSImage.set_scene(scene_id) while retrieving which scenes are valid by using AICSImage.scenes.

    from aicsimageio import AICSImage
    
    many_scene_img = AICSImage("my_file.ome.tiff")
    many_scene_img.current_scene  # the current operating scene
    many_scene_img.scenes  # returns tuple of available scenes
    many_scene_img.set_scene("Image:2")  # sets the current operating scene to "Image:2"
    

    RGB / BGR Support

    Due to the scene management changes, we no longer use the "S" dimension to represent "Scene". We use it to represent the "Samples" dimension (RGB / BGR) which means we now have an isolated dimension for color data. This is great because it allows us to directly support multi-channel RGB data, where previously we would expand RGB data into channels, even when the file had a channel dimension.

    So if you encounter a file with "S" in the dimensions, you can know that you are working with an RGB file.

    FSSpec Adoption

    Across the board we have adopted fsspec for file handling. With 4.x you can now provide any URI supported by the fsspec library or any implementations of fsspec (s3fs (AWS S3), gcsfs (Google Cloud Storage), adlfs (Azure Data Lake), etc.).

    In many cases, this means we now support direct reading from local or remote data as a base part of our API. As well as preparing us for supporting OME-Zarr!

    from aicsimageio import AICSImage
    
    wb_img = AICSImage("https://www.your-site.com/your-file.ome.tiff")
    s3_img = AICSImage("s3://your-bucket/your-dir/your-file.ome.tiff")
    gs_img = AICSImage("gs://your-bucket/your-dir/your-file.ome.tiff")
    

    To read from remote storage, you must install the related fsspec implementation library. For s3 for example, you must install s3fs.

    Splitting up Dependencies

    To reduce the size of AICSImageIO on fresh installs and to make it easier to manage environments, we have split up dependencies into specific format installations.

    By default, aicsimageio supports TIFF and OME-TIFF reading and writing. If you would like to install support for reading CZI files, you would simply append [czi] to the aicsimageio pip install: pip install aicsimageio[czi]. For multiple formats, you would add them as a comma separated string: pip install aicsimageio[czi,lif]. And to simply install support for reading all format implentations: pip install aicsimageio[all].

    A full list of supported formats can be found here.

    Roadmap and Motivation

    After many discussions with the community we have finally written a roadmap and accompanying documentation for the library. If you are interested, please feel free to read them. Roadmap and Accompanying Documentation

    Full List of Changes

    • Added support for reading all image data (including metadata and coordinate information) into xarray.DataArray objects. This can be accessed with AICSImage.xarray_data, AICSImage.xarray_dask_data, or Reader equivalents. Where possible, we create and attach coordinate planes to the xarray.DataArray objects to support more options for indexed data selection such as timepoint selection by unit of time, or pixel selection by micrometers.
    • Added support for reading multi-channel RGB imaging data utilizing a new Samples (S) dimension. This dimension will only appear in the AICSImage, Reader, and the produced np.ndarray, da.Array, xr.DataArray if present in the file and will be the last dimension, i.e. if provided an RGB image, AICSImage and related object dimensions will be "...YXS", if provided a single sample / greyscale image, AICSImage and related object dimensions will be "...YX". (This change also applies to DefaultReader and PNG, JPG, and similar formats)
    • OmeTiffReader now validates the found XML metadata against the referenced specification. If your file has invalid OME XML, this reader will fail and roll back to the base TiffReader. (In the process of updating this we found many bugs in our 3.x series OmeTiffWriter, our 4.x OmeTiffReader fixes these bugs at read time but that doesn't mean the file contains valid OME XML. It is recommended to upgrade and start using the new and improved, and validated, OmeTiffWriter.)
    • DefaultReader now fully supports reading "many-image" formats such as GIF, MP4, etc.
    • OmeTiffReader.metadata is now returned as the OME object from ome-types. This change additionally removes the vendor.OMEXML object.
    • Dimensions received an overhaul -- when you use AICSImage.dims or Reader.dims you will be returned a Dimensions object. Using this object you can get the native order of the dimensions and each dimensions size through attributes, i.e. AICSImage.dims.X returns the size of the X dimension, AICSImage.dims.order returns the string native order of the dimensions such as "TCZYX". Due to these changes we have removed all size functions and size_{dim} properties from various objects.
    • Replaced function get_physical_pixel_size with attribute physical_pixel_sizes that returns a new PhysicalPixelSizes NamedTuple object. This now allows attribute axis for each physical dimension, i.e. PhysicalPixelSizes.X returns the size of each X dimension pixel. This object can be cast to a base tuple but be aware that we have reversed the order from XYZ to ZYX to match the rest of the library's standard dimension order. Additionally, PhysicalPixelSizes now defaults to (None, None, None) (was (1.0, 1.0, 1.0))as pixel physical size is optional in the OME metadata schema.
    • Replaced parameters named known_dims with dim_order.
    • Replaced function get_channel_names with attribute channel_names.
    • Replaced function dtype with attribute dtype.
    • Renamed the chunk_by_dims parameter on all readers to just chunk_dims.
    • Removed all distributed cluster and client spawning.
    • Removed context manager usage from all objects.

    Contributors and Reviewers this Release (alphabetical)

    Jackson Maxfield Brown (@JacksonMaxfield) Ramón Casero (@rcasero) Julie Cass (@jcass11) Jianxu Chen (@jxchen01) Bryant Chhun (@bryantChhun) Rory Donovan-Maiye (@donovanr) Christoph Gohlke (@cgohlke) Josh Moore (@joshmoore) Sebastian Rhode (@sebi06) Jamie Sherman (@heeler) Madison Swain-Bowden (@AetherUnbound) Dan Toloudis (@toloudis) Matheus Viana (@vianamp)

    Source code(tar.gz)
    Source code(zip)
  • v3.3.0(Sep 9, 2020)

    AICSImageIO 3.3.0

    We are happy to announce the release of AICSImageIO 3.3.0!

    AICSImageIO is a library for delayed parallel image reading, metadata parsing, and image writing for microscopy formats in pure Python. It is built on top of Dask to allow for any size image to act as a normal array as well as allow for distributed reading in parallel on your local machine or an HPC cluster.

    Highlights

    Non-Dask Functions and Properties are Fully In-Memory

    The only change made in this release is to the internal behavior of our API. We found that users were very confused and questioned why certain operations were incredible slow while others were incredibly fast when considering the behaviors together.

    Specifically, why did the following:

    img = AICSImage("my_file.ome.tiff")
    img.data
    my_chunk = img.get_image_data("ZYX", C=1)  # the actual data we want to retrieve
    

    Complete faster than this:

    img = AICSImage("my_file.ome.tiff")
    my_chunk = img.get_image_data("ZYX", C=1)  # the actual data we want to retrieve
    

    (the difference being: preloading the entire image into memory rather than the get_image_data function simply using the delayed array)

    To resolve this we have made an internal change to the behavior of the library that we will hold consistent moving forward. If the word dask is not found in the function or property name when dealing with image data, the entire image will be read into memory in full prior to the function or property completing it's operation.

    * In essence this is simply moving that preload into any of the related functions and properties.

    The end result is that the user should see much faster read times when using get_image_data. If the user was using this function on a too-large-for-memory image, this will result in them having to change over to using get_image_dask_data and call .compute on the returned value.

    Contributors and Reviewers this Release (alphabetical)

    Madison Bowden (@AetherUnbound) Jackson Maxfield Brown (@JacksonMaxfield) Jamie Sherman (@heeler) Dan Toloudis (@toloudis)

    Source code(tar.gz)
    Source code(zip)
  • v3.2.0(May 13, 2020)

    AICSImageIO 3.2.0

    We are happy to announce the release of AICSImageIO 3.2.0!

    AICSImageIO is a library for delayed parallel image reading, metadata parsing, and image writing for microscopy formats in pure Python. It is built on top of Dask to allow for any size image to act as a normal array as well as allow for distributed reading in parallel on your local machine or an HPC cluster.

    Highlights

    LifReader

    We now support reading 6D STCZYX Leica Image Files (LIF) and their metadata. Like all readers, this is implemented in a way that can be used to read and interact with any size file.

    from aicsimageio import AICSImage, readers, imread
    img = AICSImage("my_file.lif")
    img = readers.LifReader("my_file.lif")
    data = imread("my_file.lif")
    

    Optimized Readers

    After releasing v3.1.0, we noticed that our single threaded full image read performance wasn't as fast as the base file readers or similar microscopy file readers (czifile, tifffile, imageio, etc.) and set about resolving and optimizing our readers.

    We are happy to report that in release v3.2.0 we now have comparable single threaded performance to similar libraries. And, like before, single threaded reading, regardless of library is beaten out when using a distributed cluster for parallel reading.

    aicsimageio read time benchmarks

    See our documentation on benchmarks for more information.

    napari-aicsimageio

    We were so excited for napari's 0.3.0 release that we may have made a plugin early. If you haven't seen it, napari-aicsimageio has also been released!

    pip install napari-aicsimageio

    By simply installing the plugin you get both a delayed and in-memory version of aicsimageio to use in napari so you get all the benefits of aicsimageio in the wonderful application that is napari.

    Other Additions and Changes

    • Allow sequences and iterables to be passed to AICSImage.get_image_data and related functions
    from aicsimageio import AICSImage
    
    img = AICSImage("my_file.czi")
    data = img.get_image_data("CZYX", S=0, T=0, Z=slice(0, -1, 5))  # get every fifth Z slice
    data = img.get_image_data("CZYX", S=0, T=0, Z=[0, -1])  # get first and last Z slices
    
    • Fix written out OME metadata to support loading in ZEN
    • Various package maintenance tasks
      • Convert package to use Black formatting
      • Update PR template for easier introduction to contributing
      • Move test resources to S3

    Contributors and Reviewers this Release (alphabetical)

    Madison Bowden (@AetherUnbound) Jackson Maxfield Brown (@JacksonMaxfield) Jamie Sherman (@heeler) Dan Toloudis (@toloudis)

    Source code(tar.gz)
    Source code(zip)
  • v3.1.0(Feb 3, 2020)

    To support large file reading and parallel image processing, we have converted all image readers over to using dask for data management.

    What this means for the user:

    • No breaking changes when using the 3.0.* API (AICSImage.data, AICSImage.get_image_data, imread) all still return full image file reads back as numpy.ndarray.
    • New properties and functions for dask specific handling (AICSImage.dask_data, AICSImage.get_image_dask_data, imread_dask) return delayed dask arrays (dask.array.core.Array)
    • When using either the dask properties and functions, data will not be read until requested. If you want just the first channel of an image AICSImage.get_image_dask_data("STZYX", C=0) will only read and return a five dimensional dask array instead of reading the entire image and then selecting the data down.

    A single breaking change:

    • We no longer support handing in file pointers or buffers.

    If you want multiple workers to read or process the image, the context manager for AICSImage and all Reader classes now spawns or connects to a Dask cluster and client for the duration of the context manager. If you want to keep it open for longer than a single image, use the context manager exposed from dask_utils.cluster_and_client.

    Extras: napari has been directly added as an "interactive" dependency and if installed, the AICSImage.view_napari function is available for use. This function will launch a napari viewer with some default settings that we find to be good for viewing the data that aicsimageio generally interacts with.

    Source code(tar.gz)
    Source code(zip)
Owner
Allen Institute for Cell Science - Modeling
Allen Institute for Cell Science - Modeling
An add to make adding screenshots and copied images to the scene easy

Blender Clipboard to Scene It doesn't work with version 2.93 and higher (I tested it on 2.91 and 2.83) There is an issue with importing the Pillow mod

Mohammad Mehdi Afkhami 3 Dec 29, 2021
Graphical tool to make photo collage posters

PhotoCollage Graphical tool to make photo collage posters PhotoCollage allows you to create photo collage posters. It assembles the input photographs

Adrien Vergé 350 Jan 02, 2023
With this simple py script you will be able to get all the .png from a folder and generate a yml for Oraxen

Oraxen-item-to-yml With this simple py script you will be able to get all the .png from a folder and generate a yml for Oraxen How to use Install the

Akex 1 Dec 29, 2021
A Toolbox for Image Feature Matching and Evaluations

This is a toolbox repository to help evaluate various methods that perform image matching from a pair of images.

Qunjie Zhou 342 Dec 29, 2022
Gallery written in Python to manage your photos

GalleryMan Gallery written in Python to manage your photos Installation

Asian Cat 24 Dec 18, 2022
A small Python module for BMP image processing.

micropython-microbmp A small Python module for BMP image processing. It supports BMP image of 1/2/4/8/24-bit colour depth. Loading supports compressio

Quan Lin 4 Nov 02, 2022
Python Script to generate posters out of the images in directory.

Poster-Maker Python Script to generate posters out of the images in directory. This version is very basic ligthweight code to combine organize images

1 Feb 02, 2022
HtmlWebShot - A python3 package which Can Create Images From url, Html-CSS, Svg and from any readable file and texts with many setup features.

A python3 package which Can Create Images From url, Html-CSS, Svg and from any readable file and texts with many setup features

Danish 24 Dec 14, 2022
Seeks to remove text from an image in a convincing way.

Text-Removal This is a Computer Vision project that seeks to successfully remove text from an image by covering the text areas in a convincing way. He

6 Nov 22, 2022
A Python package implementing various HDRI / Radiance image processing algorithms.

Colour - HDRI A Python package implementing various HDRI / Radiance image processing algorithms. It is open source and freely available under the New

colour-science 111 Dec 06, 2022
A 3D structural engineering finite element library for Python.

An easy to use elastic 3D structural engineering finite element analysis library for Python.

Craig 220 Dec 27, 2022
This will help to read QR codes using Raspberry Pi and Pi Camera

Raspberry-Pi-Generate-and-Read-QR-code This will help to read QR codes using Raspberry Pi and Pi Camera Install the required libraries first in your T

Raspberry_Pi Pakistan 2 Nov 06, 2021
QR Generator using GUI with Tinker

BinCat Token System Very simple python script with GUI that generates QR codes. It don't include a QR "decription" tool. It only generate-it and thats

Hipotesi 1 Nov 06, 2021
clesperanto is a graphical user interface for GPU-accelerated image processing.

clesperanto is a graphical user interface for a multi-platform multi-language framework for GPU-accelerated image processing. It is based on napari and the pyclesperanto-prototype.

1 Jan 02, 2022
An open source image editor which can manipulate an image in many ways!

Image Editor - An open source image editor which can manipulate an image in many ways! If you need any more modes in repo or I

TroJanzHEX 44 Nov 17, 2022
New program to export a Blender model to the LBA2 model format.

LBA2 Blender to Model 2 This is a new program to export a Blender model to the LBA2 model format. This is also the first publicly released version of

2 Nov 30, 2022
Convert the SVG code to PNG and replace the line by a call to the image in markdown

Convert the SVG code to PNG and replace the line by a call to the image in markdown

6 Sep 06, 2022
Image Compression GUI APP Python: PyQt5

Image Compression GUI APP Image Compression GUI APP Python: PyQt5 Use : f5 or debug or simply run it on your ids(vscode , pycham, anaconda etc.) socia

Sourabh Dhalia 1 May 21, 2022
ImageStrike是一款用于CTF中图片隐写的综合利用工具

🎈 简介 ImageStrike是一款使用PyQT5开发,用于CTF中图片隐写的综合利用工具

zR00t1 133 Dec 27, 2022
A drop-in replacement for django's ImageField that provides a flexible, intuitive and easily-extensible interface for quickly creating new images from the one assigned to the field.

django-versatileimagefield A drop-in replacement for django's ImageField that provides a flexible, intuitive and easily-extensible interface for creat

Jonathan Ellenberger 490 Dec 13, 2022