# itkPointSetToPointSetMetricv4 and EuclideanDistancePointSetToPointSetMetricv4 Help

**URL:** https://discourse.itk.org/t/itkpointsettopointsetmetricv4-and-euclideandistancepointsettopointsetmetricv4-help/2712
**Category:** Algorithms
**Tags:** v4
**Created:** [February 12, 2020, 7:04pm UTC](https://discourse.itk.org/t/itkpointsettopointsetmetricv4-and-euclideandistancepointsettopointsetmetricv4-help/2712 "2020-02-12T19:04:53Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![ShaneKirkbride](https://discourse.itk.org/user_avatar/discourse.itk.org/shanekirkbride/32/1225_2.png) [@ShaneKirkbride](https://discourse.itk.org/u/ShaneKirkbride)
#### Post date: [February 12, 2020, 7:04pm UTC](https://discourse.itk.org/t/itkpointsettopointsetmetricv4-and-euclideandistancepointsettopointsetmetricv4-help/2712/1 "2020-02-12T19:04:53Z")

</div>

I’m trying to set up a metric for the EuclideanDistancePointSetToPointSetMetricv4 class

```
using MetricType = EuclideanDistancePointSetToPointSetMetricv4<FixedPointSetType, MovingPointSetType>;
    MetricType::Pointer metric = MetricType::New();

```

I’m using this registration method:

```
using RegistrationType = itk::PointSetToPointSetRegistrationMethod<FixedPointSetType, MovingPointSetType>;

RegistrationType::Pointer registration = RegistrationType::New();

```

I go to commit the metric like this:

`registration->SetMetric(metric);`

But I get an error.

```
cannot convert argument 1 from 'itk::SmartPointer<itk::EuclideanDistancePointSetToPointSetMetricv4<FixedPointSetType,MovingPointSetType,double>>' to 'itk::PointSetToPointSetMetric<itk::PointSet<float,3,itk::DefaultStaticMeshTraits<TPixelType,3,3,float,float,TPixelType>
>,itk::PointSet<TPixelType,3,itk::DefaultStaticMeshTraits<TPixelType,3,3,float,float,TPixelType>>> *'
> 1> with
> 1> [
> 1> TPixelType=float
> 1> ]

```

What should I be doing to get this set correctly?  
Thanks,  
~Shane

---

<div class="post-metadata">

### Author: ![ShaneKirkbride](https://discourse.itk.org/user_avatar/discourse.itk.org/shanekirkbride/32/1225_2.png) [@ShaneKirkbride](https://discourse.itk.org/u/ShaneKirkbride)
#### Post date: [February 12, 2020, 7:12pm UTC](https://discourse.itk.org/t/itkpointsettopointsetmetricv4-and-euclideandistancepointsettopointsetmetricv4-help/2712/2 "2020-02-12T19:12:23Z")

</div>

I did find something here: [https://itk.org/ITKExamples/src/Registration/Metricsv4/PerformRegistrationOnVectorImages/Documentation.html](https://itk.org/ITKExamples/src/Registration/Metricsv4/PerformRegistrationOnVectorImages/Documentation.html)

I think this is might help.
