mapreader.load.loader
Functions
|
Creates a |
|
Creates a |
Module Contents
- mapreader.load.loader.loader(path_images=None, tree_level='parent', parent_path=None, **kwargs)
Creates a
MapImagesclass to manage a collection of image paths and construct image objects.- Parameters:
path_images (str or None, optional) – Path to the directory containing images (accepts wildcards). By default,
Nonetree_level (str, optional) – Level of the image hierarchy to construct. The value can be
"parent"(default) and"patch".parent_path (str, optional) – Path to parent images (if applicable), by default
None.**kwargs (dict, optional) – Additional keyword arguments to be passed to the
_images_constructor()method.
- Returns:
The
MapImagesclass which can manage a collection of image paths and construct image objects.- Return type:
Notes
This is a wrapper method. See the documentation of the
MapImagesclass for more detail.
- mapreader.load.loader.load_patches(patch_paths, patch_file_ext=False, parent_paths=False, parent_file_ext=False, add_geo_info=False, clear_images=False)
Creates a
MapImagesclass to manage a collection of image paths and construct image objects. Then loads patch images from the given paths and adds them to theimagesdictionary in theMapImagesinstance.- Parameters:
patch_paths (str) –
The file path of the patches to be loaded.
Note: The ``patch_paths`` parameter accepts wildcards.
patch_file_ext (str or bool, optional) – The file extension of the patches, ignored if file extensions are specified in
patch_paths(e.g. with"./path/to/dir/*png") By defaultFalse.parent_paths (str or bool, optional) –
The file path of the parent images to be loaded. If set to
False, no parents are loaded. Default isFalse.Note: The ``parent_paths`` parameter accepts wildcards.
parent_file_ext (str or bool, optional) – The file extension of the parent images, ignored if file extensions are specified in
parent_paths(e.g. with"./path/to/dir/*png") By defaultFalse.add_geo_info (bool, optional) – If
True, adds geographic information to the parent image. Default isFalse.clear_images (bool, optional) – If
True, clears the images from theimagesdictionary before loading. Default isFalse.
- Returns:
The
MapImagesclass which can manage a collection of image paths and construct image objects.- Return type:
Notes
This is a wrapper method. See the documentation of the
MapImagesclass for more detail.This function in particular, also calls the
load_patches()method. Please see the documentation for that method for more information as well.