<div>Hi, ITK Users,</div>
<div>&nbsp;</div>
<div>I have a compiling error when using TransformPoint:</div>
<div>&nbsp;</div>
<div>Error&nbsp;1&nbsp;error C2664: &#39;itk::MatrixOffsetTransformBase&lt;TScalarType,NInputDimensions,NOutputDimensions&gt;::TransformPoint&#39; : <strong>cannot convert</strong> parameter 1 from <strong>&#39;PointType&#39; to &#39;const itk::Point&lt;TCoordRep,NPointDimension&gt; &amp;&#39;&nbsp;.
</strong></div>
<div>&nbsp;</div>
<div>What I am trying to do is testing the example of Iterative Closest Point Registration method (PointSetToPointSetRegistrationMethod). The registration is working, but I had the problem to transform the moving pointset to registered pointset using the transformation matrix&nbsp;obtained from the reigstration.
</div>
<div>&nbsp;</div>
<div>Here is my code:</div>
<div>//type define</div>
<div>&nbsp;typedef itk::PointSet&lt; float, Dimension &gt;&nbsp;&nbsp; PointSetType;<br>&nbsp;PointSetType::Pointer fixedPointSet&nbsp; = PointSetType::New();<br>&nbsp;PointSetType::Pointer movingPointSet = PointSetType::New();<br>&nbsp;PointSetType::Pointer registeredPointSet = PointSetType::New();
<br>&nbsp;typedef PointSetType::PointType&nbsp;&nbsp;&nbsp;&nbsp; PointType;<br>&nbsp;PointType fixedPoint;<br>&nbsp;PointType movingPoint;<br>&nbsp;PointType registeredPoint;<br>&nbsp;typedef PointSetType::PointsContainer&nbsp; PointsContainer;<br>&nbsp;PointsContainer::Pointer fixedPointContainer&nbsp; = PointsContainer::New();
<br>&nbsp;PointsContainer::Pointer movingPointContainer = PointsContainer::New();<br>&nbsp;PointsContainer::Pointer registeredPointContainer = PointsContainer::New();</div>
<div>
<p>//Read in moving pointset and fixed&nbsp;pointset</p>
<p>//do the&nbsp;registration</p>
<p>got the transformation stored in <strong>&#39;transform&#39;</strong></p>
<p>//&nbsp;transform moving pointset&nbsp;</p>
<p>&nbsp;for(i = 0; i&lt;movingPointSet-&gt;GetNumberOfPoints(); i++)<br>&nbsp;{<br>&nbsp;&nbsp;movingPointSet-&gt;GetPoint( i, &amp;movingPoint );<br>&nbsp;&nbsp;<strong>registeredPoint = &nbsp;&nbsp;transform-&gt;TransformPoint( movingPoint );//error&nbsp;here</strong>
<br>&nbsp;&nbsp;registeredPointContainer-&gt;InsertElement( i, registeredPoint );<br>&nbsp;}<br>&nbsp;registeredPointSet-&gt;SetPoints(registeredPointContainer);</p></div>
<div>==============================================================</div>
<div>I also tried this, got the similar error:</div>
<div>&nbsp;typedef itk::TransformMeshFilter&lt;PointSetType, PointSetType, TransformType&gt; TransformFilterType;<br>&nbsp;TransformFilterType::Pointer transformfilter= TransformFilterType::New();<br>&nbsp;transformfilter-&gt;SetInput(movingPointSet);
<br>&nbsp;transformfilter-&gt;SetTransform(transform);<br>&nbsp;try <br>&nbsp;{<br>&nbsp;&nbsp;transformfilter-&gt;Update();<br>&nbsp;}<br>&nbsp;catch( itk::ExceptionObject &amp; e )<br>&nbsp;{<br>&nbsp;&nbsp;DisplayITKError(e);<br>&nbsp;&nbsp;return -1;<br>&nbsp;}<br>&nbsp;registeredPointSet = transformfilter-&gt;GetOutput();
</div>
<div>&nbsp;</div>
<div>===============================================================</div>
<div>&nbsp;</div>
<div>Can you help me out of this? Thank you.</div>
<div>&nbsp;</div>
<div>Steven</div>
<div><br><br>&nbsp;</div>