pyXenium.io.XeniumImage#

class XeniumImage(levels: 'list[Any]', axes: 'str', dtype: 'str', source_path: 'str', transform_kind: 'str' = 'affine', image_to_xenium_affine: 'list[list[float]] | None' = None, alignment_csv_path: 'str | None' = None, pixel_size_um: 'float | None' = None, keypoints_validation: 'dict[str, Any] | None'=None, metadata: 'dict[str, Any]'=<factory>)#

Bases: object

Parameters:
__init__(levels, axes, dtype, source_path, transform_kind='affine', image_to_xenium_affine=None, alignment_csv_path=None, pixel_size_um=None, keypoints_validation=None, metadata=<factory>)#
Parameters:
Return type:

None

Methods

__init__(levels, axes, dtype, source_path[, ...])

image_xy_to_xenium_pixel_xy(image_xy)

image_xy_to_xenium_um_xy(image_xy)

infer_level_downsamples(*[, rtol, atol])

level_chunk_shapes()

multiscale_shapes()

to_numpy_levels()

transform_metadata()

wsi_diagnostics(*[, image_key, canonical_source])

xenium_pixel_xy_to_image_xy(xenium_pixel_xy)

xenium_um_to_image_xy(xenium_um_xy)

Attributes

levels: list[Any]#
axes: str#
dtype: str#
source_path: str#
transform_kind: str = 'affine'#
image_to_xenium_affine: list[list[float]] | None = None#
alignment_csv_path: str | None = None#
pixel_size_um: float | None = None#
keypoints_validation: dict[str, Any] | None = None#
metadata: dict[str, Any]#
multiscale_shapes()#
Return type:

list[tuple[int, …]]

to_numpy_levels()#
Return type:

list[ndarray]

level_chunk_shapes()#
Return type:

list[tuple[int, …] | None]

infer_level_downsamples(*, rtol=WSI_LEVEL_DOWNSAMPLE_RTOL, atol=WSI_LEVEL_DOWNSAMPLE_ATOL)#
Parameters:
Return type:

tuple[list[float] | None, list[str]]

wsi_diagnostics(*, image_key='he', canonical_source='internal_slide_store')#
Parameters:
  • image_key (str)

  • canonical_source (str)

Return type:

dict[str, Any]

transform_metadata()#
Return type:

dict[str, Any]

image_xy_to_xenium_pixel_xy(image_xy)#
Parameters:

image_xy (Any)

Return type:

ndarray

xenium_pixel_xy_to_image_xy(xenium_pixel_xy)#
Parameters:

xenium_pixel_xy (Any)

Return type:

ndarray

image_xy_to_xenium_um_xy(image_xy)#
Parameters:

image_xy (Any)

Return type:

ndarray

xenium_um_to_image_xy(xenium_um_xy)#
Parameters:

xenium_um_xy (Any)

Return type:

ndarray