objects module

class gensei.objects.Objects(names=None, objs=None, is_placed=False)
format_intersection_statistics(is_output=False)
format_statistics()
static from_conf(conf, box)
init_counts(count)
If count is a number, split it evenly among object classes.
init_section_based_data(axis=None)
The section based data are stored per axis and object class as follows: {axis : {obj_class : value, ...}, ...}
place_objects(box, options)
Generate non-intersecting objects fully contained in the specimen’s block.
report(filename)
update_section_based_data(mask, shape, axis, delta, islice, coor, obj)

Estimate volume and surface of object classes from their sections. WARNING: Surface estimation is very crude!

Parameters:

mask : bool array

Slice mask, True where the object inside is.

shape : tuple

Real 2D shape of the mask.

axis : ‘x’, ‘y’ or ‘z’

Axis perpendicular to the slices.

delta : float

Slice distance.

islice : int

Index of the section.

coor : float

Coordinate of the section along the axis.

obj : str

Geometrical object.

gensei.objects.reduce_to_fit(obj_conf, box)
Adjusts obj_conf parameters of object so that the circumscribed sphere radius fits in the box.

Next topic

single_object module

This Page