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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mammoinsight_math-0.1.1.tar.gz (31.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mammoinsight_math-0.1.1-py3-none-any.whl (33.7 kB view details)

Uploaded Python 3

File details

Details for the file mammoinsight_math-0.1.1.tar.gz.

File metadata

  • Download URL: mammoinsight_math-0.1.1.tar.gz
  • Upload date:
  • Size: 31.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.5

File hashes

Hashes for mammoinsight_math-0.1.1.tar.gz
Algorithm Hash digest
SHA256 324fad9aea0ce5c1566920c57cb88c7c41497599aaac18648438a1d1cf2cd286
MD5 ce25e5f8315f294c77ae8665382c3c50
BLAKE2b-256 2017316c2d365d55ec9fbd479f6a92cbf1e962b7ae0c28cdfd6cef23f88cff6b

See more details on using hashes here.

File details

Details for the file mammoinsight_math-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mammoinsight_math-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 48d0d7da98ec7b6aa5b119d0c72788fd8b4acc7425c6e9122c9256b785a36cce
MD5 0c27a87e3b53f94f6723fd80dea9029b
BLAKE2b-256 229006d5d06c9c3a7a54002d39b9c4eb4d970fd0ff0e6c40e493ae0d0f9cd6cb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page