# Calculate harmonic energy of displacement vector field (DVF)

**URL:** <https://discourse.slicer.org/t/calculate-harmonic-energy-of-displacement-vector-field-dvf/5211>\
**Category:** Support\
**Tags:** registration\
**Created:** [December 28, 2018, 12:06pm UTC](https://discourse.slicer.org/t/calculate-harmonic-energy-of-displacement-vector-field-dvf/5211 "2018-12-28T12:06:24Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![labixin](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/labixin/32/1965_2.png) [@labixin](https://discourse.slicer.org/u/labixin)\
**Post date:** [August 22, 2019, 2:49am UTC](https://discourse.slicer.org/t/calculate-harmonic-energy-of-displacement-vector-field-dvf/5211/6 "2019-08-22T02:49:22Z")

</div>

Hi all,

I am now doing quantitative evaluation of registration and I plan to use three categories of metrics.

1. Segment comparison: Hausdorff distance and Dice similarity coefficient
2. Deformation vector field: Jacobian determinant
3. Anatomical landmarks: Target registration error

I could’t find where to calculate TRE. I wonder if the [Fiducial registration wizard module](https://discourse.slicer.org/t/evaluating-registration-error/3091/4) is similar to the TRE calculation.

Besides, is the Jacobian calculated within “RegistrationQA” module (Sorry but I couldn’t find it)? And the module can’t be installed using the latest Slicer preview version? (The log is shown below)

Hope for some suggestions. Thanks.

> **Error Log**
>
> Traceback (most recent call last):  
> File “”, line 1, in   
> File “D:\Slicer 4.11.0-2019-08-13\lib\Python\Lib\imp.py”, line 170, in load\_source  
> module = \_exec(spec, sys.modules[name])  
> File “”, line 618, in \_exec  
> File “”, line 674, in exec\_module  
> File “”, line 781, in get\_code  
> File “”, line 741, in source\_to\_code  
> File “”, line 219, in \_call\_with\_frames\_removed  
> File “C:/Users/Administrator/AppData/Roaming/NA-MIC/Extensions-28438/RegistrationQA/lib/Slicer-4.11/qt-scripted-modules/CreateRegistrationHierarchy.py”, line 294  
> except Exception, e:  
> ^  
> SyntaxError: invalid syntax  
> loadSourceAsModule - Failed to load file “C:/Users/Administrator/AppData/Roaming/NA-MIC/Extensions-28438/RegistrationQA/lib/Slicer-4.11/qt-scripted-modules/CreateRegistrationHierarchy.py” as module “CreateRegistrationHierarchy” !  
> Fail to instantiate module “CreateRegistrationHierarchy”  
> The following modules failed to be instantiated:  
> CreateRegistrationHierarchy

Crayon

---

_[View the full topic](https://discourse.slicer.org/t/calculate-harmonic-energy-of-displacement-vector-field-dvf/5211)._
