Skip to main content

🌸 mammoinsight-math

Deterministic Biomedical Image Processing & Clinical Feature Extraction for Mammography The Transparent Box Approach to Biomedical Image Analysis

PyPI Version Python Versions License: MIT


📌 Overview

mammoinsight-math is a specialized, open-source Python library providing deterministic, non-black-box algorithms for mammographic image analysis. Developed as part of the MammoInsight Project, it provides robust algorithms for frequency-domain enhancement, BI-RADS lesion morphometry, radiomic texture extraction (Haralick GLCM), and classical segmentation.


⚡ Quickstart & Installation

Install the package via pip:

pip install mammoinsight-math

Quick Usage Example

import cv2
import mammo_math as mm

# Load ROI image and lesion mask
image = cv2.imread("mammo_roi.png", cv2.IMREAD_GRAYSCALE)
mask = cv2.imread("lesion_mask.png", cv2.IMREAD_GRAYSCALE)

# 1. Image Enhancement (Homomorphic Filter in Fourier Domain)
enhanced_img = mm.homomorphic_filter(image, cutoff=15)

# 2. Deterministic Morphometry (BI-RADS Lesion Geometry)
geom = mm.LesionGeometry(mask)
print(f"Circularidad:  {geom.calcular_circularidad():.4f}")
print(f"Diámetro Feret: {geom.calcular_diametro_feret():.2f} px")

# 3. Radiomic Texture Extraction (Haralick GLCM Descriptors)
texture_vector = mm.extract_glcm_features(enhanced_img)
print("Firma GLCM (Contraste, Disimilitud, Homogeneidad, Energía, Correlación, ASM):")
print(texture_vector)

🧪 Included Core Modules

  1. Preprocessing (mammo_math.preprocessing):

    • homomorphic_filter: Frequency-domain illumination correction via 2D FFT.
    • apply_clahe: Contrast Limited Adaptive Histogram Equalization.
    • apply_unsharp_masking: Edge enhancement filter.
    • segment_with_frangi: Frangi vesselness filter for vascular structure suppression.
    • segment_with_gabor_kmeans: Multi-scale Gabor filter bank clustering.
  2. Lesion Geometry & Morphometry (mammo_math.core):

    • LesionGeometry: Deterministic calculations of Circularity, Feret Diameter, Eccentricity, and Elongation for BI-RADS mass shape characterization.
    • novoas_core: Boundary roughness and shape indices.
  3. Radiomic Texture (mammo_math.features):

    • extract_glcm_features: Gray-Level Co-occurrence Matrix (Haralick 6-descriptor texture vector).
    • extract_feature_vector: Combined 6 and 12-dimensional feature extractors.
  4. Segmentation & Clustering (mammo_math.segmentation):

    • novoas_segmentation: Contour-based lesion segmentation.
    • apply_gdc_filter: Grid-Density Clustering for noise reduction.
    • QuantileSegmenter: Dynamic quantile thresholding.
    • crecimiento_de_regiones & segmentacion_otsu_local: Local Otsu & Region Growing.

📚 Academic References & Citations

  1. Haralick, R. M., Shanmugam, K., & Dinstein, I. (1973). Textural features for image classification. IEEE Transactions on Systems, Man, and Cybernetics, SMC-3(6), 610–621. DOI: 10.1109/TSMC.1973.4309314 | IEEE Xplore
  2. Suckling, J., et al. (1994). The Mammographic Image Analysis Society Digital Mammogram Database (MIAS). Excerpta Medica. International Congress Series, 1069, 375–378. Cambridge Repository | PMC 3092049

👤 Author & License

  • Author: Ernesto Rafael Perez — Project Lead & Researcher (mammoinsight@gmail.com)
  • Website: https://www.mammoinsight.org/
  • License: MIT License. Free for academic, clinical, and open-source research use.

Metadata

Release files for mammoinsight-math 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mammoinsight-math 0.1.1
File Size Uploaded
mammoinsight_math-0.1.1.tar.gz 31.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mammoinsight-math 0.1.1
File Interpreter ABI Platform
mammoinsight_math-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 65.2 kB

Release files / mammoinsight_math-0.1.1.tar.gz

Download URL mammoinsight_math-0.1.1.tar.gz
Size 31.4 kB
Tags Source
SHA-256 checksum
How to use checksums
324fad9aea0ce5c1566920c57cb88c7c41497599aaac18648438a1d1cf2cd286
BLAKE2b-256 checksum
How to use checksums
2017316c2d365d55ec9fbd479f6a92cbf1e962b7ae0c28cdfd6cef23f88cff6b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release files / mammoinsight_math-0.1.1-py3-none-any.whl

Download URL mammoinsight_math-0.1.1-py3-none-any.whl
Size 33.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
48d0d7da98ec7b6aa5b119d0c72788fd8b4acc7425c6e9122c9256b785a36cce
BLAKE2b-256 checksum
How to use checksums
229006d5d06c9c3a7a54002d39b9c4eb4d970fd0ff0e6c40e493ae0d0f9cd6cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page