tmas.src.input_validation ========================= .. py:module:: tmas.src.input_validation Module Contents --------------- .. py:function:: is_image_file(file_path: str, plate_design: Dict[str, Any]) -> bool Check if the provided file path is a valid image file based on several criteria. This function verifies whether a given file is a valid image file by checking: 1. The file extension to ensure it is an image format (e.g., .png, .jpg, .jpeg). 2. The presence of 'raw' or 'filtered' in the filename to ensure it matches expected naming conventions. 3. The existence of the plate design type extracted from the image name in the provided plate design dictionary. :param file_path: The full path to the file being checked. :type file_path: str :param plate_design: A dictionary representing the plate design loaded from a JSON file, containing design types and related information. :type plate_design: Dict[str, Any] :return: Returns True if the file is a valid image, contains 'raw' or 'filtered' in the filename, and the plate design type exists in the plate design dictionary. Returns False otherwise. :rtype: bool