gobjio

GOBJ file format.

This module implements support for reading of GOBJ files.

class gobjio.EGObjMode(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
class gobjio.EGObjType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
class gobjio.GObjBase

Abstract base class for GOBJs.

class gobjio.GObjCommonStruct(cx: int, cy: int, posz: int, w: int, h: int, angle_mdeg: int, mode: gobjio.EGObjMode, data_length: int)
class gobjio.GObjCompressedContour(common: GObjCommonStruct, compressed_header: GObjCompressedContourHeaderStruct, xy: bytes)

A compressed GOBJ contour.

get_coordinates() List[Tuple[float, float]]

Gets a list of XY pixel coordinates.

class gobjio.GObjCompressedContourHeaderStruct(ow: float, oh: float, sw: float, sh: float, xstart: int, ystart: int, nr_of_elements: int, xy_count: int)
class gobjio.GObjEllipse(common: GObjCommonStruct)

An ellipse GOBJ contour.

class gobjio.GObjFile(header: GObjHeaderStruct, layers: List[GObjBase])

A GOBJ file.

class gobjio.GObjHeaderStruct(check: bytes, data_type: int, nr_of_bytes: int, nr_of_blocks: int, patient_index: int, scanner_id: int, creation_date_local_vms: int, dimx_p: int, dimy_p: int, dimz_p: int, dimx_um: int, dimy_um: int, dimz_um: int, slice_increment_um: int, slice_1_pos_um: int, nr_of_gobj: int, original_filename: bytes, name: bytes, default_eval: int, hext_offset: int, data_offset: int)
class gobjio.GObjParent(common: GObjCommonStruct, transform: GObjParentTransformStruct, children: List[GObjBase])

A GOBJ parent layer.

class gobjio.GObjParentTransformStruct(ow: float, oh: float, sw: float, sh: float)
class gobjio.GObjReader(filename: str)

Reads a GOBJ file.

class gobjio.GObjRectangle(common: GObjCommonStruct)

A rectangle GOBJ contour.