pyXenium.multimodal.HistoSegLazySlideConfig#

class HistoSegLazySlideConfig(output_dir=None, contour_key='histoseg_structures', contour_geojson=None, contour_id_key='polygon_id', contour_coordinate_space='xenium_pixel', contour_pixel_size_um=None, he_image_key='he', he_source_path=None, wsi_reader=None, slide_mpp=None, model='plip', text_model=None, text_terms=<factory>, prompt_set_name='breast_histology_v1', prompt_source='manual exploratory prompt set', prompt_review_status='not pathologist-confirmed', relative_prompt_axes=<factory>, tile_px=224, mpp=0.5, device='cuda', amp=True, batch_size=64, max_tiles=None, table_format='csv', include_rna=True, include_wta_programs=True, include_boundary_programs=True, include_prediction_benchmark=True, wta_program_library='breast_tme_wta_v1', program_library='tumor_boundary_v1', rna_markers=<factory>)#

Bases: object

Configuration for HistoSeg-anchored LazySlide image feature analysis.

Parameters:
  • output_dir (str | Path | None)

  • contour_key (str)

  • contour_geojson (str | Path | None)

  • contour_id_key (str)

  • contour_coordinate_space (str)

  • contour_pixel_size_um (float | None)

  • he_image_key (str)

  • he_source_path (str | Path | None)

  • wsi_reader (str | None)

  • slide_mpp (float | None)

  • model (str)

  • text_model (str | None)

  • text_terms (tuple[str, ...])

  • prompt_set_name (str)

  • prompt_source (str)

  • prompt_review_status (str)

  • relative_prompt_axes (tuple[tuple[str, str, str], ...])

  • tile_px (int)

  • mpp (float)

  • device (str)

  • amp (bool)

  • batch_size (int)

  • max_tiles (int | None)

  • table_format (Literal['csv', 'parquet'])

  • include_rna (bool)

  • include_wta_programs (bool)

  • include_boundary_programs (bool)

  • include_prediction_benchmark (bool)

  • wta_program_library (str)

  • program_library (str)

  • rna_markers (tuple[str, ...])

__init__(output_dir=None, contour_key='histoseg_structures', contour_geojson=None, contour_id_key='polygon_id', contour_coordinate_space='xenium_pixel', contour_pixel_size_um=None, he_image_key='he', he_source_path=None, wsi_reader=None, slide_mpp=None, model='plip', text_model=None, text_terms=<factory>, prompt_set_name='breast_histology_v1', prompt_source='manual exploratory prompt set', prompt_review_status='not pathologist-confirmed', relative_prompt_axes=<factory>, tile_px=224, mpp=0.5, device='cuda', amp=True, batch_size=64, max_tiles=None, table_format='csv', include_rna=True, include_wta_programs=True, include_boundary_programs=True, include_prediction_benchmark=True, wta_program_library='breast_tme_wta_v1', program_library='tumor_boundary_v1', rna_markers=<factory>)#
Parameters:
  • output_dir (str | Path | None)

  • contour_key (str)

  • contour_geojson (str | Path | None)

  • contour_id_key (str)

  • contour_coordinate_space (str)

  • contour_pixel_size_um (float | None)

  • he_image_key (str)

  • he_source_path (str | Path | None)

  • wsi_reader (str | None)

  • slide_mpp (float | None)

  • model (str)

  • text_model (str | None)

  • text_terms (tuple[str, ...])

  • prompt_set_name (str)

  • prompt_source (str)

  • prompt_review_status (str)

  • relative_prompt_axes (tuple[tuple[str, str, str], ...])

  • tile_px (int)

  • mpp (float)

  • device (str)

  • amp (bool)

  • batch_size (int)

  • max_tiles (int | None)

  • table_format (Literal['csv', 'parquet'])

  • include_rna (bool)

  • include_wta_programs (bool)

  • include_boundary_programs (bool)

  • include_prediction_benchmark (bool)

  • wta_program_library (str)

  • program_library (str)

  • rna_markers (tuple[str, ...])

Return type:

None

Methods

__init__([output_dir, contour_key, ...])

to_dict()

Attributes

output_dir: str | Path | None = None#
contour_key: str = 'histoseg_structures'#
contour_geojson: str | Path | None = None#
contour_id_key: str = 'polygon_id'#
contour_coordinate_space: str = 'xenium_pixel'#
contour_pixel_size_um: float | None = None#
he_image_key: str = 'he'#
he_source_path: str | Path | None = None#
wsi_reader: str | None = None#
slide_mpp: float | None = None#
model: str = 'plip'#
text_model: str | None = None#
text_terms: tuple[str, ...]#
prompt_set_name: str = 'breast_histology_v1'#
prompt_source: str = 'manual exploratory prompt set'#
prompt_review_status: str = 'not pathologist-confirmed'#
relative_prompt_axes: tuple[tuple[str, str, str], ...]#
tile_px: int = 224#
mpp: float = 0.5#
device: str = 'cuda'#
amp: bool = True#
batch_size: int = 64#
max_tiles: int | None = None#
table_format: Literal['csv', 'parquet'] = 'csv'#
include_rna: bool = True#
include_wta_programs: bool = True#
include_boundary_programs: bool = True#
include_prediction_benchmark: bool = True#
wta_program_library: str = 'breast_tme_wta_v1'#
program_library: str = 'tumor_boundary_v1'#
rna_markers: tuple[str, ...]#
to_dict()#
Return type:

dict[str, Any]