jicbioimage.core.io

Module for reading and writing images.

class jicbioimage.core.io.AutoName[source]

Class for generating output file names automatically.

directory = None

Output directory to save images to.

classmethod name(func)[source]

Return auto generated file name.

namespace = ''

Image file namespace.

classmethod prefix()[source]

Return auto generated file prefix.

prefix_format = '{:d}_'

Image file prefix format.

class jicbioimage.core.io.AutoWrite[source]

Class for writing images automatically.

on = True

Whether or not auto writing of images is enabled.

class jicbioimage.core.io.BFConvertWrapper(backend)[source]

Class for unpacking microscopy files using bfconvert.

already_converted(fpath)[source]

Return true if the file already has a manifest file in the backend.

Parameters:fpath – potential path to the manifest file
Returns:bool
manifest(entry)[source]

Returns manifest as a list.

Parameters:entryjicbioimage.core.io.FileBackend.Entry
Returns:jicbioimage.core.io.Manifest
metadata_from_fname(fname, md5_hexdigest)[source]

Return meta data extracted from file name.

Parameters:fname – metadata file name
Returns:dictionary with meta data required by
run_command(input_file, output_dir=None)[source]

Return the command for running bfconvert as a list.

Parameters:
  • input_file – path to microscopy image to be converted
  • ouput_dir – directory to write output tiff files to
Returns:

list

split_pattern(win32=False)[source]

Pattern used to split the input file.

class jicbioimage.core.io.DataManager(backend=None)[source]

Manage jicbioimage.core.image.ImageCollection instances.

load(fpath)[source]

Load a microscopy file.

Parameters:fpath – path to microscopy file
class jicbioimage.core.io.FileBackend(directory)[source]

Class for storing image files.

class Entry(base_dir, fpath)[source]

Class representing a backend entry.

directory

Where the images are stored.

FileBackend.directory

Where the entries are stored.

FileBackend.new_entry(fpath)[source]

Return a new entry; to be populated with images.

Parameters:fpath – path to microscopy image
Returns:jiciimagelib.image.FileBackend.Entry instance
class jicbioimage.core.io.Manifest[source]

Class for generating backend entry manifest files.

add(filename, **kwargs)[source]

Add an entry to the manifest.

Parameters:
  • filename – relative path to image
  • kwargs – custom parameters, e.g. series, channel, zslice
Returns:

the added entry

json

Return json representation.