Interpolate volumetric mesh from deformation vector field image volume

Hi,

I have created a deformed 3D-CT version and corresponding deformation vector field (DVF) volume of a given nifti image volume (reference image 3D-CT volume) using another tool. I then extracted the liver mesh from the binary mask image volume which is obtained by segmenting the liver region from the reference image volume. Now what I want is that extract the displacement field from the deformation vector field and apply that to the mesh points so that deformed 3D-CT align with the mesh.

I’ve already done this with SimpleITK, but I’m curious if it’s also possible with the 3D slicer. If so, could you kindly explain the procedure to me ? Additionally, I would also like to know how to visualze the deforamtion field on mesh points with a colour map ?

Let’s assume I have loaded volumes below to the 3D slicer:

  • Reference 3D-CT volume (nifti format)
  • Deformed 3D-CT volume and its corresponding deformation vector field (nifti format)
  • Reference volumetric mesh in .vtk format (extracted from the reference 3D-CT)

Please note that here the deformation field is the final position of the voxel after it has been transformed, i.e. initial position of the voxel + the displacement of the voxel

That should all work fine, but storing deformation fields in nifti is sure to lead to coordinate system issues that you’ll need to sort out. Just select Transform when loading the vector field and then you can apply it to your mesh. Have a look at the documentation of the Transforms module.

Thanks for the extra information.

In this case I guess you need to subtract the original position (the physical coordinate) from the vector stored at that location. This sounds easy enough to do as long as you know all the geometry involved.

Note that SimpleITK is directly available in Slicer’s python environment, so you can just use any of that code to implement the change and make a grid transform to apply to the model’s polydata.