spz_io – SPZ / PLY I/O¶
- 3dgs_io.spz_io.is_ngsp_stream(data)¶
True when
datastarts with the NGSP (SPZ v4+, zstd) magic.- Return type:
- 3dgs_io.spz_io.append_spz_extension(data, ext_type, payload)¶
Return
datawith one extension record appended to its extension zone.ext_typeis the 32-bit SPZ extension type (vendor ID in the high 16 bits, extension ID in the low 16). The record is inserted at the end of the plaintext extension zone and the header’stocByteOffset/ has-extensions flag are updated accordingly.- Return type:
- 3dgs_io.spz_io.read_spz_extensions(data)¶
Parse the extension zone of an NGSP v4+ stream into
{type: payload}.Returns an empty dict when the file carries no extensions. Duplicate types keep the last record, mirroring spz’s own last-wins parsing.
- 3dgs_io.spz_io.load_spz(path)¶
Load an SPZ file and return a GaussianCloud.
Coordinates are converted to glTF (RUB) coordinate system.
- Return type:
GaussianCloud
- 3dgs_io.spz_io.save_spz(gc, path)¶
Save a GaussianCloud to an SPZ file.
Converts from internal glTF (RUB) coordinate system.
- Return type:
- 3dgs_io.spz_io.load_spz_world(path)¶
Load an SPZ whose numeric axes already use the scene’s ENU world frame.
- Return type:
GaussianCloud
- 3dgs_io.spz_io.save_spz_world(gc, path)¶
Save ENU world-frame values without applying an implicit axis conversion.
- Return type:
- 3dgs_io.spz_io.load_spz_world_bytes(data)¶
Decode an in-memory SPZ stream whose axes are already the world frame.
- Return type:
GaussianCloud
- 3dgs_io.spz_io.save_spz_world_bytes(gc)¶
Encode
gcto an SPZ stream without an implicit axis conversion.- Return type:
- 3dgs_io.spz_io.load_ply(path)¶
Load a PLY file (3DGS training output) and return a GaussianCloud.
Coordinates are converted from COLMAP (RDF) to glTF (RUB) coordinate system.
- Return type:
GaussianCloud