wsiprocess.annotationparser

wsiprocess.annotationparser.ASAP_parser

class wsiprocess.annotationparser.ASAP_parser.AnnotationParser(path)

Annotation Parser for ASAP.

Parameters:path (str) – Path to the annotation file.
path

Path to the annotation file.

Type:str
annotations

List of etree Elements.

Type:list
annotation_groups

List of etree Elements.

Type:list
classes

List of classes defined with ASAP.

Type:list
mask_coords

Coordinates of the masks.

Type:dict
read_mask_coord(cls)

Parse the coordinates of the mask.

Parameters:cls (str) – Target annotation class name.
read_mask_coords()

Parse coordinates of of the masks of all classes.

wsiprocess.annotationparser.parser_utils

wsiprocess.annotationparser.parser_utils.detect_type(path)

Detect the type of input file.

Returns:One of {“ASAP”, “WSIDissector”, “Empty”}
Return type:file_type (str)

wsiprocess.annotationparser.wsidissector_parser

class wsiprocess.annotationparser.wsidissector_parser.AnnotationParser(path)

Annotation parser for WSIDissector

Parameters:path (str) – Path to the annotation file.
path

Path to the annotation file.

Type:str
annotation

Annotation data loaded as json file.

Type:dict
filename

Name of the targeted whole slide image file.

Type:str
classes

List of the names of the classes.

Type:list
mask_coords

Coordinates of the masks.

Type:dict
read_mask_coords()

Parse the coordinates of masks.