Retinalysis enface geometry
Optic-disc geometry
OpticDisc(mask, fundus=None, size=1024) normalizes the observed segmentation and
fits a reconstructed ellipse once. When attached to a fundus, its CFI ROI is used
to exclude cut edges; otherwise fitting accounts for the image edges alone.
Coordinates and fitting parameters are in the normalized mask's pixels.
disc.ellipse: acceptedOpticDiscEllipseFit, with center (Point(y, x)), semi-axes(major, minor)and orientation in degrees from +x toward +y.disc.center: reconstructed center, potentially outside the image.disc.circle: area-equivalent circle at that center, radiussqrt(a*b).temporal_point,nasal_point,superior_point,inferior_point: intersections of directional rays with the ellipse, relative to the reconstructed disc–fovea axis.closest_point(point): nearest ellipse boundary point, including for queries inside the ellipse.distance_to_center(point)uses the reconstructed center.mask,center_of_mass, bounding boxes,boundary_pixels, containment and boundary-distance utilities still describe the observed segmentation. Vessel exclusion uses this observed mask.
Defaults are a 5 px cut-edge margin, roundness weight 0.02 on censored contours,
and robust-loss scale 2 px. A fit is rejected when visible IoU is non-finite or
below 0.80, when it reaches an extrapolation limit, or when ovality (major/minor
semi-axis ratio) is >= 1.5. The strict ovality limit applies to complete and clipped
discs alike; no area or area/ODFD² acceptance threshold is applied. Low contour error cannot
rescue a fit that disagrees with the visible segmentation.
Insufficient usable contour, numerical failure and rejected fits raise
InvalidDiscMaskException; invalid API arguments raise ValueError.
Fundus/VascX loaders catch invalid masks and set disc=None as before.
Diagnostics remain inspectable: visible_iou is overlap with the observed mask
within the CFI, contour_rmse_px is RMS approximate geometric error on the retained
contour, observed_arc_degrees is the fitted angular span of that contour, and
visible_fraction is the fitted ellipse area inside the CFI and image divided by
its complete raster area. The extrapolation_limit flag rejects a fit; other
flags remain informational. Short arcs, visible fraction and off-image centers
alone do not reject a fit. Visible IoU compares only the ellipse and segmentation
inside the image and CFI, allowing well-supported clipped discs to remain usable.
disc.fit_ellipse(...) computes a separately validated fit with optional parameters;
it does not replace disc.ellipse or change measurements. outline_xy() returns a
closed outline. to_mask(shape) clips to that canvas; full_mask() returns the
complete ellipse mask plus its source-space (row, column) origin, which may be
negative. Preserve this offset when comparing reconstructed masks with CFI bounds.
Fundus grids, laterality and disc–fovea distances use the reconstructed geometry.
Reload using fundus.load_disc(...) to clear dependent geometry and vessel caches.
Metadata
Release files for retinalysis-enface 2.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| retinalysis_enface-2.3.0.tar.gz | 70.7 kB | Without provenance | Details for retinalysis_enface-2.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| retinalysis_enface-2.3.0-py3-none-any.whl | Python 3 | none | any | Details for retinalysis_enface-2.3.0-py3-none-any.whl |
Total release size: 140.6 kB
Release files / retinalysis_enface-2.3.0.tar.gz
| Download URL | retinalysis_enface-2.3.0.tar.gz |
|---|---|
| Size | 70.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1ffe524790c9907d74f7e3b23fa749eb386bda2c99741111bc3ce7c2aacb4f4a
|
|
BLAKE2b-256 checksum How to use checksums |
a539a6ddc4885cee1a75ac032c5d64392b3b29e5c1c6ec8a79b564ab985a0486
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Release files / retinalysis_enface-2.3.0-py3-none-any.whl
| Download URL | retinalysis_enface-2.3.0-py3-none-any.whl |
|---|---|
| Size | 69.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9f7dbb70ea1c7ed2a10f16e509cf874e89360d449478fd94338a6c5d53b0fb08
|
|
BLAKE2b-256 checksum How to use checksums |
453e8d054ba3d3065b796837b4d8cb67895cc45b6c4576cf61b971a268a23a13
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Security for retinalysis-enface 2.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.