Metadata-Version: 2.4
Name: mudm
Version: 0.5.0
Summary: muDM (micro Data Model) — a GeoJSON-inspired data model for microscopy spatial data.
Author-email: Bengt Ljungquist <bengt.ljungquist@nih.gov>
License: MIT
Project-URL: Documentation, https://github.com/NovagenResearch/mudm
Project-URL: Source, https://github.com/NovagenResearch/mudm
Keywords: json,microscopy,mudm,spatial-data,geojson
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Requires-Python: <3.14,>=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pydantic>=2.3.0
Requires-Dist: geojson-pydantic>=1.2.0
Dynamic: license-file

# muDM

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](https://github.com/NovagenResearch/mudm-tools).

## Install

```bash
pip install mudm
```

## Usage

```python
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, PyramidJSON
- **Coordinate transforms**: AffineTransform, VoxelCoordinateSystem
- **Provenance tracking**: Workflow, Artifact, MuDMLink

## License

MIT
