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