muDM (micro Data Model) is a GeoJSON-inspired data model for encoding microscopy spatial data — annotations, regions of interest, coordinate systems, and 3D mesh surfaces.
This is the core data model package. It provides Pydantic models for validation and serialization with minimal dependencies. For tiling pipelines, format converters, and Rust-accelerated processing, see mudm-tools.
📖 Documentation:https://novagenresearch.github.io/mudm/
pip install mudmfrommudmimportMuDM, MuDMFeature, GeoJSON# Validate muDM datadata= {
"type": "FeatureCollection",
"features": [{
"type": "Feature",
"geometry": {"type": "Point", "coordinates": [10, 20]},
"properties": {"label": "nucleus"},
}],
}
obj=MuDM.model_validate(data)
# Any GeoJSON is valid muDMgeojson=GeoJSON.model_validate(data)
# Coordinate transformsfrommudmimportAffineTransform# Tile metadatafrommudmimportTileJSON, TileModel- Model validation: MuDM, MuDMFeature, MuDMFeatureCollection, GeoJSON
- 3D geometry types: TIN, PolyhedralSurface, TiledGeometry
- Tile metadata: TileJSON, TileModel, TileLayer, Asset, PyramidJSON
- Coordinate transforms: AffineTransform, VoxelCoordinateSystem
- Provenance tracking: Workflow, Artifact, MuDMLink
MIT