ScientiaLux
Core Concept

Layers

Structured analysis pipelines for detecting and measuring objects

View
Definition
Layers combine multiple coded images into a single composite, enabling complex compartment models where different regions of the cell are defined by different detection engines. Think of it as stacking transparent overlays — a nuclear layer from nuclei detection, a cytoplasmic layer from the Grow engine, a membrane layer from membrane detection — into one unified map where each pixel knows which compartment and which cell it belongs to.
Compartment Composition
Combine multiple detections
Priority Rules
Resolve overlapping regions
Boolean Operations
Add, subtract, intersect coded images
Downstream Transparency
One input for all measurements

How It Works

The Layers engine takes multiple coded images as input and produces a single composite coded image using configurable combination rules:

  1. Input selection — Choose the coded images to combine (e.g., nuclear detection, cytoplasmic grow, membrane detection).
  2. Operation — For each pair of layers, specify the combination rule: Union (keep both), Subtraction (remove one from another), or Intersection (keep only overlap).
  3. Priority assignment — When pixels belong to multiple layers, the highest-priority layer determines the final label. Typically: membrane > nuclear > cytoplasmic.
  4. Output — A single coded image where each pixel carries a label indicating both the cell identity and the compartment type.
Simplified

Layers stack multiple detection results together — nuclei, cytoplasm, membrane — into one combined map. Where regions overlap, priority rules decide which layer wins. The result is a single coded image that downstream engines can use without knowing about the underlying complexity.

Science Behind It

Image composition as set theory: Gonzalez & Woods describe image combination through set operations. A coded image is a partition of pixel space — each pixel belongs to exactly one region (or background). Combining coded images via union, intersection, and subtraction mirrors Boolean set operations on these partitions. The subtraction operation A − B (all pixels in A but not in B) is how cytoplasmic rings are created: grow by 12 pixels to get the whole cell, subtract the nuclear region, and the remainder is the cytoplasm.

Reconstruction from samples: Hanrahan's signal processing framework applies here conceptually. Each coded image is a "sample" of cell structure from a different perspective — nuclear staining shows nuclei, membrane staining shows boundaries, cytoplasmic staining shows cell bodies. The layer composite "reconstructs" the complete cell model from these partial samples, much as signal reconstruction builds a continuous function from discrete samples.

Why compartments matter biologically: Proteins localize to specific cellular compartments. Ki-67 is nuclear, cytokeratin is cytoplasmic, PD-L1 is membranous. Measuring each biomarker in the wrong compartment dilutes the signal with irrelevant background. A layer composite that correctly assigns each pixel to its compartment maximizes the biological signal-to-noise ratio — the signal comes from where the protein actually is, not from the surrounding volume where it isn't.

Simplified

Combining coded images uses the same logic as set operations in mathematics — union, subtraction, and intersection. Subtracting the nuclear region from a grown whole-cell region gives you the cytoplasm. This compartmentalization matters because proteins live in specific places in the cell, and measuring them in the right compartment gives you a much cleaner signal.

Practical Example

Building a three-compartment cell model for multiplex IF:

  1. Nuclear layer: Nuclei Detection on DAPI → coded image A
  2. Whole cell layer: Grow coded image A by 10 pixels → coded image B
  3. Cytoplasmic ring: Layers: B minus A → coded image C (cytoplasm only)
  4. Membrane layer: Membrane Detection on E-cadherin → coded image D
  5. Composite: Layers combining A (nuclear, priority 1), D (membrane, priority 2), C (cytoplasm, priority 3)

Result: Every pixel is classified as nuclear, membrane, or cytoplasm for a specific cell. Standard Measurements on this composite produce three separate sets of biomarker intensities per cell — one for each compartment.

Simplified

By layering nuclear detection, grown cytoplasm, and membrane detection into one composite, you get three distinct compartments per cell. Each biomarker is then measured in the compartment where it biologically resides — Ki-67 in nuclei, cytokeratin in cytoplasm, PD-L1 at membranes.

Connected Terms

Share This Term
Term Connections