<!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>RE: [vtkusers] vtkIterativeClosestPointTransform.h</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<BR>
<P><FONT SIZE=2>Thanks Amy,<BR>
Had you replied a bit earlier, it would have spared me lots of banging my head with my machine :D You are absolutely right.Same was the problem and it is solved now.<BR>
<BR>
Best Regards,<BR>
<BR>
M.Salman<BR>
University of Surrey,U.K.<BR>
<BR>
<BR>
<BR>
<BR>
-----Original Message-----<BR>
From: Amy Squillacote [<A HREF="mailto:amy.squillacote@kitware.com">mailto:amy.squillacote@kitware.com</A>]<BR>
Sent: Wed 02/05/2007 2:48 PM<BR>
To: Salman M Mr (PG/R - Electronic Eng)<BR>
Cc: burlen; vtkusers@vtk.org<BR>
Subject: Re: [vtkusers] vtkIterativeClosestPointTransform.h<BR>
<BR>
Also, did you build VTK yourself? vtkIterativeClosestPointTransform is<BR>
in VTK/Hybrid, and there used to be a CMake option for whether to build<BR>
they Hybrid library (VTK_USE_HYBRID, I think). I don't remember if that<BR>
was VTK 4.4, or if it was earlier than that.<BR>
<BR>
If the vtkHybrid library was built in your copy of VTK, make sure you're<BR>
including that library when you link your application.<BR>
<BR>
- Amy<BR>
<BR>
burlen wrote:<BR>
> Hi ,<BR>
> I will preface this by saying: I Haven't worked in windows or ms vc++<BR>
> in long time.<BR>
><BR>
> it really sounds like you may not be including a relavent vtk library<BR>
> in your link command. I say this because none of the symbols for<BR>
> vtkIteratorClosestPointTransform seem to be found. That said I don't<BR>
> know how vtk builds on windows. does everything get put into one lib,<BR>
> or dll? In a linux build vtk puts various classes into different .so<BR>
> files. so you just examine them to find which one has the symbols you<BR>
> need.<BR>
><BR>
> there used to be a program named dumpbin that came with visual studio.<BR>
> You could use it to display the symbols in lib, and dll files. you<BR>
> could use "dumpbin" to see what functions are actually in the vtk<BR>
> library that you are linking against. that might give you some ideas.<BR>
> By the way the linux equivalent is "nm".<BR>
><BR>
> Burlen<BR>
><BR>
> M.Salman@surrey.ac.uk wrote:<BR>
>><BR>
>> Hi All,<BR>
>> Sorry for reposting the problem but I am really stuck with problem<BR>
>> and thought it might have been overlooked by many as I posted it late<BR>
>> on the weekend.<BR>
>><BR>
>><BR>
>> I am trying to use vtkIterativeClosestPointTransform.h to re<BR>
>> orientate a translated 3D model given the original model.<BR>
>> I use many functions of the class vtkIteratorClosestPointTransform,<BR>
>> but it gives the linker error only for New(),SetTarget() and<BR>
>> SetSource().I don't understand why linker has having problem with<BR>
>> 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<BR>
>> has been taxing me for two days now.<BR>
>> Alternatively,if somebody could send me working example program using<BR>
>> this class in C++,that may be helpful too.<BR>
>><BR>
>><BR>
>> error listing and code are as follows:<BR>
>><BR>
>> --------------------Configuration: basic - Win32<BR>
>> Debug--------------------<BR>
>> Compiling...<BR>
>> basic.cxx<BR>
>> Linking...<BR>
>> basic.obj : error LNK2001: unresolved external symbol "public: void<BR>
>> __thiscall vtkIterativeClosestPointTransform::SetTarget(class<BR>
>> vtkDataSet *)"<BR>
>> (?SetTarget@vtkIterativeClosestPointTransform@@QAEXPAVvtkDataSet@@@Z)<BR>
>> basic.obj : error LNK2001: unresolved external symbol "public: void<BR>
>> __thiscall vtkIterativeClosestPointTransform::SetSource(class<BR>
>> vtkDataSet *)"<BR>
>> (?SetSource@vtkIterativeClosestPointTransform@@QAEXPAVvtkDataSet@@@Z)<BR>
>> basic.obj : error LNK2001: unresolved external symbol "public: static<BR>
>> class vtkIterativeClosestPointTransform * __cdecl<BR>
>> vtkIterativeClosestPointTransform::New(void)"<BR>
>> (?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 *<BR>
>> 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>
>><BR>
>> M.Salman<BR>
>> University of Surrey,U.K.<BR>
>> <BR>
>><BR>
>> ------------------------------------------------------------------------<BR>
>><BR>
>> _______________________________________________<BR>
>> This is the private VTK discussion list.<BR>
>> Please keep messages on-topic. Check the FAQ at: <A HREF="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</A><BR>
>> Follow this link to subscribe/unsubscribe:<BR>
>> <A HREF="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</A><BR>
>> <BR>
> ------------------------------------------------------------------------<BR>
><BR>
> _______________________________________________<BR>
> This is the private VTK discussion list.<BR>
> Please keep messages on-topic. Check the FAQ at: <A HREF="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</A><BR>
> Follow this link to subscribe/unsubscribe:<BR>
> <A HREF="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</A><BR>
> <BR>
<BR>
--<BR>
Amy Squillacote<BR>
Kitware, Inc.<BR>
28 Corporate Drive<BR>
Clifton Park, NY 12065<BR>
Phone: (518) 371-3971 x106<BR>
<BR>
<BR>
</FONT>
</P>
</BODY>
</HTML>