modosaic.core.record¶
modosaic.core.record ¶
ImageRecord
dataclass
¶
ImageRecord(sample_id, image_bytes, extension='.bin', metadata=dict())
Image sample exchanged between dataset providers and modalities.
Attributes:
| Name | Type | Description |
|---|---|---|
sample_id |
str
|
Stable identifier for the sample inside the dataset. |
image_bytes |
bytes
|
Encoded image bytes as read from the source backend. |
extension |
str
|
Normalized image extension used when saving artifacts. |
metadata |
Mapping[str, Any]
|
Backend-specific metadata associated with the sample. |
filename
property
¶
filename
Return a filesystem-safe filename for the sample.
Returns:
| Type | Description |
|---|---|
str
|
The sanitized sample identifier with a normalized extension. |