Layer Service
app.application.services.tracking.layer_serviceTracking layer (Layer C/D) CRUD operations and track management.
See Also
Direction— selects the direction for track propagationUnifiedLayerService— coordinates operations across layers
Layer: Application. Context: Coordinates domain state and infrastructure to complete application use cases.
TrackingLayerService
Bases: QObject
Manages user-editable tracking layer (DataLayer.D) operations.
Responsibilities
- CRUD operations for
DataLayer.Dtracked objects. - Copy tracks to adjacent frames.
- Delete tracks by ID (removes across all frames matching ID).
- Reset tracks (revert to
DataLayer.Craw tracking output). - Track lifecycle management.
Note
DataLayer.C — Post-processed immutable tracking output (machine-written).
DataLayer.D — User-editable tracks seeded from C, allowing corrections.
Tracks persist across frames (track ID unites multiple frame detections).
User edits don't affect DataLayer.C (can always revert).
Design pattern: New tracking output eagerly seeds Layer D; older sessions retain JIT seeding. User edits to Layer D are persistent (survives re-rendering). Layer C is immutable reference point.
| PARAMETER | DESCRIPTION |
|---|---|
app
|
Application adapted for session lookup and tracking-layer reads and mutations.
TYPE:
|
__init__(app: Application) -> None
delete_tracks_by_id_and_direction(s_id: SessionId, t_id: str, direction: Direction) -> None
Delete a track's later or earlier occurrences in reviewed Layer D.
| PARAMETER | DESCRIPTION |
|---|---|
s_id
|
Identifier of the session whose tracks are edited.
TYPE:
|
t_id
|
Track identifier to delete from subsequent or preceding frames.
TYPE:
|
direction
|
Whether to delete forward from or backward before the current frame.
TYPE:
|
| RAISES | DESCRIPTION |
|---|---|
UnsupportedDirectionException
|
If direction is neither NEXT nor PREV. |
Side Effects
Seeds absent D frames from C using the same filters as tab reads. Resolves display IDs to storage keys before deletion. Current frame, initialized edits, and immutable C remain intact; empty D entries prevent deleted tracks from being re-seeded on subsequent reads.