# How to calculate Jacobian matrix of a transformation with simpleITK?

**URL:** https://discourse.itk.org/t/how-to-calculate-jacobian-matrix-of-a-transformation-with-simpleitk/3486
**Category:** Algorithms
**Tags:** registration, simpleitk
**Created:** [September 25, 2020, 5:27pm UTC](https://discourse.itk.org/t/how-to-calculate-jacobian-matrix-of-a-transformation-with-simpleitk/3486 "2020-09-25T17:27:13Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![dada](https://discourse.itk.org/letter_avatar_proxy/v4/letter/d/9d8465/32.png) [@dada](https://discourse.itk.org/u/dada)
#### Post date: [September 25, 2020, 5:27pm UTC](https://discourse.itk.org/t/how-to-calculate-jacobian-matrix-of-a-transformation-with-simpleitk/3486/1 "2020-09-25T17:27:13Z")

</div>

Hello,

How to calculate Jacobian matrix at each pixel with simpleITK after I have estimated a B-spline transformation between fixed\_image and moving\_image?

Do I need to convert the transformation into displacement field to compute the Jacobian matrix? Many thanks.

---

<div class="post-metadata">

### Author: ![zivy](https://discourse.itk.org/user_avatar/discourse.itk.org/zivy/32/1726_2.png) [@zivy](https://discourse.itk.org/u/zivy)
#### Post date: [September 25, 2020, 6:00pm UTC](https://discourse.itk.org/t/how-to-calculate-jacobian-matrix-of-a-transformation-with-simpleitk/3486/2 "2020-09-25T18:00:10Z")

</div>

Hello @dada,

The only functionality provided by SimpleITK with respect to Jacobians is to compute the determinant of a deformation field. To do that, first get a deformation field representation of your transformation via the [TransformToDisplacementFieldFilter](https://simpleitk.org/doxygen/latest/html/classitk_1_1simple_1_1TransformToDisplacementFieldFilter.html) and then run the [DisplacementFieldJacobianDeterminantFilter](https://simpleitk.org/doxygen/latest/html/classitk_1_1simple_1_1DisplacementFieldJacobianDeterminantFilter.html) filter.
