---
title: "2026-09-04 Histo build representation call graph"
description: "Traced the repo-owned static call graph from build_representation through representation and helper modules."
image: "https://docs.virdx.dev/img/virdx-social-card.png"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.virdx.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# 2026-09-04 Histo build representation call graph

## Work Done

- Traced `build_representation` from its production caller through routing, rasterization, backend selection, tiling, structure tensor calculation, isotropic and stromal expansion, footprint grading, rendering, and reusable buffers.
- Recorded exact definition and key call-site lines, including repo-owned helpers in `cell_detection`, `super_window`, `taxonomy`, and `wsi_inference.arrays`.
- Identified runtime NumPy/CuPy and SciPy/CuPy ndimage dispatch, host/device residency branches, optional buffer paths, and external OpenCV, Torch, and CUDA boundaries.
- Did not modify the `histo` repository.

## Lessons Learned: Pitfalls

- The broad knowledge-base startup material was not needed for a narrow read-only static call-graph trace.
- Simple symbol search does not capture cached-property access or runtime module dispatch, so those edges required manual inspection.

## Lessons Learned: Improvements

- A project call-graph tool or SOP that models property reads and module-valued `xp`/`ndimage` dispatch would speed up similar architecture traces.

Source: https://docs.virdx.dev/knowledge/inbox/2026-09-04-histo-build-representation-call-graph/index.mdx
