Repository navigation
Releases
Releases · MPR-UKD/MaskRegistration
v0.9.1
Full Changelog: v0.9.0...v0.9.1
v0.9.0
v0.9.0: UI deformable + spinner + responsive
v0.8.1
v0.8.0
v0.7.0
v0.7.0: stable default elastix backend
v0.6.0
v0.6.0: pluggable backends, elastix support
v0.5.0 — deformable registration + label-safe affine
Major features
Deformable registration
When two scans show the same anatomy but the patient (or organ) moved between them, a pure affine resample misses the deformation. New API:
- transform_deformable(source_dcm, mask, target_dcm, out, ...) — full pipeline
- deformable_register(source_img, target_img, mask?, ...) — lower-level
- DeformableResult dataclass exposes the warped mask, the dense displacement vector field, the final metric and the iteration count
Multi-resolution B-spline + Mattes mutual information, optional Symmetric Forces Demons refinement. The displacement field is exported as a 3-component vector NIfTI so callers can re-use it without re-running the registration.
Affine improvements
- direct NIfTI -> SimpleITK conversion (~30 % faster, no tempfile dance)
- auto_axes="xyz" checks all 8 flip combinations for unusual patient orientations
- verify_labels: detects when labels are silently lost in the NN cast (e.g. odd-valued labels 1/3/5) and retries with subpixel upsampling
- volume_warn_ratio: warns when the registered mask volume is more than 2x or less than half the source volume
- new diagnostic dict returned by transform(): used_reverse, used_flips, label_loss, volume_ratio, alignment
Tests
- synthetic shift recovery (Dice > 0.8 after warp)
- displacement field shape sanity
- real end-to-end fixture (Lena Knie 19 T0, DESS -> T2, gitignored locally)
v0.4.0
v0.4.0: faster + safer mask registration
v0.3.0
v0.3.0: alignment checks + resource-fork stripping
v0.2.0
Release 0.2.0: FastAPI web viewer, manual transforms, improved UI