from pathlib import Path


def get_imgs(path, img_type="tif", search=""):
    """Get all images below path.

    Parameters
    ----------
    path : string
        Path to directory where to search for images.
    img_type : string
        A string representing the image file type extension.
    path : string
        A glob pattern string to use in the search.

    Returns
    -------
    list
        Return paths of all images found.
    """
    root = Path(path)
    _path = Path("")
    if search:
        search = f"{search}*"
    patterns = ["slide", "chamber--", "field--", "image--"]
    for pattern in patterns:
        if pattern not in path:
            _path = _path / f"{pattern}*"
    return list(root.glob(f"{_path}{search}.{img_type}"))