Dear all,

I have a numpy array representing a deformation field with 2D shape (i.e., only x and y displacements), and I want to compute its Jacobian determinant.

Here’s how I’m doing it:

def_field_np is a numpy array w/ shape (256,256,2) representing the x and y displacements

```
def_field_sitk = sitk.GetImageFromArray(def_field_np, isVector=True)
jacobian_det = sitk.DisplacementFieldJacobianDeterminant(def_field_sitk)
jacobian_det = sitk.GetArrayFromImage(jacobian_det)
```

My questions:

- Can sitk.DisplacementFieldJacobianDeterminant compute the determinant for a 2D deformation field? Or is it expecting a 3D deformation field?
- Should the pixel/voxel spacing be set before computing the determinant?def_field_sitk.SetSpacing(pixel/voxel_spacing)

Thank you!