brain_deer.plugins.warpdrive.snap¶
Optional Snap: nudge WarpDrive targets toward image intensity agreement.
Primary path is a local patch-correlation search (always available). If
antsRegistration is on PATH, an optional ANTs QuickSyN-style refine can
be requested later; v1 ships the local snap so the UI works without ANTs.
Functions¶
|
Shift each RAS target so a patch of |
Module Contents¶
- brain_deer.plugins.warpdrive.snap.local_intensity_snap(moving_img, fixed_img, targets: Sequence[tuple[float, float, float]], *, patch_radius: int = 3, search_radius: int = 4) list[tuple[float, float, float]]¶
Shift each RAS target so a patch of
movingbest matchesfixed.Both images must share (approximately) the same RAS affine/grid. Returns updated target positions. No-op points are returned unchanged when the patch is empty or out of bounds.