<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7638.1">
<TITLE></TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<BR>
<BR>
<P><FONT SIZE=2>Hi All,<BR>
I am trying to use vtkIterativeClosestPointTransform.h to re orientate a translated 3D model given the original model.<BR>
I use many functions of the class vtkIteratorClosestPointTransform, but it gives the linker error only for New(),SetTarget() and SetSource().I am using visual studio 6 alongwith vtk4.4.<BR>
<BR>
It will be really helpful if you could give me any hint at all, it has been taxing me for two days now.<BR>
Alternatively,if somebody could send me working example program using this class in C++,that may be helpful too.<BR>
<BR>
<BR>
error listing and code are as follows:<BR>
<BR>
--------------------Configuration: basic - Win32 Debug--------------------<BR>
Compiling...<BR>
basic.cxx<BR>
Linking...<BR>
basic.obj : error LNK2001: unresolved external symbol "public: void __thiscall vtkIterativeClosestPointTransform::SetTarget(class vtkDataSet *)" (?SetTarget@vtkIterativeClosestPointTransform@@QAEXPAVvtkDataSet@@@Z)<BR>
basic.obj : error LNK2001: unresolved external symbol "public: void __thiscall vtkIterativeClosestPointTransform::SetSource(class vtkDataSet *)" (?SetSource@vtkIterativeClosestPointTransform@@QAEXPAVvtkDataSet@@@Z)<BR>
basic.obj : error LNK2001: unresolved external symbol "public: static class vtkIterativeClosestPointTransform * __cdecl vtkIterativeClosestPointTransform::New(void)" (?New@vtkIterativeClosestPointTransform@@SAPAV1@XZ)<BR>
Debug/basic.exe : fatal error LNK1120: 3 unresolved externals<BR>
Error executing link.exe.<BR>
<BR>
ALL_BUILD - 4 error(s), 0 warning(s)<BR>
<BR>
<BR>
<BR>
<BR>
#include "vtkIterativeClosestPointTransform.h"<BR>
#include "vtkPolyData.h"<BR>
#include "vtkXMLPolyDataReader.h"<BR>
#include "vtkTransform.h"<BR>
#include "vtkTransformPolyDataFilter.h"<BR>
int main( int argc, char *argv[] )<BR>
<BR>
{<BR>
//Reader for file 1<BR>
vtkXMLPolyDataReader *reader1 = vtkXMLPolyDataReader::New();<BR>
reader1->SetFileName("C:\\VtkProjects\\normal\\coneModel.vtp");<BR>
vtkPolyData *data =reader1->GetOutput();<BR>
<BR>
/reader for file 2<BR>
<BR>
vtkXMLPolyDataReader *reader2 = vtkXMLPolyDataReader::New();<BR>
reader2->SetFileName("C:\\VtkProjects\\normal\\coneTrans.vtp");<BR>
vtkPolyData *dataChanged =reader2->GetOutput();<BR>
<BR>
//DEFINE TRANS FOR ORIENTATION<BR>
<BR>
<BR>
vtkIterativeClosestPointTransform * ReTransform=vtkIterativeClosestPointTransform::New();<BR>
ReTransform->SetSource(reader2->GetOutput());<BR>
ReTransform->SetTarget(reader1->GetOutput());<BR>
ReTransform->SetCheckMeanDistance(1);<BR>
ReTransform->SetMaximumMeanDistance(0.001);<BR>
ReTransform->SetMaximumNumberOfIterations(3000);<BR>
ReTransform->SetMaximumNumberOfLandmarks(50);<BR>
//ReTransform->StartByMatchingCentroidsOff();<BR>
ReTransform->Update();<BR>
return(0);<BR>
<BR>
}<BR>
<BR>
<BR>
Best Regards,<BR>
Salman Bhatti</FONT>
</P>
</BODY>
</HTML>