users > RE: Can streamxform invert a deformation field?
Dec 15, 2018  05:12 AM | Torsten Rohlfing
RE: Can streamxform invert a deformation field?
Hi Greg -

Indeed, a deformation field cannot be inverted. One could potentially try to implement a numerical approximation, analogous to the one used by SplineWarpXform, but because the deformation field is potentially discountinuous, it's very unlikely a dense estimation of the inverse would ever succeed.

We could certainly change the code to terminate (or throw an exception) instead of simply returning a failure flag. While the current implementation should not generate incorrect results (the reformatting code respects the return value), it certainly may lead to cases where users see empty reformatted images and have a hard time sorting out why that happened.

Do you want me to change the code accordingly? (You're welcome to do it yourself, obviously, if you're comfortable with that.)

By the way, just for the record - if I had a deformation field and wanted to invert it, I would use the fit_spline_dfield tool to fit a B-spline warp to the deformation field, then numerically invert that.

Best,
  Torsten

Threaded View

TitleAuthorDate
Greg Jefferis Dec 12, 2018
RE: Can streamxform invert a deformation field?
Torsten Rohlfing Dec 15, 2018