Gradually warping moving image with displacement field

Hi!

I have two 3D volumes and a displacement field which was obtained by registering one of the volumes to the other.
Is there a way in slicer to visualise how the moving image is warped into the target image? The visualisation should gradually apply the displacement field transformation to slowly warp the moving image.

Thanks in advance!

There’s no exposed interface for that, but I agree it would be a nice feature to have.

What you can do currently is write a small script that implements what you describe. Easiest would be to create a duplicate of the displacement field and then use numpy to add fractions of the displacement field and render iteratively.

I don’t have an implementation in python, but here’s how I did it in javascript for another application:

Using the sin function gives it a nice ease-in, ease-out as shown in this video: MR US p3 2017 08 09 - YouTube

1 Like