phenotypic.sdk_.read_image_record#

phenotypic.sdk_.read_image_record(output_dir: Path, dataset: str, image_stem: str) dict[str, object] | None[source]#

Return one image’s record, or None when it cannot be read.

Every failure returns None rather than raising – INV-VERDICT’s degrade half: an unreadable record must make an image look less finished, never make a caller explode. A truncated file, a JSON array where an object belongs, and an absent file are all the same answer, because a caller that must distinguish them is asking the wrong question of this function.

Parameters:
  • output_dir (Path) – Run output root.

  • dataset (str) – Dataset name.

  • image_stem (str) – Source image stem.

Returns:

The record as a mapping, or None.

Return type:

dict[str, object] | None