> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bioptimus.com/llms.txt
> Use this file to discover all available pages before exploring further.

# bioptimus.io.wsi.metadata

> WSI Metadata Properties Module.

WSI Metadata Properties Module.

This module defines the schema and container for metadata extracted from Whole Slide Images (WSI). It provides a unified structure for handling physical, optical, and structural properties across different scanner vendors and file formats.

## WSIProps

```python theme={null}
@dataclass(frozen=True)
class WSIProps()
```

Whole Slide Image (WSI) properties container.

This class stores essential metadata required for WSI processing pipelines. It supports attribute access and dictionary-style key-based lookup with an automated fallback to raw vendor metadata.

<ParamField body="DIMENSIONS" type="WSIDims ">
  Full slide width and height.
</ParamField>

<ParamField body="BOUNDS" type="WSIBounds ">
  The tissue-containing region of the slide.
</ParamField>

<ParamField body="LEVELS" type="int | None">
  The number of resolution levels in the pyramid.
</ParamField>

<ParamField body="MPP_X" type="MPP | None">
  Microns per pixel in the X dimension.
</ParamField>

<ParamField body="MPP_Y" type="MPP | None">
  Microns per pixel in the Y dimension.
</ParamField>

<ParamField body="OBJECTIVE_POWER" type="Magnification | None">
  The magnification power of the objective lens.
</ParamField>

<ParamField body="VENDOR" type="str | None">
  The name of the scanner vendor or backend.
</ParamField>

<ParamField body="FILE_PATH" type="Path">
  The filesystem path to the slide file.
</ParamField>

<ParamField body="RAW" type="dict[str, Any] | None">
  A dictionary containing all unprocessed metadata from the slide.
</ParamField>

**Example**:

```pycon theme={null}
>>> dims = WSIDims(50000, 30000)
>>> props = WSIProps(DIMENSIONS=dims, VENDOR="Hamamatsu")
>>> print(props.DIMENSIONS.width)
50000
>>> print(props["VENDOR"])
'Hamamatsu'
```
