Skip to content

Main content

Stain Reference Support Share Tool

Calculate stain reference support share from explicit caller-supplied inputs.

Loading tool…

Description

Sum stained area and stained area with matching references, returning their ratio or zero with defined false for zero stained area.

Histology counting uses eligible objects, sampled areas, exclusions, and reference planes. The chosen denominator and boundary rules affect the result, while actual object identification and sampling validity require separate review.

Sum stained area and stained area with matching references, returning their ratio or zero with defined false for zero stained area.

When to use this tool

Use Stain Reference Support Share when you need one supplied counting or support component under an explicit protocol.

How to use the tool and how it works

  1. Enter patchAreas, stainPresent, matchedReference. Keep parallel arrays aligned. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read stainedArea, referencedStainedArea, share, defined. Inspect defined before interpreting the associated values.

Require aligned nonnegative patchAreas and stainPresent and matchedReference flags. Sum stained area and stained area with matching references, returning their ratio or zero with defined false for zero stained area.1

Input fieldMeaning and unitsAccepted input
patchAreasPatch AreasRequired. Array of finite number; minimum 0; maximum items 256.
stainPresentStain PresentRequired. Array of boolean; maximum items 256.
matchedReferenceMatched ReferenceRequired. Array of boolean; maximum items 256.
Output fieldInterpretationReturned shape
stainedAreaStained AreaRequired. Finite number.
referencedStainedAreaReferenced Stained AreaRequired. Finite number.
shareDimensionless share under the stated denominator and exclusion convention.Required. Finite number.
definedWhether the associated ratio has its required denominator; inspect before using a zero placeholder.Required. Boolean.
json
{
  "input": {
    "patchAreas": [
      2,
      3,
      5
    ],
    "stainPresent": [
      true,
      true,
      false
    ],
    "matchedReference": [
      true,
      false,
      true
    ]
  },
  "output": {
    "stainedArea": 5,
    "referencedStainedArea": 2,
    "share": 0.4,
    "defined": true
  }
}

Limitations and assumptions

  • Support is area-weighted rather than patch-count weighted; flags do not establish stain specificity, image quality, or diagnostic validity.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Check the full stereological or image-analysis method and appropriate professional interpretation before drawing a tissue conclusion.

References

  1. Calculation and input contract: histology/stain-reference-support-share — tool.io

Similar or alternative tools

  • Stain Reference Channel Factor

    Subtract blank from signal and multiply by nonnegative suppliedReferenceLevel/positive referenceChannel.

  • Stain Batch Reference Slide Gap

    Subtract blankSignal from sampleSignal and multiply by targetReference/batchReference, returning corrected signal and normalizationFactor.