| |
- format_time(secs)
- human_readable(number)
- lfsr(value, bounds)
- load(path, composite=None, constraints=True, images_file=None, **kwargs)
- Loads a CompositeImage instance and any additional CompositeSet instances
saved to a json file with load()
Args:
path (str or io.IOBase): The path or file object to read the json from
constraints (bool, default True): Whether to load any ConstraintSet instances
If False, any constraint sets saved in the file are ignored
images_file (str or io.IOBase): path or file object to load images from
Where images will be read from, using tifffile.imread
**kwargs: Extra arguments that are passed to CompositeImage()
Returns:
composite (CompositeImage): The composite read from the file
*constraints (ConstraintSet): Any ConstraintSet instances that
were saved with the composite.
- log_env(debug, progress)
- memory_report()
- parity(x)
- percent_normalize(image, percent=0.1)
- save(path, composite, *constraint_sets, save_images=False, images_file=None)
- Saves a CompositeImage and any number of ConstraintSet instances
containing constraints from the composite to a json file. All objects passed to this method
can be restored with a call to load()
Args:
path (str or io.IOBase): The path or file object to save to
composite (CompositeImage): The composite to be saved
*constraint_sets (ConstraintSet): Any ConstraintSets to be saved along with the composite.
These sets must contain constraints from the passed in composite.
save_images (bool): If True, or if images_file is specified, the images in the composite are saved using tifffile.imwrite
to the path or file object images_file
images_file (str or io.IOBase): The path or file object to save the composite images to
This defaults to path + '.tif'.
- simple_progress(iterable, total=None)
- standardize_format(image, expected_dims)
- Converts an input image into the format
expected, this being:
(width, height), (channels, width, height), (cycle, channels, width, height)
depending on the expected_dims.
- to_rgb8(image, percent_norm=0.1, colormap=None)
|