> For the complete documentation index, see [llms.txt](https://help.codex.bio/codex/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.codex.bio/codex/processor/technical-notes/segmentation-and-spillover.md).

# Segmentation & Spillover

### Cell Segmentation

Segmentation involves two steps, finding local maxima and region-growing using the maxima as seed points [\[1\]](https://en.wikipedia.org/wiki/Region_growing). Threshold values can be specified by the user to control the region growth. Cell volumes are grown in 3D to encompass all corresponding marker expression signal. Expression levels are integrated for each marker using all voxels within a cell.

### Spatial Spillover Compensation

Cells may have spillover fluorescence expression from adjacent cells that may hamper efforts to differentiate positive and negative expressions. Spillover compensation is used to reassign such expression back to the correct cells using a Gabriel graph [\[2\]](https://en.wikipedia.org/wiki/Gabriel_graph) and adjacency matrices, improving separation of sub-populations.

[Goltsev, Y., Samusik, N., Kennedy-Darling, J., Bhate, S., Hale, M., Vazquez, G., ... & Nolan, G. P. (2018). Deep profiling of mouse splenic architecture with CODEX multiplexed imaging. Cell, 174(4), 968-981.](https://www.sciencedirect.com/science/article/pii/S0092867418309048)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.codex.bio/codex/processor/technical-notes/segmentation-and-spillover.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
