Datatypes
rerun.datatypes
AbsoluteTimeRangeArrayLike
module-attribute
AbsoluteTimeRangeArrayLike = (
AbsoluteTimeRange | Sequence[AbsoluteTimeRangeLike]
)
A type alias for any AbsoluteTimeRange-like array object.
AbsoluteTimeRangeLike
module-attribute
AbsoluteTimeRangeLike = AbsoluteTimeRange
A type alias for any AbsoluteTimeRange-like object.
AngleArrayLike
module-attribute
A type alias for any Angle-like array object.
AnnotationInfoArrayLike
module-attribute
AnnotationInfoArrayLike = (
AnnotationInfo | Sequence[AnnotationInfoLike]
)
A type alias for any AnnotationInfo-like array object.
AnnotationInfoLike
module-attribute
AnnotationInfoLike = (
AnnotationInfo
| int
| tuple[int, str]
| tuple[int, str, Rgba32Like]
)
A type alias for any AnnotationInfo-like object.
BlobArrayLike
module-attribute
A type alias for any Blob-like array object.
BlobLike
module-attribute
A type alias for any Blob-like object.
BoolArrayLike
module-attribute
A type alias for any Bool-like array object.
ChannelCountPairArrayLike
module-attribute
ChannelCountPairArrayLike = (
ChannelCountPair | Sequence[ChannelCountPairLike]
)
A type alias for any ChannelCountPair-like array object.
ChannelCountPairLike
module-attribute
ChannelCountPairLike = (
ChannelCountPair | tuple[UInt16Like, UInt64Like]
)
A type alias for any ChannelCountPair-like object.
ChannelDatatypeArrayLike
module-attribute
ChannelDatatypeArrayLike = (
ChannelDatatype
| Literal[
"F16",
"F32",
"F64",
"I16",
"I32",
"I64",
"I8",
"U16",
"U32",
"U64",
"U8",
"f16",
"f32",
"f64",
"i16",
"i32",
"i64",
"i8",
"u16",
"u32",
"u64",
"u8",
]
| int
| Sequence[ChannelDatatypeLike]
)
A type alias for any ChannelDatatype-like array object.
ChannelDatatypeLike
module-attribute
ChannelDatatypeLike = (
ChannelDatatype
| Literal[
"F16",
"F32",
"F64",
"I16",
"I32",
"I64",
"I8",
"U16",
"U32",
"U64",
"U8",
"f16",
"f32",
"f64",
"i16",
"i32",
"i64",
"i8",
"u16",
"u32",
"u64",
"u8",
]
| int
)
A type alias for any ChannelDatatype-like object.
ClassDescriptionArrayLike
module-attribute
ClassDescriptionArrayLike = (
ClassDescription | Sequence[ClassDescriptionLike]
)
A type alias for any ClassDescription-like array object.
ClassDescriptionLike
module-attribute
ClassDescriptionLike = ClassDescription | AnnotationInfoLike
A type alias for any ClassDescription-like object.
ClassDescriptionMapElemArrayLike
module-attribute
ClassDescriptionMapElemArrayLike = (
ClassDescriptionMapElem
| Sequence[ClassDescriptionMapElemLike]
)
A type alias for any ClassDescriptionMapElem-like array object.
ClassDescriptionMapElemLike
module-attribute
ClassDescriptionMapElemLike = (
ClassDescriptionMapElem | ClassDescriptionLike
)
A type alias for any ClassDescriptionMapElem-like object.
ClassIdArrayLike
module-attribute
ClassIdArrayLike = (
ClassId | Sequence[ClassIdLike] | int | ArrayLike
)
A type alias for any ClassId-like array object.
ColorModelArrayLike
module-attribute
ColorModelArrayLike = (
ColorModel
| Literal[
"BGR",
"BGRA",
"L",
"RGB",
"RGBA",
"bgr",
"bgra",
"l",
"rgb",
"rgba",
]
| int
| Sequence[ColorModelLike]
)
A type alias for any ColorModel-like array object.
ColorModelLike
module-attribute
ColorModelLike = (
ColorModel
| Literal[
"BGR",
"BGRA",
"L",
"RGB",
"RGBA",
"bgr",
"bgra",
"l",
"rgb",
"rgba",
]
| int
)
A type alias for any ColorModel-like object.
DVec2DArrayLike
module-attribute
DVec2DArrayLike = (
DVec2D
| Sequence[DVec2DLike]
| NDArray[Any]
| ArrayLike
| Sequence[Sequence[float]]
| Sequence[float]
)
A type alias for any DVec2D-like array object.
DVec2DLike
module-attribute
A type alias for any DVec2D-like object.
EntityPathArrayLike
module-attribute
EntityPathArrayLike = (
EntityPath | Sequence[EntityPathLike] | Sequence[str]
)
A type alias for any EntityPath-like array object.
EntityPathLike
module-attribute
EntityPathLike = EntityPath | str
A type alias for any EntityPath-like object.
Float32ArrayLike
module-attribute
Float32ArrayLike = (
Float32
| Sequence[Float32Like]
| NDArray[Any]
| ArrayLike
| Sequence[Sequence[float]]
| Sequence[float]
)
A type alias for any Float32-like array object.
Float32Like
module-attribute
A type alias for any Float32-like object.
Float64ArrayLike
module-attribute
Float64ArrayLike = (
Float64
| Sequence[Float64Like]
| NDArray[Any]
| ArrayLike
| Sequence[Sequence[float]]
| Sequence[float]
)
A type alias for any Float64-like array object.
Float64Like
module-attribute
A type alias for any Float64-like object.
IVec3DArrayLike
module-attribute
IVec3DArrayLike = (
IVec3D
| Sequence[IVec3DLike]
| NDArray[Any]
| ArrayLike
| Sequence[Sequence[int]]
| Sequence[int]
)
A type alias for any IVec3D-like array object.
IVec3DLike
module-attribute
A type alias for any IVec3D-like object.
ImageFormatArrayLike
module-attribute
ImageFormatArrayLike = (
ImageFormat | Sequence[ImageFormatLike]
)
A type alias for any ImageFormat-like array object.
ImageFormatLike
module-attribute
ImageFormatLike = ImageFormat
A type alias for any ImageFormat-like object.
KeypointIdArrayLike
module-attribute
KeypointIdArrayLike = (
KeypointId | Sequence[KeypointIdLike] | int | ArrayLike
)
A type alias for any KeypointId-like array object.
KeypointIdLike
module-attribute
KeypointIdLike = KeypointId | int
A type alias for any KeypointId-like object.
KeypointPairArrayLike
module-attribute
KeypointPairArrayLike = (
KeypointPair | Sequence[KeypointPairLike]
)
A type alias for any KeypointPair-like array object.
KeypointPairLike
module-attribute
KeypointPairLike = KeypointPair | Sequence[KeypointIdLike]
A type alias for any KeypointPair-like object.
Mat3x3ArrayLike
module-attribute
Mat3x3ArrayLike = Mat3x3 | Sequence[Mat3x3Like] | ArrayLike
A type alias for any Mat3x3-like array object.
Mat3x3Like
module-attribute
A type alias for any Mat3x3-like object.
Mat4x4ArrayLike
module-attribute
Mat4x4ArrayLike = Mat4x4 | Sequence[Mat4x4Like]
A type alias for any Mat4x4-like array object.
Mat4x4Like
module-attribute
A type alias for any Mat4x4-like object.
PixelFormatArrayLike
module-attribute
PixelFormatArrayLike = (
PixelFormat
| Literal[
"NV12",
"Y8_FullRange",
"Y8_LimitedRange",
"YUY2",
"Y_U_V12_FullRange",
"Y_U_V12_LimitedRange",
"Y_U_V16_FullRange",
"Y_U_V16_LimitedRange",
"Y_U_V24_FullRange",
"Y_U_V24_LimitedRange",
"nv12",
"y8_fullrange",
"y8_limitedrange",
"y_u_v12_fullrange",
"y_u_v12_limitedrange",
"y_u_v16_fullrange",
"y_u_v16_limitedrange",
"y_u_v24_fullrange",
"y_u_v24_limitedrange",
"yuy2",
]
| int
| Sequence[PixelFormatLike]
)
A type alias for any PixelFormat-like array object.
PixelFormatLike
module-attribute
PixelFormatLike = (
PixelFormat
| Literal[
"NV12",
"Y8_FullRange",
"Y8_LimitedRange",
"YUY2",
"Y_U_V12_FullRange",
"Y_U_V12_LimitedRange",
"Y_U_V16_FullRange",
"Y_U_V16_LimitedRange",
"Y_U_V24_FullRange",
"Y_U_V24_LimitedRange",
"nv12",
"y8_fullrange",
"y8_limitedrange",
"y_u_v12_fullrange",
"y_u_v12_limitedrange",
"y_u_v16_fullrange",
"y_u_v16_limitedrange",
"y_u_v24_fullrange",
"y_u_v24_limitedrange",
"yuy2",
]
| int
)
A type alias for any PixelFormat-like object.
Plane3DArrayLike
module-attribute
Plane3DArrayLike = (
Plane3D
| Sequence[Plane3DLike]
| NDArray[Any]
| ArrayLike
| Sequence[Sequence[float]]
)
A type alias for any Plane3D-like array object.
QuaternionArrayLike
module-attribute
QuaternionArrayLike = (
Quaternion
| Sequence[QuaternionLike]
| NDArray[Any]
| ArrayLike
| Sequence[Sequence[float]]
)
A type alias for any Quaternion-like array object.
QuaternionLike
module-attribute
QuaternionLike = Quaternion
A type alias for any Quaternion-like object.
Range1DArrayLike
module-attribute
Range1DArrayLike = (
Range1D
| Sequence[Range1DLike]
| NDArray[Any]
| ArrayLike
| Sequence[Sequence[float]]
| Sequence[float]
)
A type alias for any Range1D-like array object.
Range1DLike
module-attribute
A type alias for any Range1D-like object.
Range2DArrayLike
module-attribute
Range2DArrayLike = Range2D | Sequence[Range2DLike]
A type alias for any Range2D-like array object.
Rgba32ArrayLike
module-attribute
Rgba32ArrayLike = (
Rgba32 | Sequence[Rgba32Like] | int | ArrayLike
)
A type alias for any Rgba32-like array object.
Rgba32Like
module-attribute
A type alias for any Rgba32-like object.
RotationAxisAngleArrayLike
module-attribute
RotationAxisAngleArrayLike = (
RotationAxisAngle | Sequence[RotationAxisAngleLike]
)
A type alias for any RotationAxisAngle-like array object.
RotationAxisAngleLike
module-attribute
RotationAxisAngleLike = RotationAxisAngle
A type alias for any RotationAxisAngle-like object.
TensorBufferArrayLike
module-attribute
TensorBufferArrayLike = (
TensorBuffer
| NDArray[float16]
| NDArray[float32]
| NDArray[float64]
| NDArray[int16]
| NDArray[int32]
| NDArray[int64]
| NDArray[int8]
| NDArray[uint16]
| NDArray[uint32]
| NDArray[uint64]
| NDArray[uint8]
| Sequence[TensorBufferLike]
)
A type alias for any TensorBuffer-like array object.
TensorBufferLike
module-attribute
TensorBufferLike = (
TensorBuffer
| NDArray[float16]
| NDArray[float32]
| NDArray[float64]
| NDArray[int16]
| NDArray[int32]
| NDArray[int64]
| NDArray[int8]
| NDArray[uint16]
| NDArray[uint32]
| NDArray[uint64]
| NDArray[uint8]
)
A type alias for any TensorBuffer-like object.
TensorDataArrayLike
module-attribute
TensorDataArrayLike = (
TensorData | Sequence[TensorDataLike] | ArrayLike
)
A type alias for any TensorData-like array object.
TensorDataLike
module-attribute
TensorDataLike = TensorData | ArrayLike
A type alias for any TensorData-like object.
TensorDimensionIndexSelectionArrayLike
module-attribute
TensorDimensionIndexSelectionArrayLike = (
TensorDimensionIndexSelection
| Sequence[TensorDimensionIndexSelectionLike]
)
A type alias for any TensorDimensionIndexSelection-like array object.
TensorDimensionIndexSelectionLike
module-attribute
TensorDimensionIndexSelectionLike = (
TensorDimensionIndexSelection
)
A type alias for any TensorDimensionIndexSelection-like object.
TensorDimensionSelectionArrayLike
module-attribute
TensorDimensionSelectionArrayLike = (
TensorDimensionSelection
| Sequence[TensorDimensionSelectionLike]
| ArrayLike
)
A type alias for any TensorDimensionSelection-like array object.
TensorDimensionSelectionLike
module-attribute
TensorDimensionSelectionLike = (
TensorDimensionSelection | int
)
A type alias for any TensorDimensionSelection-like object.
TimeIntArrayLike
module-attribute
TimeIntArrayLike = TimeInt | Sequence[TimeIntLike]
A type alias for any TimeInt-like array object.
TimeRangeArrayLike
module-attribute
TimeRangeArrayLike = TimeRange | Sequence[TimeRangeLike]
A type alias for any TimeRange-like array object.
TimeRangeBoundaryArrayLike
module-attribute
TimeRangeBoundaryArrayLike = (
TimeRangeBoundary
| None
| TimeInt
| Sequence[TimeRangeBoundaryLike]
)
A type alias for any TimeRangeBoundary-like array object.
TimeRangeBoundaryLike
module-attribute
TimeRangeBoundaryLike = TimeRangeBoundary | None | TimeInt
A type alias for any TimeRangeBoundary-like object.
TimeRangeLike
module-attribute
TimeRangeLike = TimeRange
A type alias for any TimeRange-like object.
UInt16ArrayLike
module-attribute
A type alias for any UInt16-like array object.
UInt32ArrayLike
module-attribute
A type alias for any UInt32-like array object.
UInt64ArrayLike
module-attribute
A type alias for any UInt64-like array object.
UVec2DArrayLike
module-attribute
UVec2DArrayLike = (
UVec2D
| Sequence[UVec2DLike]
| NDArray[Any]
| ArrayLike
| Sequence[Sequence[int]]
| Sequence[int]
)
A type alias for any UVec2D-like array object.
UVec2DLike
module-attribute
A type alias for any UVec2D-like object.
UVec3DArrayLike
module-attribute
UVec3DArrayLike = (
UVec3D
| Sequence[UVec3DLike]
| NDArray[Any]
| ArrayLike
| Sequence[Sequence[int]]
| Sequence[int]
)
A type alias for any UVec3D-like array object.
UVec3DLike
module-attribute
A type alias for any UVec3D-like object.
UVec4DArrayLike
module-attribute
UVec4DArrayLike = (
UVec4D
| Sequence[UVec4DLike]
| NDArray[Any]
| ArrayLike
| Sequence[Sequence[int]]
| Sequence[int]
)
A type alias for any UVec4D-like array object.
UVec4DLike
module-attribute
A type alias for any UVec4D-like object.
Utf8ArrayLike
module-attribute
A type alias for any Utf8-like array object.
Utf8PairArrayLike
module-attribute
Utf8PairArrayLike = (
Utf8Pair | Sequence[Utf8PairLike] | NDArray[str_]
)
A type alias for any Utf8Pair-like array object.
Utf8PairLike
module-attribute
A type alias for any Utf8Pair-like object.
UuidArrayLike
module-attribute
UuidArrayLike = (
Uuid
| Sequence[UuidLike]
| NDArray[Any]
| ArrayLike
| Sequence[Sequence[int]]
| Sequence[int]
| Sequence[bytes]
)
A type alias for any Uuid-like array object.
UuidLike
module-attribute
A type alias for any Uuid-like object.
Vec2DArrayLike
module-attribute
Vec2DArrayLike = (
Vec2D
| Sequence[Vec2DLike]
| NDArray[Any]
| ArrayLike
| Sequence[Sequence[float]]
| Sequence[float]
)
A type alias for any Vec2D-like array object.
Vec2DLike
module-attribute
A type alias for any Vec2D-like object.
Vec3DArrayLike
module-attribute
Vec3DArrayLike = (
Vec3D
| Sequence[Vec3DLike]
| NDArray[Any]
| ArrayLike
| Sequence[Sequence[float]]
| Sequence[float]
)
A type alias for any Vec3D-like array object.
Vec3DLike
module-attribute
A type alias for any Vec3D-like object.
Vec4DArrayLike
module-attribute
Vec4DArrayLike = (
Vec4D
| Sequence[Vec4DLike]
| NDArray[Any]
| ArrayLike
| Sequence[Sequence[float]]
| Sequence[float]
)
A type alias for any Vec4D-like array object.
Vec4DLike
module-attribute
A type alias for any Vec4D-like object.
VideoTimestampArrayLike
module-attribute
VideoTimestampArrayLike = (
VideoTimestamp
| Sequence[VideoTimestampLike]
| NDArray[int64]
)
A type alias for any VideoTimestamp-like array object.
VideoTimestampLike
module-attribute
VideoTimestampLike = VideoTimestamp | int
A type alias for any VideoTimestamp-like object.
ViewCoordinatesArrayLike
module-attribute
ViewCoordinatesArrayLike = (
ViewCoordinates
| Sequence[ViewCoordinatesLike]
| ArrayLike
)
A type alias for any ViewCoordinates-like array object.
ViewCoordinatesLike
module-attribute
ViewCoordinatesLike = ViewCoordinates | ArrayLike
A type alias for any ViewCoordinates-like object.
VisibleTimeRangeArrayLike
module-attribute
VisibleTimeRangeArrayLike = (
VisibleTimeRange | Sequence[VisibleTimeRangeLike]
)
A type alias for any VisibleTimeRange-like array object.
VisibleTimeRangeLike
module-attribute
VisibleTimeRangeLike = VisibleTimeRange
A type alias for any VisibleTimeRange-like object.
AbsoluteTimeRange
Bases: AbsoluteTimeRangeExt
Datatype: Two datatypes.TimeInt describing a range of time.
__init__
def __init__(min: TimeIntLike, max: TimeIntLike) -> None
Create a new instance of the AbsoluteTimeRange datatype.
| PARAMETER | DESCRIPTION |
|---|---|
min
|
Beginning of the time range.
TYPE:
|
max
|
End of the time range.
TYPE:
|
AbsoluteTimeRangeBatch
Bases: BaseBatch[AbsoluteTimeRangeArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.
Angle
Bases: AngleExt
Datatype: Angle in radians.
__init__
AngleBatch
Bases: BaseBatch[AngleArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.
AnnotationInfo
Bases: AnnotationInfoExt
Datatype: Annotation info annotating a class id or key-point id.
Color and label will be used to annotate entities/keypoints which reference the id. The id refers either to a class or key-point id
__init__
def __init__(
id: int,
label: Utf8Like | None = None,
color: Rgba32Like | None = None,
) -> None
Create a new instance of the AnnotationInfo datatype.
| PARAMETER | DESCRIPTION |
|---|---|
id
|
TYPE:
|
label
|
The label that will be shown in the UI.
TYPE:
|
color
|
The color that will be applied to the annotated entity.
TYPE:
|
AnnotationInfoBatch
Bases: BaseBatch[AnnotationInfoArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.
Blob
Bases: BlobExt
Datatype: A binary blob of data.
BlobBatch
Bases: BaseBatch[BlobArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.
Bool
Datatype: A single boolean.
BoolBatch
Bases: BaseBatch[BoolArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.
ChannelCountPair
Bases: ChannelCountPairExt
Datatype: A pair representing a channel ID and its associated message count.
__init__
def __init__(
channel_id: UInt16Like, message_count: UInt64Like
) -> None
Create a new instance of the ChannelCountPair datatype.
| PARAMETER | DESCRIPTION |
|---|---|
channel_id
|
The channel ID.
TYPE:
|
message_count
|
The message count for this channel.
TYPE:
|
ChannelCountPairBatch
Bases: BaseBatch[ChannelCountPairArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.
ChannelDatatype
Bases: ChannelDatatypeExt, Enum
Datatype: The innermost datatype of an image.
How individual color channel components are encoded.
F16
class-attribute
instance-attribute
F16 = 33
16-bit IEEE-754 floating point, also known as half.
F32
class-attribute
instance-attribute
F32 = 34
32-bit IEEE-754 floating point, also known as float or single.
F64
class-attribute
instance-attribute
F64 = 35
64-bit IEEE-754 floating point, also known as double.
I16
class-attribute
instance-attribute
I16 = 9
16-bit signed integer.
I32
class-attribute
instance-attribute
I32 = 11
32-bit signed integer.
I64
class-attribute
instance-attribute
I64 = 13
64-bit signed integer.
I8
class-attribute
instance-attribute
I8 = 7
8-bit signed integer.
U16
class-attribute
instance-attribute
U16 = 8
16-bit unsigned integer.
U32
class-attribute
instance-attribute
U32 = 10
32-bit unsigned integer.
U64
class-attribute
instance-attribute
U64 = 12
64-bit unsigned integer.
U8
class-attribute
instance-attribute
U8 = 6
8-bit unsigned integer.
auto
classmethod
def auto(val: str | int | ChannelDatatype) -> ChannelDatatype
Best-effort converter, including a case-insensitive string matcher.
ChannelDatatypeBatch
Bases: BaseBatch[ChannelDatatypeArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.
ClassDescription
Bases: ClassDescriptionExt
Datatype: The description of a semantic Class.
If an entity is annotated with a corresponding components.ClassId, Rerun will use
the attached datatypes.AnnotationInfo to derive labels and colors.
Keypoints within an annotation class can similarly be annotated with a
components.KeypointId in which case we should defer to the label and color for the
datatypes.AnnotationInfo specifically associated with the Keypoint.
Keypoints within the class can also be decorated with skeletal edges.
Keypoint-connections are pairs of components.KeypointIds. If an edge is
defined, and both keypoints exist within the instance of the class, then the
keypoints should be connected with an edge. The edge should be labeled and
colored as described by the class's datatypes.AnnotationInfo.
Note that a ClassDescription can be directly logged using rerun.log.
This is equivalent to logging a rerun.AnnotationContext containing
a single ClassDescription.
__init__
def __init__(
*,
info: AnnotationInfoLike,
keypoint_annotations: Sequence[AnnotationInfoLike]
| None = [],
keypoint_connections: Sequence[KeypointPairLike]
| None = [],
) -> None
Create a new instance of the ClassDescription datatype.
| PARAMETER | DESCRIPTION |
|---|---|
info
|
The
TYPE:
|
keypoint_annotations
|
The
TYPE:
|
keypoint_connections
|
The connections between keypoints.
TYPE:
|
ClassDescriptionBatch
Bases: BaseBatch[ClassDescriptionArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.
ClassDescriptionMapElem
Bases: ClassDescriptionMapElemExt
Datatype: A helper type for mapping datatypes.ClassIds to class descriptions.
This is internal to components.AnnotationContext.
⚠️ This type is unstable and may change significantly in a way that the data won't be backwards compatible.
__init__
def __init__(
class_id: ClassIdLike,
class_description: ClassDescriptionLike,
) -> None
Create a new instance of the ClassDescriptionMapElem datatype.
| PARAMETER | DESCRIPTION |
|---|---|
class_id
|
The key: the
TYPE:
|
class_description
|
The value: class name, color, etc.
TYPE:
|
ClassDescriptionMapElemBatch
Bases: BaseBatch[ClassDescriptionMapElemArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.
ClassId
Datatype: A 16-bit ID representing a type of semantic class.
ClassIdBatch
Bases: BaseBatch[ClassIdArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.
ColorModel
Bases: ColorModelExt, Enum
Datatype: Specified what color components are present in an archetypes.Image.
This combined with datatypes.ChannelDatatype determines the pixel format of an image.
BGR
class-attribute
instance-attribute
BGR = 4
Blue, Green, Red
BGRA
class-attribute
instance-attribute
BGRA = 5
Blue, Green, Red, Alpha
L
class-attribute
instance-attribute
L = 1
Grayscale luminance intencity/brightness/value, sometimes called Y
RGB
class-attribute
instance-attribute
RGB = 2
Red, Green, Blue
RGBA
class-attribute
instance-attribute
RGBA = 3
Red, Green, Blue, Alpha
auto
classmethod
def auto(val: str | int | ColorModel) -> ColorModel
Best-effort converter, including a case-insensitive string matcher.
ColorModelBatch
Bases: BaseBatch[ColorModelArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.
DVec2D
Bases: DVec2DExt
Datatype: A double-precision vector in 2D space.
DVec2DBatch
Bases: BaseBatch[DVec2DArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.
EntityPath
Datatype: A path to an entity in the ChunkStore.
__init__
def __init__(path: EntityPathLike) -> None
Create a new instance of the EntityPath datatype.
EntityPathBatch
Bases: BaseBatch[EntityPathArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.
Float32
Datatype: A single-precision 32-bit IEEE 754 floating point number.
Float32Batch
Bases: BaseBatch[Float32ArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.
Float64
Datatype: A double-precision 64-bit IEEE 754 floating point number.
Float64Batch
Bases: BaseBatch[Float64ArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.
IVec3D
Bases: IVec3DExt
Datatype: An int32 vector in 3D space.
IVec3DBatch
Bases: BaseBatch[IVec3DArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.
ImageFormat
Bases: ImageFormatExt
Datatype: The metadata describing the contents of a components.ImageBuffer.
__init__
def __init__(
width: int,
height: int,
*,
pixel_format: PixelFormatLike | None = None,
color_model: ColorModelLike | None = None,
channel_datatype: ChannelDatatypeLike | None = None,
) -> None
Create a new instance of the ImageFormat datatype.
| PARAMETER | DESCRIPTION |
|---|---|
width
|
The width of the image in pixels.
TYPE:
|
height
|
The height of the image in pixels.
TYPE:
|
pixel_format
|
Used mainly for chroma downsampled formats and differing number of bits per channel. If specified, this takes precedence over both
TYPE:
|
color_model
|
L, RGB, RGBA, … Also requires a
TYPE:
|
channel_datatype
|
The data type of each channel (e.g. the red channel) of the image data (U8, F16, …). Also requires a
TYPE:
|
ImageFormatBatch
Bases: BaseBatch[ImageFormatArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.
KeypointId
Datatype: A 16-bit ID representing a type of semantic keypoint within a class.
KeypointIds are only meaningful within the context of a [rerun.datatypes.ClassDescription].
Used to look up an [rerun.datatypes.AnnotationInfo] for a Keypoint within the
[rerun.components.AnnotationContext].
KeypointIdBatch
Bases: BaseBatch[KeypointIdArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.
KeypointPair
Bases: KeypointPairExt
Datatype: A connection between two datatypes.KeypointIds.
__init__
def __init__(
keypoint0: KeypointIdLike, keypoint1: KeypointIdLike
) -> None
Create a new instance of the KeypointPair datatype.
| PARAMETER | DESCRIPTION |
|---|---|
keypoint0
|
The first point of the pair.
TYPE:
|
keypoint1
|
The second point of the pair.
TYPE:
|
KeypointPairBatch
Bases: BaseBatch[KeypointPairArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.
Mat3x3
Bases: Mat3x3Ext
Datatype: A 3x3 Matrix.
Matrices in Rerun are stored as flat list of coefficients in column-major order:
column 0 column 1 column 2
-------------------------------------------------
row 0 | flat_columns[0] flat_columns[3] flat_columns[6]
row 1 | flat_columns[1] flat_columns[4] flat_columns[7]
row 2 | flat_columns[2] flat_columns[5] flat_columns[8]
However, construction is done from a list of rows, which follows NumPy's convention:
np.testing.assert_array_equal(
rr.datatypes.Mat3x3([1, 2, 3, 4, 5, 6, 7, 8, 9]).flat_columns, np.array([1, 4, 7, 2, 5, 8, 3, 6, 9], dtype=np.float32)
)
np.testing.assert_array_equal(
rr.datatypes.Mat3x3([[1, 2, 3], [4, 5, 6], [7, 8, 9]]).flat_columns,
np.array([1, 4, 7, 2, 5, 8, 3, 6, 9], dtype=np.float32),
)
columns parameter:
np.testing.assert_array_equal(
rr.datatypes.Mat3x3(columns=[1, 2, 3, 4, 5, 6, 7, 8, 9]).flat_columns,
np.array([1, 2, 3, 4, 5, 6, 7, 8, 9], dtype=np.float32),
)
np.testing.assert_array_equal(
rr.datatypes.Mat3x3(columns=[[1, 2, 3], [4, 5, 6], [7, 8, 9]]).flat_columns,
np.array([1, 2, 3, 4, 5, 6, 7, 8, 9], dtype=np.float32),
)
Mat3x3Batch
Bases: BaseBatch[Mat3x3ArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.
Mat4x4
Bases: Mat4x4Ext
Datatype: A 4x4 Matrix.
Matrices in Rerun are stored as flat list of coefficients in column-major order:
column 0 column 1 column 2 column 3
--------------------------------------------------------------------
row 0 | flat_columns[0] flat_columns[4] flat_columns[8] flat_columns[12]
row 1 | flat_columns[1] flat_columns[5] flat_columns[9] flat_columns[13]
row 2 | flat_columns[2] flat_columns[6] flat_columns[10] flat_columns[14]
row 3 | flat_columns[3] flat_columns[7] flat_columns[11] flat_columns[15]
However, construction is done from a list of rows, which follows NumPy's convention:
np.testing.assert_array_equal(
rr.datatypes.Mat4x4([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]).flat_columns,
np.array([1, 5, 9, 13, 2, 6, 10, 14, 3, 7, 11, 15, 4, 8, 12, 16], dtype=np.float32),
)
np.testing.assert_array_equal(
rr.datatypes.Mat4x4([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 16]]).flat_columns,
np.array([1, 5, 9, 13, 2, 6, 10, 14, 3, 7, 11, 15, 4, 8, 12, 16], dtype=np.float32),
)
columns parameter:
np.testing.assert_array_equal(
rr.datatypes.Mat4x4(columns=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]).flat_columns,
np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16], dtype=np.float32),
)
np.testing.assert_array_equal(
rr.datatypes.Mat4x4(columns=[[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 16]]).flat_columns,
np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16], dtype=np.float32),
)
Mat4x4Batch
Bases: BaseBatch[Mat4x4ArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.
PixelFormat
Bases: Enum
Datatype: Specifieds a particular format of an archetypes.Image.
Most images can be described by a datatypes.ColorModel and a datatypes.ChannelDatatype,
e.g. RGB and U8 respectively.
However, some image formats has chroma downsampling and/or
use differing number of bits per channel, and that is what this datatypes.PixelFormat is for.
All these formats support random access.
For more compressed image formats, see archetypes.EncodedImage.
NV12
class-attribute
instance-attribute
NV12 = 26
NV12 (aka Y_UV12) is a YUV 4:2:0 chroma downsampled form at with 12 bits per pixel and 8 bits per channel.
This uses limited range YUV, i.e. Y is expected to be within [16, 235] and U/V within [16, 240].
First comes entire image in Y in one plane, followed by a plane with interleaved lines ordered as U0, V0, U1, V1, etc.
Y8_FullRange
class-attribute
instance-attribute
Y8_FullRange = 30
Monochrome Y plane only, essentially a YUV 4:0:0 planar format.
Also known as just "gray". This is virtually identical to a 8bit luminance/grayscale (see datatypes.ColorModel).
This uses entire range YUV, i.e. Y is expected to be within [0, 255]. (as opposed to "limited range" YUV as used e.g. in NV12).
Y8_LimitedRange
class-attribute
instance-attribute
Y8_LimitedRange = 41
Monochrome Y plane only, essentially a YUV 4:0:0 planar format.
Also known as just "gray".
This uses limited range YUV, i.e. Y is expected to be within [16, 235].
If not for this range limitation/remapping, this is almost identical to 8bit luminace/grayscale (see datatypes.ColorModel).
YUY2
class-attribute
instance-attribute
YUY2 = 27
YUY2 (aka 'YUYV', 'YUYV16' or 'NV21'), is a YUV 4:2:2 chroma downsampled format with 16 bits per pixel and 8 bits per channel.
This uses limited range YUV, i.e. Y is expected to be within [16, 235] and U/V within [16, 240].
The order of the channels is Y0, U0, Y1, V0, all in the same plane.
Y_U_V12_FullRange
class-attribute
instance-attribute
Y_U_V12_FullRange = 44
Y_U_V12 is a YUV 4:2:0 fully planar YUV format without chroma downsampling, also known as I420.
This uses full range YUV with all components ranging from 0 to 255 (as opposed to "limited range" YUV as used e.g. in NV12).
First comes entire image in Y in one plane, followed by the U and V planes, which each only have half the resolution of the Y plane.
Y_U_V12_LimitedRange
class-attribute
instance-attribute
Y_U_V12_LimitedRange = 20
Y_U_V12 is a YUV 4:2:0 fully planar YUV format without chroma downsampling, also known as I420.
This uses limited range YUV, i.e. Y is expected to be within [16, 235] and U/V within [16, 240].
First comes entire image in Y in one plane, followed by the U and V planes, which each only have half the resolution of the Y plane.
Y_U_V16_FullRange
class-attribute
instance-attribute
Y_U_V16_FullRange = 50
Y_U_V16 is a YUV 4:2:2 fully planar YUV format without chroma downsampling, also known as I422.
This uses full range YUV with all components ranging from 0 to 255 (as opposed to "limited range" YUV as used e.g. in NV12).
First comes entire image in Y in one plane, followed by the U and V planes, which each only have half the horizontal resolution of the Y plane.
Y_U_V16_LimitedRange
class-attribute
instance-attribute
Y_U_V16_LimitedRange = 49
Y_U_V16 is a YUV 4:2:2 fully planar YUV format without chroma downsampling, also known as I422.
This uses limited range YUV, i.e. Y is expected to be within [16, 235] and U/V within [16, 240].
First comes entire image in Y in one plane, followed by the U and V planes, which each only have half the horizontal resolution of the Y plane.
Y_U_V24_FullRange
class-attribute
instance-attribute
Y_U_V24_FullRange = 40
Y_U_V24 is a YUV 4:4:4 fully planar YUV format without chroma downsampling, also known as I444.
This uses full range YUV with all components ranging from 0 to 255 (as opposed to "limited range" YUV as used e.g. in NV12).
First comes entire image in Y in one plane, followed by the U and V planes.
Y_U_V24_LimitedRange
class-attribute
instance-attribute
Y_U_V24_LimitedRange = 39
Y_U_V24 is a YUV 4:4:4 fully planar YUV format without chroma downsampling, also known as I444.
This uses limited range YUV, i.e. Y is expected to be within [16, 235] and U/V within [16, 240].
First comes entire image in Y in one plane, followed by the U and V planes.
auto
classmethod
def auto(val: str | int | PixelFormat) -> PixelFormat
Best-effort converter, including a case-insensitive string matcher.
PixelFormatBatch
Bases: BaseBatch[PixelFormatArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.
Plane3D
Bases: Plane3DExt
Datatype: An infinite 3D plane represented by a unit normal vector and a distance.
Any point P on the plane fulfills the equation dot(xyz, P) - d = 0,
where xyz is the plane's normal and d the distance of the plane from the origin.
This representation is also known as the Hesse normal form.
Note: although the normal will be passed through to the datastore as provided, when used in the Viewer, planes will always be normalized. I.e. the plane with xyz = (2, 0, 0), d = 1 is equivalent to xyz = (1, 0, 0), d = 0.5
__init__
Plane3DBatch
Bases: BaseBatch[Plane3DArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.
Quaternion
Bases: QuaternionExt
Datatype: A Quaternion represented by 4 real numbers.
Note: although the x,y,z,w components of the quaternion will be passed through to the datastore as provided, when used in the Viewer Quaternions will always be normalized.
QuaternionBatch
Bases: BaseBatch[QuaternionArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.
Range1D
Bases: Range1DExt
Datatype: A 1D range, specifying a lower and upper bound.
Range1DBatch
Bases: BaseBatch[Range1DArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.
Range2D
Datatype: An Axis-Aligned Bounding Box in 2D space, implemented as the minimum and maximum corners.
__init__
def __init__(
x_range: Range1DLike, y_range: Range1DLike
) -> None
Create a new instance of the Range2D datatype.
| PARAMETER | DESCRIPTION |
|---|---|
x_range
|
The range of the X-axis (usually left and right bounds).
TYPE:
|
y_range
|
The range of the Y-axis (usually top and bottom bounds).
TYPE:
|
Range2DBatch
Bases: BaseBatch[Range2DArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.
Rgba32
Bases: Rgba32Ext
Datatype: An RGBA color with unmultiplied/separate alpha, in sRGB gamma space with linear alpha.
The color is stored as a 32-bit integer, where the most significant
byte is R and the least significant byte is A.
Float colors are assumed to be in 0-1 gamma sRGB space. All other colors are assumed to be in 0-255 gamma sRGB space. If there is an alpha, we assume it is in linear space, and separate (NOT pre-multiplied).
Rgba32Batch
Bases: BaseBatch[Rgba32ArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.
RotationAxisAngle
Bases: RotationAxisAngleExt
Datatype: 3D rotation represented by a rotation around a given axis.
__init__
def __init__(
axis: Vec3DLike,
angle: AngleLike | None = None,
*,
radians: float | None = None,
degrees: float | None = None,
) -> None
Create a new instance of the RotationAxisAngle datatype.
| PARAMETER | DESCRIPTION |
|---|---|
axis
|
Axis to rotate around. This is not required to be normalized. If normalization fails (typically because the vector is length zero), the rotation is silently ignored.
TYPE:
|
angle
|
How much to rotate around the axis.
TYPE:
|
radians
|
How much to rotate around the axis, in radians. Specify this instead of
TYPE:
|
degrees
|
How much to rotate around the axis, in degrees. Specify this instead of
TYPE:
|
RotationAxisAngleBatch
Bases: BaseBatch[RotationAxisAngleArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.
TensorBuffer
Bases: TensorBufferExt
Datatype: The underlying storage for archetypes.Tensor.
Tensor elements are stored in a contiguous buffer of a single type.
inner
class-attribute
instance-attribute
inner: (
NDArray[float16]
| NDArray[float32]
| NDArray[float64]
| NDArray[int16]
| NDArray[int32]
| NDArray[int64]
| NDArray[int8]
| NDArray[uint16]
| NDArray[uint32]
| NDArray[uint64]
| NDArray[uint8]
) = field(converter=inner__field_converter_override)
Must be one of:
-
U8 (npt.NDArray[np.uint8]): 8bit unsigned integer.
-
U16 (npt.NDArray[np.uint16]): 16bit unsigned integer.
-
U32 (npt.NDArray[np.uint32]): 32bit unsigned integer.
-
U64 (npt.NDArray[np.uint64]): 64bit unsigned integer.
-
I8 (npt.NDArray[np.int8]): 8bit signed integer.
-
I16 (npt.NDArray[np.int16]): 16bit signed integer.
-
I32 (npt.NDArray[np.int32]): 32bit signed integer.
-
I64 (npt.NDArray[np.int64]): 64bit signed integer.
-
F16 (npt.NDArray[np.float16]): 16bit IEEE-754 floating point, also known as
half. -
F32 (npt.NDArray[np.float32]): 32bit IEEE-754 floating point, also known as
floatorsingle. -
F64 (npt.NDArray[np.float64]): 64bit IEEE-754 floating point, also known as
double.
TensorBufferBatch
Bases: BaseBatch[TensorBufferArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.
TensorData
Bases: TensorDataExt
Datatype: An N-dimensional array of numbers.
The number of dimensions and their respective lengths is specified by the shape field.
The dimensions are ordered from outermost to innermost. For example, in the common case of
a 2D RGB Image, the shape would be [height, width, channel].
These dimensions are combined with an index to look up values from the buffer field,
which stores a contiguous array of typed values.
It's not currently possible to use send_columns with tensors since construction
of rerun.components.TensorDataBatch does not support more than a single element.
This will be addressed as part of https://github.com/rerun-io/rerun/issues/6832.
__init__
def __init__(
*,
shape: Sequence[int] | None = None,
buffer: TensorBufferLike | None = None,
array: TensorLike | None = None,
dim_names: Sequence[str] | None = None,
) -> None
Construct a TensorData object.
The TensorData object is internally represented by three fields: shape and buffer.
This constructor provides additional arguments 'array', and 'dim_names'. When passing in a
multi-dimensional array such as a np.ndarray, the shape and buffer fields will be
populated automagically.
| PARAMETER | DESCRIPTION |
|---|---|
self
|
The TensorData object to construct.
TYPE:
|
shape
|
The shape of the tensor. If None, and an array is provided, the shape will be inferred from the shape of the array. |
buffer
|
The buffer of the tensor. If None, and an array is provided, the buffer will be generated from the array.
TYPE:
|
array
|
A numpy array (or The array of the tensor. If None, the array will be inferred from the buffer.
TYPE:
|
dim_names
|
The names of the tensor dimensions. |
TensorDataBatch
Bases: BaseBatch[TensorDataArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.
TensorDimensionIndexSelection
Datatype: Indexing a specific tensor dimension.
Selecting dimension=2 and index=42 is similar to doing tensor[:, :, 42, :, :, …] in numpy.
TensorDimensionIndexSelectionBatch
Bases: BaseBatch[TensorDimensionIndexSelectionArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.
TensorDimensionSelection
Bases: TensorDimensionSelectionExt
Datatype: Selection of a single tensor dimension.
TensorDimensionSelectionBatch
Bases: BaseBatch[TensorDimensionSelectionArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.
TimeInt
Bases: TimeIntExt
Datatype: A 64-bit number describing either nanoseconds OR sequence numbers.
__init__
def __init__(*, seq: int) -> None
def __init__(*, seconds: float) -> None
def __init__(*, nanos: int) -> None
def __init__(
*,
seq: int | None = None,
seconds: float | None = None,
nanos: int | None = None,
) -> None
Create a new instance of the TimeInt datatype.
Exactly one of seq, seconds, or nanos must be provided.
| PARAMETER | DESCRIPTION |
|---|---|
seq
|
Time as a sequence number.
TYPE:
|
seconds
|
Time in seconds. Interpreted either as a duration or time since unix epoch (depending on timeline type).
TYPE:
|
nanos
|
Time in nanoseconds. Interpreted either as a duration or time since unix epoch (depending on timeline type).
TYPE:
|
TimeIntBatch
Bases: BaseBatch[TimeIntArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.
TimeRange
Datatype: Visible time range bounds for a specific timeline.
__init__
def __init__(
start: TimeRangeBoundaryLike, end: TimeRangeBoundaryLike
) -> None
Create a new instance of the TimeRange datatype.
| PARAMETER | DESCRIPTION |
|---|---|
start
|
Low time boundary for sequence timeline.
TYPE:
|
end
|
High time boundary for sequence timeline.
TYPE:
|
TimeRangeBatch
Bases: BaseBatch[TimeRangeArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.
TimeRangeBoundary
Bases: TimeRangeBoundaryExt
Datatype: Left or right boundary of a time range.
inner
class-attribute
instance-attribute
inner: None | TimeInt = field()
Must be one of:
-
CursorRelative (datatypes.TimeInt): Boundary is a value relative to the time cursor.
-
Absolute (datatypes.TimeInt): Boundary is an absolute value.
-
Infinite (None): The boundary extends to infinity.
kind
class-attribute
instance-attribute
kind: Literal["cursor_relative", "absolute", "infinite"] = (
field(default="cursor_relative")
)
Possible values:
-
"cursor_relative": Boundary is a value relative to the time cursor.
-
"absolute": Boundary is an absolute value.
-
"infinite": The boundary extends to infinity.
absolute
staticmethod
def absolute(time: TimeInt) -> TimeRangeBoundary
def absolute(*, seq: int) -> TimeRangeBoundary
def absolute(*, seconds: float) -> TimeRangeBoundary
def absolute(*, nanos: int) -> TimeRangeBoundary
def absolute(
time: TimeInt | None = None,
*,
seq: int | None = None,
seconds: float | None = None,
nanos: int | None = None,
) -> TimeRangeBoundary
Boundary that is at an absolute time.
Exactly one of 'time', 'seq', 'seconds', or 'nanos' must be provided.
| PARAMETER | DESCRIPTION |
|---|---|
time
|
Absolute time.
TYPE:
|
seq
|
Absolute time in sequence numbers. Not compatible with temporal timelines.
TYPE:
|
seconds
|
Absolute time in seconds. Interpreted either as a duration or time since unix epoch (depending on timeline type). Not compatible with sequence timelines.
TYPE:
|
nanos
|
Absolute time in nanoseconds. Interpreted either as a duration or time since unix epoch (depending on timeline type). Not compatible with sequence timelines.
TYPE:
|
cursor_relative
staticmethod
def cursor_relative() -> TimeRangeBoundary
def cursor_relative(offset: TimeInt) -> TimeRangeBoundary
def cursor_relative(*, seq: int) -> TimeRangeBoundary
def cursor_relative(*, seconds: float) -> TimeRangeBoundary
def cursor_relative(*, nanos: int) -> TimeRangeBoundary
def cursor_relative(
offset: TimeInt | None = None,
*,
seq: int | None = None,
seconds: float | None = None,
nanos: int | None = None,
) -> TimeRangeBoundary
Boundary that is relative to the timeline cursor.
The offset can be positive or negative. An offset of zero (the default) means the cursor time itself.
| PARAMETER | DESCRIPTION |
|---|---|
offset
|
Offset from the cursor time. Mutually exclusive with seq, seconds and nanos.
TYPE:
|
seq
|
Offset in sequence numbers. Use this for sequence timelines. Mutually exclusive with time, seconds and nanos.
TYPE:
|
seconds
|
Offset in seconds. Use this for time based timelines. Mutually exclusive with time, seq and nanos.
TYPE:
|
nanos
|
Offset in nanoseconds. Use this for time based timelines. Mutually exclusive with time, seq and seconds.
TYPE:
|
infinite
staticmethod
def infinite() -> TimeRangeBoundary
Boundary that extends to infinity.
Depending on the context, this can mean the beginning or the end of the timeline.
TimeRangeBoundaryBatch
Bases: BaseBatch[TimeRangeBoundaryArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.
UInt16
Datatype: A 16bit unsigned integer.
UInt16Batch
Bases: BaseBatch[UInt16ArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.
UInt32
Datatype: A 32bit unsigned integer.
UInt32Batch
Bases: BaseBatch[UInt32ArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.
UInt64
Datatype: A 64bit unsigned integer.
UInt64Batch
Bases: BaseBatch[UInt64ArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.
UVec2D
Bases: UVec2DExt
Datatype: A uint32 vector in 2D space.
UVec2DBatch
Bases: BaseBatch[UVec2DArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.
UVec3D
Bases: UVec3DExt
Datatype: A uint32 vector in 3D space.
UVec3DBatch
Bases: BaseBatch[UVec3DArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.
UVec4D
Datatype: A uint vector in 4D space.
UVec4DBatch
Bases: BaseBatch[UVec4DArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.
Utf8
Datatype: A string of text, encoded as UTF-8.
Utf8Batch
Bases: BaseBatch[Utf8ArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.
Utf8Pair
Utf8PairBatch
Bases: BaseBatch[Utf8PairArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.
Uuid
UuidBatch
Bases: BaseBatch[UuidArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.
Vec2D
Bases: Vec2DExt
Datatype: A vector in 2D space.
Vec2DBatch
Bases: BaseBatch[Vec2DArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.
Vec3D
Bases: Vec3DExt
Datatype: A vector in 3D space.
Vec3DBatch
Bases: BaseBatch[Vec3DArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.
Vec4D
Bases: Vec4DExt
Datatype: A vector in 4D space.
Vec4DBatch
Bases: BaseBatch[Vec4DArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.
VideoTimestamp
Datatype: Presentation timestamp within a archetypes.AssetVideo.
Specified in nanoseconds. Presentation timestamps are typically measured as time since video start.
__init__
def __init__(timestamp_ns: VideoTimestampLike) -> None
Create a new instance of the VideoTimestamp datatype.
| PARAMETER | DESCRIPTION |
|---|---|
timestamp_ns
|
Presentation timestamp value in nanoseconds.
TYPE:
|
VideoTimestampBatch
Bases: BaseBatch[VideoTimestampArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.
ViewCoordinates
Bases: ViewCoordinatesExt
Datatype: How we interpret the coordinate system of an entity/space.
For instance: What is "up"? What does the Z axis mean?
The three coordinates are always ordered as [x, y, z].
For example [Right, Down, Forward] means that the X axis points to the right, the Y axis points down, and the Z axis points forward.
⚠ Rerun does not yet support left-handed coordinate systems.
The following constants are used to represent the different directions: * Up = 1 * Down = 2 * Right = 3 * Left = 4 * Forward = 5 * Back = 6
⚠️ This type is unstable and may change significantly in a way that the data won't be backwards compatible.
__init__
def __init__(coordinates: ViewCoordinatesLike) -> None
Create a new instance of the ViewCoordinates datatype.
| PARAMETER | DESCRIPTION |
|---|---|
coordinates
|
The directions of the [x, y, z] axes.
TYPE:
|
ViewCoordinatesBatch
Bases: BaseBatch[ViewCoordinatesArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.
VisibleTimeRange
Bases: VisibleTimeRangeExt
Datatype: Visible time range bounds for a specific timeline.
Example
Time-windowed trails (e.g. Trajectories):
import math
import rerun as rr
import rerun.blueprint as rrb
def point(t: float, phase: float) -> list[float]:
# Sample a point on a helix.
angle = 0.5 * t + phase
return [math.cos(angle), math.sin(angle), 0.1 * t]
rr.init("rerun_example_line_strips3d_time_window", spawn=True)
# Configure the visible time range in the blueprint.
# You can also override this per entity.
rr.send_blueprint(
rrb.Spatial3DView(
origin="/",
time_ranges=rrb.VisibleTimeRange(
"time",
start=rrb.TimeRangeBoundary.cursor_relative(seconds=-5.0),
end=rrb.TimeRangeBoundary.cursor_relative(),
),
)
)
# Log the line strip increments with timestamps.
for i in range(600):
t0 = i / 30.0
t1 = (i + 1) / 30.0
rr.set_time("time", duration=t1)
rr.log(
"trails",
rr.LineStrips3D(
[
[point(t0, 0.0), point(t1, 0.0)],
[point(t0, math.pi), point(t1, math.pi)],
],
colors=[[255, 120, 0], [0, 180, 255]],
radii=0.02,
),
)
__init__
def __init__(
timeline: Utf8Like,
range: TimeRangeLike | None = None,
*,
start: TimeRangeBoundary | None = None,
end: TimeRangeBoundary | None = None,
) -> None
Create a new instance of the VisibleTimeRange datatype.
| PARAMETER | DESCRIPTION |
|---|---|
timeline
|
Name of the timeline this applies to.
TYPE:
|
range
|
Time range to use for this timeline.
TYPE:
|
start
|
Low time boundary for sequence timeline. Specify this instead of
TYPE:
|
end
|
High time boundary for sequence timeline. Specify this instead of
TYPE:
|
VisibleTimeRangeBatch
Bases: BaseBatch[VisibleTimeRangeArrayLike]
__init__
def __init__(
data: T | None, strict: bool | None = None
) -> None
Construct a new batch.
This method must flexibly accept native data (which comply with type T). Subclasses must provide a type
parameter specifying the type of the native data (this is automatically handled by the code generator).
A value of None indicates that the component should be cleared and results in the creation of an empty array.
The actual creation of the Arrow array is delegated to the _native_to_pa_array() method, which is not
implemented by default.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to convert into an Arrow array.
TYPE:
|
strict
|
Whether to raise an exception if the data cannot be converted into an Arrow array. If None, the value
defaults to the value of the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
The Arrow array encapsulating the data.
|
|
as_arrow_array
def as_arrow_array() -> Array
The component as an arrow batch.
Part of the rerun.ComponentBatchLike logging interface.