[prev in list] [next in list] [prev in thread] [next in thread]
List: vtkusers
Subject: [vtkusers] vtkIterativeClosestPointTransform.h;
From: <M.Salman () surrey ! ac ! uk>
Date: 2007-04-27 16:09:27
Message-ID: 6A5F24CF338E23438ABBE3392E35AFBD181685 () EVS-EC1-NODE1 ! surrey ! ac ! uk
[Download RAW message or body]
Hi All,
I am trying to use vtkIterativeClosestPointTransform.h to re orientate a translated \
3D model given the original model. I use many functions of the class \
vtkIteratorClosestPointTransform, but it gives the linker error only for \
New(),SetTarget() and SetSource().I don't understand why linker has having problem \
with these functions only.I am using visual studio 6 alongwith vtk4.4.
It will be really helpful if you could give me any hint at all, it has been taxing me \
for two days now. Alternatively,if somebody could send me working example program \
using this class in C++,that may be helpful too.
error listing and code are as follows:
--------------------Configuration: basic - Win32 Debug--------------------
Compiling...
basic.cxx
Linking...
basic.obj : error LNK2001: unresolved external symbol "public: void __thiscall \
vtkIterativeClosestPointTransform::SetTarget(class vtkDataSet *)" \
(?SetTarget@vtkIterativeClosestPointTransform@@QAEXPAVvtkDataSet@@@Z) basic.obj : \
error LNK2001: unresolved external symbol "public: void __thiscall \
vtkIterativeClosestPointTransform::SetSource(class vtkDataSet *)" \
(?SetSource@vtkIterativeClosestPointTransform@@QAEXPAVvtkDataSet@@@Z) basic.obj : \
error LNK2001: unresolved external symbol "public: static class \
vtkIterativeClosestPointTransform * __cdecl \
vtkIterativeClosestPointTransform::New(void)" \
(?New@vtkIterativeClosestPointTransform@@SAPAV1@XZ) Debug/basic.exe : fatal error \
LNK1120: 3 unresolved externals Error executing link.exe.
ALL_BUILD - 4 error(s), 0 warning(s)
#include "vtkIterativeClosestPointTransform.h"
#include "vtkPolyData.h"
#include "vtkXMLPolyDataReader.h"
#include "vtkTransform.h"
#include "vtkTransformPolyDataFilter.h"
int main( int argc, char *argv[] )
{
//Reader for file 1
vtkXMLPolyDataReader *reader1 = vtkXMLPolyDataReader::New();
reader1->SetFileName("C:\\VtkProjects\\normal\\coneModel.vtp");
vtkPolyData *data =reader1->GetOutput();
/reader for file 2
vtkXMLPolyDataReader *reader2 = vtkXMLPolyDataReader::New();
reader2->SetFileName("C:\\VtkProjects\\normal\\coneTrans.vtp");
vtkPolyData *dataChanged =reader2->GetOutput();
//DEFINE TRANS FOR ORIENTATION
vtkIterativeClosestPointTransform * \
ReTransform=vtkIterativeClosestPointTransform::New(); \
ReTransform->SetSource(reader2->GetOutput()); \
ReTransform->SetTarget(reader1->GetOutput()); ReTransform->SetCheckMeanDistance(1);
ReTransform->SetMaximumMeanDistance(0.001);
ReTransform->SetMaximumNumberOfIterations(3000);
ReTransform->SetMaximumNumberOfLandmarks(50);
//ReTransform->StartByMatchingCentroidsOff();
ReTransform->Update();
return(0);
}
Best Regards,
Salman Bhatti
[Attachment #3 (text/html)]
<!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>vtkIterativeClosestPointTransform.h; error LNK2001: unresolved external symbol \
! Help please !</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 don't understand why linker has having problem \
with these functions only.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>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic