Skip to main content

DicomAnnotationData Objects

multiframe_frame_number

only present for multi-frame DICOMs

CocoExporter Objects

This class is intentionally designed in a modular fashion to facilitate extensibility. You are encouraged to subclass this exporter and modify any of the custom functions. While return types are provided for convenience, they can also be subclassed to suit your specific requirements. All functions that could be static are intentionally not made static, allowing you the option to access the self object at any time.

get_categories

This does not translate classifications as they are not part of the Coco spec.

get_images

All the data is in the specific label_row

get_polyline

Polylines are technically not supported in COCO, but here we use a trick to allow a representation.

join_polyline_from_polygon

Essentially a trick to represent a polyline in coco. We pretend for this to be a polygon and join every coordinate from the end back to the beginning, so it will essentially be an area-less polygon. This function technically changes the input polygon in place.

add_unselected_attributes

Attributes which have never been selected will not show up in the actions map. They will need to be added separately. NOTE: this assumes uniqueness of features. Quite an edge case but if it ever comes up it needs to be solved somewhere here.