RectAn
RectAn(
positions,
w_in,
h_in,
w_out,
h_out,
*,
theta_in=0.0,
theta_out=None,
validate=True,
)Rotated rectangular annulus in pixel coordinates.
Parameters
positions : tuple or array - like-
Annulus center or centers as
(x, y)pixel coordinates. Multiple centers are accepted as an(N, 2)array-like object. w_in : float-
Inner rectangle full width and height in pixels.
w_inis measured along the inner rectangle’s local x axis, andh_inalong its local y axis. h_in : float-
Inner rectangle full width and height in pixels.
w_inis measured along the inner rectangle’s local x axis, andh_inalong its local y axis. w_out : float-
Outer rectangle full width and height in pixels.
w_outis measured along the outer rectangle’s local x axis, andh_outalong its local y axis. Each outer dimension must be at least the corresponding inner dimension, and at least one outer dimension must be larger. Attheta_out=0, the outer width axis is aligned with the image x axis and the outer height axis with the image y axis. h_out : float-
Outer rectangle full width and height in pixels.
w_outis measured along the outer rectangle’s local x axis, andh_outalong its local y axis. Each outer dimension must be at least the corresponding inner dimension, and at least one outer dimension must be larger. Attheta_out=0, the outer width axis is aligned with the image x axis and the outer height axis with the image y axis. theta_in : float = 0.0-
Inner rectangle rotation angle in radians, measured counterclockwise from the positive image x axis to the inner rectangle’s local width axis.
theta_out : float = None-
Outer rectangle rotation angle in radians, measured counterclockwise from the positive image x axis to the outer rectangle’s local width axis. If
None, it defaults totheta_in. validate : bool = True-
If
False, skip input validation and assume finite, positive geometry, ordered dimensions, and normalized positions.
Methods
| Name | Description |
|---|---|
| bboxes | Override the default python for-loop with a Rust-accelerated batch function. |
bboxes
RectAn.bboxes()Override the default python for-loop with a Rust-accelerated batch function.