LabelRowV2.get_spaces() and LabelRowV2.get_space(). Each Space manages the object and classification instances for one data unit within a Label Row, and every modality has its own Space class in the objects.spaces module.
The examples below are grouped by the four labelling patterns the Space classes fall into. Pick the one that matches your data:
For the full end-to-end Data Group workflow (root spaces, multi-layer groups,
layout_key targeting), see Data Groups & Label Spaces.Get a Space
Every Space is obtained from an initialised Label Row. You can list all Spaces, or fetch a specific one by storage-item ID or Data Grouplayout_key.
List all Spaces in a Label Row
Shared Space methods
Every Space subclass inherits these read and remove methods from the base Space class, regardless of modality.
Image space (geometric, single-frame)
ImageSpace handles a single image. Objects are positioned with coordinates only — there is no frames argument. Classifications apply to the whole image.
ImageSpace
Video space (multi-frame)
VideoSpace (also used for image sequences) and the other multi-frame spaces (MedicalSpace for DICOM/NIfTI, PdfSpace) require both frames= and coordinates=. Iterating annotations exposes the frame each annotation sits on.
VideoSpace
For DICOM/NIfTI use
type_="medical", and for PDFs use type_="pdf" (where frames refers to the page number). The frames=/coordinates= call is identical.Audio space (range)
Range spaces —AudioSpace, TextSpace, HTMLSpace, TimeSeriesSpace — position objects over one-dimensional ranges instead of frames. get_object_ranges() returns the ranges an instance occupies, and range on_overlap additionally supports "merge".
AudioSpace
TextSpace, HTMLSpace, and TimeSeriesSpace follow the same ranges= pattern. HTML uses HtmlRange/HtmlNode (from encord.objects.html_node import HtmlRange, HtmlNode) instead of Range.Point cloud space
PointCloudFileSpace is a range space for 3D scenes. Segmentation objects are positioned either with Range objects over point indices or with an Encord-compatible RLE string. Its metadata is a SceneMetadata (exposing stream_id, uri, and event_index).
PointCloudFileSpace
on_overlap semantics differ by pattern: geometric and multi-frame spaces accept "error" (default) and "replace"; range and point cloud spaces additionally accept "merge" to add new ranges while keeping existing annotations.
