Skip to content

modosaic.image.generator

modosaic.image.generator

SourceImageGenerator

Bases: ModalityGenerator[bytes]

Generator that forwards the source image bytes unchanged.

generate

generate(record)

Return the encoded image bytes from the input record.

Source code in modosaic/image/generator.py
13
14
15
16
17
@override
def generate(self, record: ImageRecord) -> bytes:
    """Return the encoded image bytes from the input record."""
    logger.debug(f"Using source image for record sample {record.sample_id}")
    return record.image_bytes