Field of view overlay demo

How to use (field of view)

  • Click the circle icon to open the dialog.
  • Set a diameter (mm/µm), then click Place field of view.
  • Move the mouse to preview; click to drop circles (repeat as needed).
  • FOV reads mpp from tiledImage.source.mpp once the host attaches it (see below).
  • This page also runs a headless ruler on the same slide for visual comparison (separate Paper layers; they do not share geometry).
  • If clicks do not reach the ruler, press Ruler or Default again—the toolkit overlay is brought forward. Use the microscope control for FOV; that overlay brings itself forward when activated.

Physical scale: tile mpp vs programmatic (ruler)

Field of view always needs item.source.mpp (µm/px) on the active tiled image.

Ruler can sync mm labels in two ways:

  1. From tile source (used on load): attach mpp, then syncRulerFromTileMpp(viewer, toolkit).
  2. Programmatic: pass mpp from your API via applyRulerPhysicalScaleFromMpp(toolkit, mpp) (button below).
// Tile path (after attachMppToViewerItem):
syncRulerFromTileMpp(viewer, toolkit);

// Programmatic (mpp from metadata, tile may already have source.mpp for FOV):
applyRulerPhysicalScaleFromMpp(toolkit, mpp);

Ruler scale after load:

Ruler (headless)

Programmatic default + ruler tools (addUI: false).

Debug controls