# Function which calculates the determinant of an itk::Affine transform?

**URL:** <https://discourse.itk.org/t/function-which-calculates-the-determinant-of-an-itk-affine-transform/3057>\
**Category:** Beginner Questions\
**Created:** [May 11, 2020, 3:20am UTC](https://discourse.itk.org/t/function-which-calculates-the-determinant-of-an-itk-affine-transform/3057 "2020-05-11T03:20:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gdevenyi](https://discourse.itk.org/user_avatar/discourse.itk.org/gdevenyi/32/355_2.png) [@gdevenyi](https://discourse.itk.org/u/gdevenyi)\
**Post date:** [May 11, 2020, 3:20am UTC](https://discourse.itk.org/t/function-which-calculates-the-determinant-of-an-itk-affine-transform/3057/1 "2020-05-11T03:20:04Z")

</div>

Is there a function to compute the determinant of the affine family of transforms?

---

<div class="post-metadata">

**Author:** ![spinicist](https://discourse.itk.org/user_avatar/discourse.itk.org/spinicist/32/183_2.png) [@spinicist](https://discourse.itk.org/u/spinicist)\
**Post date:** [May 11, 2020, 6:31pm UTC](https://discourse.itk.org/t/function-which-calculates-the-determinant-of-an-itk-affine-transform/3057/2 "2020-05-11T18:31:24Z")

</div>

Hello,

I think you can call `GetMatrix` and then call the determinant method of that matrix?

---

<div class="post-metadata">

**Author:** ![gdevenyi](https://discourse.itk.org/user_avatar/discourse.itk.org/gdevenyi/32/355_2.png) [@gdevenyi](https://discourse.itk.org/u/gdevenyi)\
**Post date:** [May 11, 2020, 6:42pm UTC](https://discourse.itk.org/t/function-which-calculates-the-determinant-of-an-itk-affine-transform/3057/3 "2020-05-11T18:42:07Z")

</div>

So that’s a no 🙂

Yeah, I can write my own, just the kind of thing I expected to already be there somewhere.

---

<div class="post-metadata">

**Author:** ![phcerdan](https://discourse.itk.org/user_avatar/discourse.itk.org/phcerdan/32/286_2.png) [@phcerdan](https://discourse.itk.org/u/phcerdan)\
**Post date:** [May 11, 2020, 6:59pm UTC](https://discourse.itk.org/t/function-which-calculates-the-determinant-of-an-itk-affine-transform/3057/4 "2020-05-11T18:59:23Z")

</div>

Hey @gdevenyi, why @spinicist suggestion is a no?

```auto
vnl_determinant(affine_transform.GetMatrix().GetVnlMatrix())

```

or close.

---

<div class="post-metadata">

**Author:** ![gdevenyi](https://discourse.itk.org/user_avatar/discourse.itk.org/gdevenyi/32/355_2.png) [@gdevenyi](https://discourse.itk.org/u/gdevenyi)\
**Post date:** [May 11, 2020, 7:01pm UTC](https://discourse.itk.org/t/function-which-calculates-the-determinant-of-an-itk-affine-transform/3057/5 "2020-05-11T19:01:18Z")

</div>

I just mean there’s no intrinsic call for MatrixOffsetTransform transform family.
