Skip to content

Latest commit

 

History

History
54 lines (38 loc) · 1.68 KB

File metadata and controls

54 lines (38 loc) · 1.68 KB

muDM

Documentation Docs build

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/

Install

pip install mudm

Usage

from mudm import MuDM, MuDMFeature, GeoJSON

# Validate muDM data
data = {
    "type": "FeatureCollection",
    "features": [{
        "type": "Feature",
        "geometry": {"type": "Point", "coordinates": [10, 20]},
        "properties": {"label": "nucleus"},
    }],
}
obj = MuDM.model_validate(data)

# Any GeoJSON is valid muDM
geojson = GeoJSON.model_validate(data)

# Coordinate transforms
from mudm import AffineTransform

# Tile metadata
from mudm import TileJSON, TileModel

What's included

  • 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

License

MIT