![]() |
IDS peak ICV v1.2.0
|

Public Member Functions | |
| Region | create_from_points (cls, Union[PointArray, npt.NDArray[np.int_]] points) |
| Creates a region from points. | |
| Region | create_from_rectangle (cls, Rectangle rect) |
| Creates a Region from a Rectangle. | |
| None | __init__ (self, *Any args, **Any kwargs) |
| In order to create an empty Region create it with no arguments, in all other cases please refer to the classmethods. | |
| bool | __eq__ (self, object other) |
| Check if two regions are equal. | |
| bool | __ne__ (self, object other) |
| Check if two regions are not equal. | |
| PointArray | points (self) |
| Get the points of the region. | |
| RegionArray | connected_components (self) |
| Calculate the connected components of the region. | |
| int | area (self) |
| Calculate the area of the region. | |
| Point | center_of_gravity (self) |
| Calculate the center of gravity of the region. | |
| Region | intersection (self, Region other_region) |
| Computes the intersection of two regions. | |
| Region | difference (self, Region other_region) |
| Computes the difference of two regions. | |
| Region | union (self, Region other_region) |
| Computes the union of two regions. | |
| Region | dilation (self, Region structuring_element) |
| Computes the dilation of the input region with the given structuring element. | |
| Region | erosion (self, Region structuring_element) |
| Computes the erosion of the input region with the given structuring element. | |
| None | __del__ (self) |
| Destructor for Region class. | |
Protected Member Functions | |
| None | _draw (self, Image image, DrawingOptions drawing_options) |
| Only region points inside the image are painted. | |
Protected Attributes | |
| _handle = peak_icv_region_handle(None) | |
| np.ndarray|None | _points = None |
| np.ndarray|None | _connected_components = None |
Represents a region consisting of a set of points in the image plane.
| None __init__ | ( | self, | |
| *Any | args, | ||
| **Any | kwargs ) |
In order to create an empty Region create it with no arguments, in all other cases please refer to the classmethods.
| bool __eq__ | ( | self, | |
| object | other ) |
Check if two regions are equal.
| other | Another Region object |
| bool __ne__ | ( | self, | |
| object | other ) |
Check if two regions are not equal.
| other | Another Region object |
|
protected |
Only region points inside the image are painted.
Region points outside the image are ignored. In case of an empty region, the image is not modified.
Reimplemented from IDrawable.
| int area | ( | self | ) |
Calculate the area of the region.
The area is the number of pixels in the region.
| Point center_of_gravity | ( | self | ) |
Calculate the center of gravity of the region.
| MathErrorException | If the center of gravity could not be computed. |
| RegionArray connected_components | ( | self | ) |
Calculate the connected components of the region.
The 8-neighborhood is used to determine the components.
| Region create_from_points | ( | cls, | |
| Union[PointArray, npt.NDArray[np.int_]] | points ) |
Creates a region from points.
| points | NumPy Array of Point objects representing the region's points OR NumPy Array of Points [x,y] |
| OutOfRangeException | If a point at a given index has an invalid length. |
| NotSupportedException | If the parameter `points` is not a NumPy array of Point objects or a two-dimensional NumPy array. |
Creates a Region from a Rectangle.
| rect | Rectangle to create the region from |
| NotSupportedException | If the contents of rectangle are not integers. |
Computes the dilation of the input region with the given structuring element.
The reference point of the structuring element is at (0, 0).
| structuring_element |
Computes the erosion of the input region with the given structuring element.
The reference point of the structuring element is at (0, 0).
| structuring_element |
Computes the intersection of two regions.
| PointArray points | ( | self | ) |
Get the points of the region.
|
protected |