Formats#
The mosaic.formats module provides file I/O for the geometry, density,
and session formats used throughout Mosaic. Most user code only needs the
high-level entry points open_file(), open_session(), and
write_session(); the lower-level container types are listed for
completeness.
Reading#
open_file() dispatches to the right parser based on the file extension
and returns a GeometryDataContainer of one or more entities.
|
Open and parse a file based on its extension. |
Writing#
|
|
|
Write 3D density data to file (typically in CCP4/MRC format). |
Session Files#
Mosaic sessions are written in an indexed binary format that bundles the pickled application state with optional auxiliary sections (thumbnails, metadata, …). The helpers below read and write those archives.
|
Return |
|
Read session state, handling both legacy and indexed formats. |
|
Write a session file in the indexed format. |
|
Read the session file index. |
|
Read session metadata without loading geometry data. |
|
Read raw bytes for a named section without decoding. |
Streaming#
Helpers for chunked, level-of-detail access to OME-Zarr volumes.
|
Open a remote OME-Zarr store and return a VTK streaming source. |
|
VTK pipeline source that serves image data from a |
Data Containers#
In-memory representations returned by the parsers. GeometryDataContainer
groups one or more geometry entities, while VertexPropertyContainer carries
per-vertex scalar fields alongside them.
Container for multiple geometry entities with automatic validation. |
|
Container for managing custom vertex properties with automatic synchronization. |
Exceptions#
Raised when a volume cannot be interpreted as a segmentation. |