Class Slide

class slideio.Slide(path: str, driver: str)

Slide class represents slides, normally a single image file or a folder. Slide contains a collection of scenes - separate images.

close()

Release the underlying C++ slide object.

property file_path

Returns path to the slide file/folder

get_aux_image(image_name)

Get auxiliary image as Scene object.

Parameters:

image_name – name of the auxiliary image

get_aux_image_names()

Get list of auxiliary image names

get_aux_image_raster(image_name, size=(0, 0), channel_indices=None)

Get auxiliary image as numpy array.

Parameters:
  • image_name – name of the auxiliary image

  • channel_indices – array of channel indices to be retrieved. None or [] - all channels.

  • size – size of the block after rescaling. (0,0) - no scaling.

get_scene(index)

Return slide scene by index

get_scene_by_name(name)

Return slide scene by name

property metadata

Slide metadata as a tree of dictionaries, lists and scalar values.

property metadata_format: str

Format of the slide metadata

property num_aux_images

Number of auxiliary images of the slide.

property num_scenes: int

Number of scenes in the slide

property raw_metadata: str

Raw metadata extracted from the slide