|
| None | __init__ (self, RegionArray regions) |
| | Creates a region selector.
|
| |
| RegionArray | regions (self) |
| | Get the selected regions.
|
| |
| RegionSelector | select_by_area (self, Interval interval) |
| | Select regions based on their area.
|
| |
| RegionSelector | select_by_center_of_gravity_x (self, Union[Interval, Tuple[float, float], List[float], Tuple[int, int], List[int]] interval) |
| | Select regions based on the center of gravity's x coordinate.
|
| |
| RegionSelector | select_by_center_of_gravity_y (self, Union[Interval, Tuple[float, float], List[float], Tuple[int, int], List[int]] interval) |
| | Select regions based in the center of gravity's y coordinate.
|
| |
| RegionSelector | select_by_center_of_gravity_rect (self, Union[Rectangle, Tuple[float, float, float, float], List[float], Tuple[int, int, int, int], List[int]] rect) |
| | Select regions based in the center of gravity's position within a rectangle.
|
| |
|
| RegionSelector | _select_by (self, Callable select_by_get_count_function, Callable select_by_function, ctypes.Structure c_interval) |
| |
Represents a selector for regions based on various criteria.
- Since
- ids_peak_icv 1.1
Definition at line 23 of file region_selector.py.
◆ __init__()
Creates a region selector.
It is possible to provide an empty numpy array (no regions), but it does not make sense, because in this case no regions can be selected.
- Parameters
-
| regions | List of Region objects to select from. |
- Exceptions
-
| NotSupportedException | If regions is not a numpy array. |
- Since
- ids_peak_icv 1.1
Definition at line 32 of file region_selector.py.
◆ _select_by()
| RegionSelector _select_by |
( |
| self, |
|
|
Callable | select_by_get_count_function, |
|
|
Callable | select_by_function, |
|
|
ctypes.Structure | c_interval ) |
|
protected |
◆ regions()
◆ select_by_area()
Select regions based on their area.
- Parameters
-
| interval | Interval to select by. Only positive values are allowed. |
- Returns
- RegionSelector: New RegionSelector object with selected regions.
- Exceptions
-
| NotSupportedException | If interval has a wrong type or the interval is not valid for this function. |
| NotPossibleException | If interval has atleast one negative component. |
- Since
- ids_peak_icv 1.1
Definition at line 64 of file region_selector.py.
◆ select_by_center_of_gravity_rect()
| RegionSelector select_by_center_of_gravity_rect |
( |
| self, |
|
|
Union[
Rectangle, Tuple[float, float, float, float], List[float], Tuple[int, int, int, int], List[
int]] | rect ) |
Select regions based in the center of gravity's position within a rectangle.
- Parameters
-
| rect | Rectangle to select by. |
- Returns
- RegionSelector: New RegionSelector object with selected regions.
- Exceptions
-
| NotSupportedException | If interval has a wrong type or the interval is not valid for this function. |
- Since
- ids_peak_icv 1.1
Definition at line 150 of file region_selector.py.
◆ select_by_center_of_gravity_x()
| RegionSelector select_by_center_of_gravity_x |
( |
| self, |
|
|
Union[
Interval, Tuple[float, float], List[float], Tuple[int, int], List[int]] | interval ) |
Select regions based on the center of gravity's x coordinate.
- Parameters
-
| interval | Interval to select by. |
- Returns
- RegionSelector: New RegionSelector object with selected regions.
- Exceptions
-
| NotSupportedException | If interval has a wrong type or the interval is not valid for this function. |
- Since
- ids_peak_icv 1.1
Definition at line 93 of file region_selector.py.
◆ select_by_center_of_gravity_y()
| RegionSelector select_by_center_of_gravity_y |
( |
| self, |
|
|
Union[
Interval, Tuple[float, float], List[float], Tuple[int, int], List[int]] | interval ) |
Select regions based in the center of gravity's y coordinate.
- Parameters
-
| interval | Interval to select by. |
- Returns
- RegionSelector: New RegionSelector object with selected regions.
- Exceptions
-
| NotSupportedException | If interval has a wrong type or the interval is not valid for this function. |
- Since
- ids_peak_icv 1.1
Definition at line 122 of file region_selector.py.
◆ _regions
◆ regions