livecellx.core.datasets.LiveCellImageDataset.get_img_by_url
- LiveCellImageDataset.get_img_by_url(url_str, exact_match=False, return_path_and_time=False, ignore_missing=False)[source]
Returns the image corresponding to the given URL string.
- Args:
url_str (str): The URL string to search for. exact_match (bool): If True, only exact matches will be considered. Otherwise, substring matches will also be considered. return_path_and_time (bool): If True, the function will return a tuple containing the image, URL string, and time. Otherwise, only the image will be returned. ignore_missing (bool): If True, the function will return None if the URL string is not found. Otherwise, a ValueError will be raised.
- Returns:
If return_path_and_time is True, a tuple containing the image, URL string, and time. Otherwise, only the image will be returned.
- Raises:
ValueError: If the URL string is not found and ignore_missing is False, or if multiple URLs match the given string and exact_match is True.