Data Extraction
Bulk extract all measurement and annotation data from the viewer.
While events like `annotationCreated` are useful for real-time updates, you sometimes need to extract the entire state of the canvas—for example, during a final export or a summary report.
The `getAnnotationData` API allows the host to request a normalized list of all active measurements and annotations currently present in the viewer.
- Bulk Extraction: Retrieves all measurements in a single request.
- Filtering: Scope results by type or category (e.g., only "measurement").
- Correlation: Use Request IDs to synchronize async responses.
Request all data and listen for the asynchronous response.
Request all data
Listen for items
Data extraction is a request-response cycle initiated by the host application.
1. Host Requests Data
The host sends a getAnnotationData message to the canvas.
2. Viewer Compiles Data
The viewer gathers all active markups, measurements, and counts.
3. Viewer Returns Result
The compiled list is broadcast back to the host window.
The response payload returns an array of items, each containing the measurement metadata.
Coordinate your extraction workflows with persistence and selection APIs.
- Creation: Measurement Created
- Save: Save Persistence
- Technical: API Reference
