Commit 19df2d3d authored by inhuszar's avatar inhuszar
Browse files

Bugfix: cost Jacobian with masked images.

parent 1c6a7d87
......@@ -301,7 +301,7 @@ class CostMI(Cost):
# Masked point should contribute no gradient force for the registration
if combined_mask is not None:
jac[combined_mask.ravel(), ...] = 0
jac[np.isclose(combined_mask, 0, atol=1e-3).ravel(), ...] = 0
# return -jac
return jac
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment