Statistical Methods

Keep an Intensity Center Separate from an Anatomical Center

Define the task

An intensity-weighted center answers where the supplied mass is concentrated. It is not necessarily the geometric center of a binary object, the center of its bounding box or a meaningful anatomical landmark. Define what the weights represent and document thresholding, baseline subtraction and exclusions. The small browser tool accepts only nonnegative values with positive total mass; SciPy also permits signed masses, which need additional care.

Carry out the check

Calculate a weighted average separately for the zero-based row and column indices. Check the total mass first. Translate the result into physical coordinates only using a documented origin, spacing and axis orientation. Do not label array row as x without checking the coordinate convention. Signed masses can cancel, move the center outside the object or make the denominator zero; this tool deliberately rejects them rather than hiding that ambiguity.

Worked hypothetical example

Hypothetical example: rows [0,1] and [0,3] place mass 1 at (0,1) and mass 3 at (1,1). Total mass is 4, row center is (0×1+1×3)/4=0.75 and column center is 1. Multiplying every intensity by 10 leaves the center unchanged. Adding a constant background does not generally preserve it. Save the preprocessing and coordinate conversion alongside the center.

Method checked 23 November 2026 against Primary method documentation: center_of_mass.

Open the nonnegative image mass center.

Download the intensity center provenance worksheet.

Related reading

Reading path: Analyze data. Guide 205 of 222. Choose any guide to suit your project.

Statistical Methods

Keep Empty Bins and Excluded Measurements Visible

Practical steps and a worked example: Aggregate response measurements within declared coordinate bins and retain exclusion counts.

Statistical Methods

Separate Dendrogram Leaf Ordering from Cluster Evidence

Practical steps and a hypothetical example: Separate dendrogram display ordering from cluster membership.

Browse this reading pathTools for this stageGuides and downloads for this stage