region

class itom.region

Bases: builtins.object

region([x, y, w, h [,type=region.RECTANGLE]]) -> creates a rectangular or elliptical region.

This class is a wrapper for the class QRegion of Qt. It provides possibilities for creating pixel-based regions. Furtherone you can calculate new regions based on the intersection, union or subtraction of other regions. Based on the region it is possible to get a uint8 masked dataObject, where every point within the entire region has the value 255 and all other values 0

Parameters:

x : {int}

x-coordinate of the reference corner of the region

y : {int}

y-coordinate of the reference corner of the region

w : {int}

width of the region

h : {int}

height of the region

type : {int}, optional

region.RECTANGLE creates a rectangular region (default). region.ELLIPSE creates an elliptical region, which is placed inside of the given boundaries.

Notes

It is also possible to create an empty instance of the region.

Previous topic

polygonMesh

Next topic

rgba

This Page