An open-source, standalone microglial morphology analysis platform, termed Mapping Microglial Parameters Software (MMPS), was developed to provide an accessible, standardized workflow for IF-based microglial morphology analysis. The platform builds on previous morphology-analysis methodologies, requires no coding expertise, and incorporates an accessible graphical user interface. MMPS was designed to improve the detection of subtle microglial branching while incorporating multiple safeguards to minimize the overestimation of microglial masks.
MMPS was validated using an LPS-induced rodent neuroinflammation model. Following tissue processing and image acquisition (Figure 1), IF specificity was confirmed using negative-control sections lacking primary antibody staining (Supplementary Figure 1). MMPS processing begins with the importation of IF images into the software interface (Figure 2A). The software provides multiple image-processing options to improve microglial signal detection and background separation. Mandatory background subtraction is performed using the rolling-ball algorithm implemented in the Scikit-image package, while optional denoising and sharpening filters are available via SciPy-based Gaussian filtering. Following image processing, microglial somas are manually selected and identified by red selection markers (Figure 2B). Soma boundaries are subsequently outlined manually for downstream morphological calculations (Figure 2C).

Figure 1: Graphical overview of neuroinflammation model and processing. Rats were injected with LPS or PBS and collected 24 h with a cardiac perfusion followed by decapitation. Brains were extracted and sliced into 30 µm sections to then be used in IF for microglial marker Iba1 which were then processed with MMPS. Created with Biorender. Please click here to view a larger version of this figure.

Figure 2: Overview of MMPS usage. (A) Example of an image of cortical microglia (red, Iba1) with cell nuclei (blue, DAPI) to be referenced in MMPS (scale bar = 75 µm, 40x) . After image processing using MMPS, the background will be reduced and accurate morphologies assessed (B) After processing the image in MMPS, somas are manually selected with a red circle to be used in subsequent steps detailed in the methods (scale bar = 75 µm, 40x). (C) Two representative microglia were manually outlined, and the saved soma outline images are shown below. (D) Mask generation of selected cells automatically traces microglial branches up to 800 µm2, but it requires manual quality assurance. Here we display the inaccurate 800 µm2 mask followed by the more accurate 700 µm2 mask. Please click here to view a larger version of this figure.
After soma outlining, MMPS generates masks iteratively across a size range of 200–800 µm2 using adaptive thresholding constrained by user-defined minimum-intensity thresholds. Smaller masks more closely follow the user-defined threshold, whereas larger masks progressively relax threshold restrictions to maximize branch incorporation. Generated masks undergo manual quality-assurance review to prevent inclusion of neighboring cells, excessive background incorporation, or truncation by image borders or scale bars. As shown in Figure 2D, the 800 µm2 mask for a representative microglial cell extended into a neighboring cell. Rejection of the 800 µm2 mask and selection of the 700 µm2 mask corrected the segmentation error while preserving accurate delineation of the target microglia.
Following MMPS processing, microglial activation was assessed using the largest accepted mask for each cell, as these masks most accurately captured distal branching while minimizing background incorporation. Calculated morphological parameters are summarized in Table 1 and represented in Figure 3. LPS administration significantly decreased average centroid distance and cell perimeter compared with vehicle-treated controls (p < 0.05; Figure 3A,B), consistent with retraction of microglial processes during activation. No significant differences were observed in mask area, roundness, or eccentricity between treatment groups (Figure 3C–E), despite previous reports associating these parameters with activated microglial phenotypes3,23. The present study was not statistically powered to detect subtle differences in soma shape or mask area, and microglial subpopulations can adopt heterogeneous inflammatory morphologies that do not uniformly follow these trends3. In contrast, the soma area was significantly increased in LPS-treated animals compared with vehicle controls (p < 0.01; Figure 3F), further supporting activation-associated morphological remodeling22.

Figure 3: Comparison of microglial morphological parameters. For all panels, tests for normality were conducted (Shapiro-Wilk and Levene) with nonsignificant values found in all cases (p>0.05), leading to Student t-tests being employed. Dots represent individual animals (n=5 per treatment) (A) Average centroid distance was significantly greater in the vehicle group compared to the LPS treatment group. (B) Microglia cell perimeter was significantly greater in the vehicle group compared to the LPS treatment group. (C) There was no significant difference in mask area between treatment groups. (D) There was no significant difference in soma eccentricity between groups. (E) There is no significant difference in soma roundness between treatment groups. (F) There was a significant increase in soma area in the LPS group * p<0.05, ** p<0.01, *** p<0.001. Please click here to view a larger version of this figure.
| Parameter | Definition | Relation to Microglial Activation |
| Average Centroid Distance | Average distance of the furthest branch in the top, right, bottom, and left positions | Decreases |
| Perimeter | Measurement of the perimeter of the cell | Decreases |
| Mask Area | The actual area of the cell, not the target mask area | Decreases |
| Eccentricity | A measurement of the approximate elongation of the cell soma (0: circular, 1: highly elongated) | Decreases |
| Roundness | A measurement of the approximate circularity of the cell soma (0: elongated, 1: circular) | Increases |
| Soma Size | The area of the cell soma | Increases |
Table 1: Calculated Parameters from MMPS and Predicted Change in Response to Microglia Activation. The table summarizes morphological parameters calculated by Mapping Microglial Parameters Software (MMPS), including perimeter, average centroid distance, mask area, eccentricity, roundness, and soma area.
Inter-user reproducibility was subsequently evaluated by providing the same image set to blinded, previously untrained users for independent analysis (Supplementary Figure 2). No statistically significant differences were detected between users, and all users reproduced morphological trends consistent with microglial activation in LPS-treated animals.
MMPS additionally supports downstream advanced morphological analyses. Correlative analysis of parameters generated from Figure 3 demonstrated relationships between distinct morphological features. Vehicle-treated rats demonstrated only a weak correlation between microglia roundness and perimeter (R2 = 0.17), whereas LPS-treated rats demonstrated a stronger correlation (R2 = 0.64), suggesting that increased microglial activation was associated with simultaneous reductions in roundness and perimeter (Figure 4A). In addition, the mask area demonstrated strong positive correlations with average centroid distance in both vehicle and LPS-treated groups (R2 = 0.71 and 0.88, respectively), consistent with changes in branching complexity associated with microglial activation status (Figure 4B).

Figure 4: Advanced analysis of microglial parameters. All panels are animal-level lines of best fit computed by the ordinary least squares method displayed with their coefficient of determination (R2) and shaded with their 95% confidence interval. (A) Microglial soma roundness and total perimeter length trend weakly in microglia form the vehicle group (R2 = 0.17) but have stronger correlation after LPS exposure (R2 = 0.64). (B) Average centroid distance correlates with the area of the microglia in the vehicle (R2 = 0.71) and LPS (R2 = 0.88) groups. Please click here to view a larger version of this figure.
Supplementary Figure 1: Validation of IF Protocol Through Negative Control. One brain slice of the same region for each rat underwent the IF protocol without primary antibody addition to confirm lack of autofluorescence (scale bar = 75 µm) (A) Representative image of vehicle-stained tissue for DAPI (blue). (B) Representative image of vehicle-stained tissue for Iba1 (red). (C) Representative image of vehicle-stained tissue for DAPI (blue) and Iba1 (red). (D) Representative image of LPS-stained tissue for DAPI (blue). (E) Representative image of LPS-stained tissue for Iba1 (red). (F) Representative image of LPS-stained tissue for DAPI (blue) and Iba1 (red). Please click here to download this file.
Supplementary Figure 2: Assessment of MMPS Inter-User Variation. Several blinded users utilized MMPS on the same samples from Figure 3 and the animal-level results were compared. For all, tests of normality (Shapiro-Wilk and Levene) were nonsignificant (p>0.05), leading to the utilization of a repeated-means ANOVA with post-hoc Holm-corrected paired t-test (p>0.05). (A) There was no significant difference in each group between users for average centroid distance (p>0.05). (B) There was no significant difference in each group between users for perimeter (p>0.05). (C) There was no significant difference in each group between users for mask area (p>0.05). (D) There was no significant difference in each group between users for eccentricity (p>0.05). (E) There was no significant difference in each group between users for roundness (p>0.05). (F) There was no significant difference in each group between users for soma area (p>0.05). Please click here to download this file.