---
title: "tomojax.interactive"
description: "Registered slices, center sweeps, detector bands and region overlays for interactive clients."
canonical: "https://tomojax.dev/api/interactive/"
last-updated: "2026-11-28"
---

# tomojax.interactive

> For the complete documentation index, see [llms.txt](https://tomojax.dev/llms.txt).

| Name | Summary |
| --- | --- |
| [`CorrectionBand`](https://tomojax.dev/api/interactive/#correctionband) | The input rows, the corrected binned rows and the views kept, for a row band. |
| [`RegionOverlay`](https://tomojax.dev/api/interactive/#regionoverlay) | Estimated reconstruction grid, its voxel-edge bounds and registered central images. |
| [`center_sweep`](https://tomojax.dev/api/interactive/#center_sweep) | Reconstruct ordered planes at signed horizontal offsets in input detector pixels. |
| [`correction_preview`](https://tomojax.dev/api/interactive/#correction_preview) | Correct complete native blocks for a half-open interval in the binned output. |
| [`reconstruct_slice`](https://tomojax.dev/api/interactive/#reconstruct_slice) | Return the indexed plane of the requested public reconstruction on its original grid. |
| [`reconstruct_slices`](https://tomojax.dev/api/interactive/#reconstruct_slices) | Reconstruct several planes, sharing one full solve when any of them needs one. |
| [`region_preview`](https://tomojax.dev/api/interactive/#region_preview) | Return the estimator's grid and its central FBP overlays in physical space. |

## `CorrectionBand` [#correctionband]

```python
class CorrectionBand(
    before: np.ndarray,
    after: np.ndarray,
    views: np.ndarray,
    detector: Detector,
    domain: Literal['counts', 'line_integrals'] = 'counts',
)
```

<small>Defined in [src/tomojax/interactive.py:283](https://github.com/tristanmanchester/tomojax/blob/main/src/tomojax/interactive.py#L283)</small>

The input rows, the corrected binned rows and the views kept, for a row band.

**Parameters**

- **`before`** (*numpy.ndarray*): The input across the requested complete blocks: counts of raw frames, or the
  line integrals of a scan.
- **`after`** (*numpy.ndarray*): Line integrals on the selected binned rows.
- **`views`** (*numpy.ndarray*): Indices of retained views in the input acquisition.
- **`detector`** (*Detector*): Full binned detector used to register the output rows.
- **`domain`** (*\{"counts", "line_integrals"\}, optional*): What `before` holds.

## `RegionOverlay` [#regionoverlay]

```python
class RegionOverlay(
    estimate: RegionEstimate,
    bounds: tuple[tuple[float, float], tuple[float, float], tuple[float, float]],
    images: dict[str, progress.Sample],
)
```

<small>Defined in [src/tomojax/interactive.py:237](https://github.com/tristanmanchester/tomojax/blob/main/src/tomojax/interactive.py#L237)</small>

Estimated reconstruction grid, its voxel-edge bounds and registered central images.

**Parameters**

- **`estimate`** (*RegionEstimate*): The estimator's result, usable in a subsequent reconstruction.
- **`bounds`** (*tuple*): Lower and upper voxel edges in physical x, y and z order.
- **`images`** (*dict*): Registered central planes indexed by their fixed axis.

## `center_sweep` [#center_sweep]

```python
center_sweep(
    scan: Scan,
    axis: Axis,
    index: int,
    centers: Sequence[float],
    *,
    method: Method = 'auto',
    **options: Any,
) -> Any
```

<small>Defined in [src/tomojax/interactive.py:150](https://github.com/tristanmanchester/tomojax/blob/main/src/tomojax/interactive.py#L150)</small>

Reconstruct ordered planes at signed horizontal offsets in input detector pixels.

Resolve the requested region once on the input scan. Every offset uses that fixed
grid, support and plane index. A full reconstruction oracle shifts the detector and
passes this resolved grid explicitly at each center. Repeated offsets retain their order.

**Parameters**

- **`scan`** (*Scan*): Input projections and calibrated geometry.
- **`axis`** (*\{"z", "y", "x"\}*): Dimension held fixed in the returned plane.
- **`index`** (*int*): Zero-based plane index on the resolved grid.
- **`centers`** (*sequence of float*): Signed detector offsets relative to the central column, in input pixels.
- **`method`** (*str, optional*): Public reconstruction method.
- **`**options`** (*dict*): Keyword arguments to the reconstruction resolver, including grid, region and solver options.

**Returns**

- *numpy.ndarray or jax.Array*: Float32 attenuation with a leading center coordinate, in the supplied order.

## `correction_preview` [#correction_preview]

```python
correction_preview(
    source: Frames | Scan,
    rows: tuple[int, int],
    *steps: Step,
    binning: int = 1,
    epsilon: float = 1e-06,
    flat_weights: FlatWeighting = FLAT_WEIGHTS,
    views_per_batch: int | None = None,
) -> CorrectionBand
```

<small>Defined in [src/tomojax/interactive.py:309](https://github.com/tristanmanchester/tomojax/blob/main/src/tomojax/interactive.py#L309)</small>

Correct complete native blocks for a half-open interval in the binned output.

The rows equal the same rows of a full correction followed by binning: rows
the band does not hold are read when a step needs them (Paganin's propagation,
view rejection's statistics).

**Parameters**

- **`source`** (*Frames or Scan*): Raw acquisition with calibration and exposure metadata, or a scan of line
  integrals for the steps that act on them.
- **`rows`** (*tuple of int*): First binned row and exclusive stop.
- **`*steps`** (*Step*): Ordered corrections, as for the full acquisition.
- **`binning`** (*int, optional*): Width and height of a native detector block.
- **`epsilon`** (*float, optional*): Lower bound for flat and transmission values (raw frames).
- **`flat_weights`** (*\{'views', 'position'\}, optional*): How a view between two flat sets blends them (raw frames), as for
  [`tomojax.Frames.corrected`](https://tomojax.dev/api/tomojax/#framescorrected).
- **`views_per_batch`** (*int or None, optional*): Maximum number of views in a correction batch.

**Returns**

- *CorrectionBand*: The input rows, binned line integrals and original input view indices.

## `reconstruct_slice` [#reconstruct_slice]

```python
reconstruct_slice(
    scan: Scan,
    axis: Axis,
    index: int,
    *,
    method: Method = 'auto',
    **options: Any,
) -> Any
```

<small>Defined in [src/tomojax/interactive.py:123](https://github.com/tristanmanchester/tomojax/blob/main/src/tomojax/interactive.py#L123)</small>

Return the indexed plane of the requested public reconstruction on its original grid.

**Parameters**

- **`scan`** (*Scan*): Input projections and calibrated geometry.
- **`axis`** (*\{"z", "y", "x"\}*): Dimension held fixed in the returned plane.
- **`index`** (*int*): Zero-based plane index on the resolved grid.
- **`method`** (*str, optional*): Public reconstruction method.
- **`**options`** (*dict*): Keyword arguments to the reconstruction resolver, including grid, region and solver options.

**Returns**

- *numpy.ndarray or jax.Array*: Float32 attenuation in the remaining public array axes.

## `reconstruct_slices` [#reconstruct_slices]

```python
reconstruct_slices(
    scan: Scan,
    requests: Sequence[tuple[Axis, int]],
    *,
    method: Method = 'auto',
    **options: Any,
) -> list[Any]
```

<small>Defined in [src/tomojax/interactive.py:82](https://github.com/tristanmanchester/tomojax/blob/main/src/tomojax/interactive.py#L82)</small>

Reconstruct several planes, sharing one full solve when any of them needs one.

Every index is checked before anything runs. Axial FBP planes that take one
detector row each are made on their own; otherwise one full reconstruction is
cut into every requested plane.

**Parameters**

- **`scan`** (*Scan*): Input projections and calibrated geometry.
- **`requests`** (*sequence of (axis, index)*): Planes to make.
- **`method`** (*str, optional*): Public reconstruction method.
- **`**options`** (*dict*): Keyword arguments to the reconstruction resolver.

**Returns**

- *list of array*: Float32 attenuation planes, one per request, in order.

## `region_preview` [#region_preview]

```python
region_preview(scan: Scan) -> RegionOverlay
```

<small>Defined in [src/tomojax/interactive.py:256](https://github.com/tristanmanchester/tomojax/blob/main/src/tomojax/interactive.py#L256)</small>

Return the estimator's grid and its central FBP overlays in physical space.

**Parameters**

- **`scan`** (*Scan*): Calibrated laminography projections supplied to the region estimator.

**Returns**

- *RegionOverlay*: Estimate, physical XYZ bounds and registered central planes.
