Count Point Mode
Let users place multiple count points on one count annotation until the mode is turned off.
`insertCountPointMode` starts or stops continuous point placement for a specific count annotation.
When the mode is enabled, each point the user places is added to the count annotation identified by `guid`. The mode remains active until the host sends the same message with `enabled: false` or the demo viewer clears it during a context change.
The working demo exposes this mode from two places: the count annotation properties panel and the select-annotation panel.
- Start Mode: Send `insertCountPointMode` with `enabled: true` and the count annotation `guid`.
- Stop Mode: Send `insertCountPointMode` with `enabled: false` and the same `guid`.
- Active Target: The demo keeps one active continuous count target at a time.
- Visible State: The demo shows `Continuous On` for the active count annotation in the select-annotation panel.
Enable the mode when the user wants to place several points on one count annotation. Disable it when the user clicks the toggle again, selects another annotation, deletes the target annotation, changes files, or closes/reloads the viewer.
Enable continuous add
Disable continuous add
Track the active count annotation GUID in the host. This makes it clear which annotation owns continuous mode and which GUID must be used when turning the mode off.
The demo viewer keeps continuous count mode tied to one annotation GUID and sends an explicit disable message whenever the mode needs to stop.
1. Host identifies the count annotation
The host uses the active selection GUID and only exposes the control for count annotations.
2. Host enables insertCountPointMode
The host sends `enabled: true` for the selected count annotation GUID.
3. Viewer stays in count placement mode
While the mode is active, the viewer continues attaching placed count points to the same annotation.
4. Host disables insertCountPointMode
To stop the mode, the host sends `insertCountPointMode` again with `enabled: false` and the active count annotation GUID.
The GUID identifies the target count annotation. The `enabled` value tells the viewer whether to enter or exit continuous placement mode for that annotation.
- `enabled`: `true` starts continuous add mode and `false` stops it.
- `guid`: the count annotation that receives the inserted points.
- `requestId`: optional tracing value for logging or request correlation.
Your host application should stop continuous mode any time the user is no longer intentionally adding points to the same count annotation.
- Stop when the user clicks `Stop Count Mode` or turns `Continuous Add` off.
- Stop before enabling continuous mode for another count annotation.
- Stop when the selected annotation changes to a different annotation.
- Stop when the selected count annotation is unselected or deleted.
- Stop when the active file changes.
- Stop when the viewer is closed, unloaded, or reloaded.
Continue with related measurement workflows that commonly surround count insertion.
- Selection: Select Measurement
- Creation: Measurement Created
- Save: Save Measurements
- Technical: API Reference
