<!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>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<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>
&gt; Hi ,<BR>
&gt; I will preface this by saying: I Haven't worked in windows or ms vc++<BR>
&gt; in long time.<BR>
&gt;<BR>
&gt; it really sounds like you may not be including a relavent vtk library<BR>
&gt; in your link command. I say this because none of the symbols for<BR>
&gt; vtkIteratorClosestPointTransform seem to be found. That said I don't<BR>
&gt; know how vtk builds on windows. does everything get put into one lib,<BR>
&gt; or dll? In a linux&nbsp; build vtk puts various classes into different .so<BR>
&gt; files. so you just examine them to find which one has the symbols you<BR>
&gt; need.<BR>
&gt;<BR>
&gt; there used to be a program named dumpbin that came with visual studio.<BR>
&gt; You could use it to display the symbols in lib, and dll files. you<BR>
&gt; could use &quot;dumpbin&quot; to see what functions are actually in the vtk<BR>
&gt; library that you are linking against. that might give you some ideas.<BR>
&gt; By the way the linux equivalent is &quot;nm&quot;.<BR>
&gt;<BR>
&gt; Burlen<BR>
&gt;<BR>
&gt; M.Salman@surrey.ac.uk wrote:<BR>
&gt;&gt;<BR>
&gt;&gt; Hi All,<BR>
&gt;&gt; Sorry for reposting the problem but I am really stuck with problem<BR>
&gt;&gt; and thought it might have been overlooked by many as I posted it late<BR>
&gt;&gt; on the weekend.<BR>
&gt;&gt;<BR>
&gt;&gt;<BR>
&gt;&gt; I am trying to use vtkIterativeClosestPointTransform.h to re<BR>
&gt;&gt; orientate a translated 3D model given the original model.<BR>
&gt;&gt; I use many functions of the class vtkIteratorClosestPointTransform,<BR>
&gt;&gt; but it gives the linker error only for New(),SetTarget() and<BR>
&gt;&gt; SetSource().I don't understand why linker has having problem with<BR>
&gt;&gt; these functions only.I am using visual studio 6 alongwith vtk4.4.<BR>
&gt;&gt;<BR>
&gt;&gt; It will be really helpful if you could give me any hint at all, it<BR>
&gt;&gt; has been taxing me for two days now.<BR>
&gt;&gt; Alternatively,if somebody could send me working example program using<BR>
&gt;&gt; this class in C++,that may be helpful too.<BR>
&gt;&gt;<BR>
&gt;&gt;<BR>
&gt;&gt; error listing and code are as follows:<BR>
&gt;&gt;<BR>
&gt;&gt; --------------------Configuration: basic - Win32<BR>
&gt;&gt; Debug--------------------<BR>
&gt;&gt; Compiling...<BR>
&gt;&gt; basic.cxx<BR>
&gt;&gt; Linking...<BR>
&gt;&gt; basic.obj : error LNK2001: unresolved external symbol &quot;public: void<BR>
&gt;&gt; __thiscall vtkIterativeClosestPointTransform::SetTarget(class<BR>
&gt;&gt; vtkDataSet *)&quot;<BR>
&gt;&gt; (?SetTarget@vtkIterativeClosestPointTransform@@QAEXPAVvtkDataSet@@@Z)<BR>
&gt;&gt; basic.obj : error LNK2001: unresolved external symbol &quot;public: void<BR>
&gt;&gt; __thiscall vtkIterativeClosestPointTransform::SetSource(class<BR>
&gt;&gt; vtkDataSet *)&quot;<BR>
&gt;&gt; (?SetSource@vtkIterativeClosestPointTransform@@QAEXPAVvtkDataSet@@@Z)<BR>
&gt;&gt; basic.obj : error LNK2001: unresolved external symbol &quot;public: static<BR>
&gt;&gt; class vtkIterativeClosestPointTransform * __cdecl<BR>
&gt;&gt; vtkIterativeClosestPointTransform::New(void)&quot;<BR>
&gt;&gt; (?New@vtkIterativeClosestPointTransform@@SAPAV1@XZ)<BR>
&gt;&gt; Debug/basic.exe : fatal error LNK1120: 3 unresolved externals<BR>
&gt;&gt; Error executing link.exe.<BR>
&gt;&gt;<BR>
&gt;&gt; ALL_BUILD - 4 error(s), 0 warning(s)<BR>
&gt;&gt;<BR>
&gt;&gt;<BR>
&gt;&gt;<BR>
&gt;&gt;<BR>
&gt;&gt; #include &quot;vtkIterativeClosestPointTransform.h&quot;<BR>
&gt;&gt; #include &quot;vtkPolyData.h&quot;<BR>
&gt;&gt; #include &quot;vtkXMLPolyDataReader.h&quot;<BR>
&gt;&gt; #include &quot;vtkTransform.h&quot;<BR>
&gt;&gt; #include &quot;vtkTransformPolyDataFilter.h&quot;<BR>
&gt;&gt; int main( int argc, char *argv[] )<BR>
&gt;&gt;<BR>
&gt;&gt; {<BR>
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //Reader for file 1<BR>
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vtkXMLPolyDataReader *reader1 = vtkXMLPolyDataReader::New();<BR>
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; reader1-&gt;SetFileName(&quot;C:\\VtkProjects\\normal\\coneModel.vtp&quot;);<BR>
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vtkPolyData *data =reader1-&gt;GetOutput();<BR>
&gt;&gt;<BR>
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /reader for file 2<BR>
&gt;&gt;<BR>
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vtkXMLPolyDataReader *reader2 = vtkXMLPolyDataReader::New();<BR>
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; reader2-&gt;SetFileName(&quot;C:\\VtkProjects\\normal\\coneTrans.vtp&quot;);<BR>
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vtkPolyData *dataChanged =reader2-&gt;GetOutput();<BR>
&gt;&gt;<BR>
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //DEFINE TRANS FOR ORIENTATION<BR>
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vtkIterativeClosestPointTransform *<BR>
&gt;&gt; ReTransform=vtkIterativeClosestPointTransform::New();<BR>
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ReTransform-&gt;SetSource(reader2-&gt;GetOutput());<BR>
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ReTransform-&gt;SetTarget(reader1-&gt;GetOutput());<BR>
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ReTransform-&gt;SetCheckMeanDistance(1);<BR>
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ReTransform-&gt;SetMaximumMeanDistance(0.001);<BR>
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ReTransform-&gt;SetMaximumNumberOfIterations(3000);<BR>
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ReTransform-&gt;SetMaximumNumberOfLandmarks(50);<BR>
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //ReTransform-&gt;StartByMatchingCentroidsOff();<BR>
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ReTransform-&gt;Update();<BR>
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return(0);<BR>
&gt;&gt;<BR>
&gt;&gt; }<BR>
&gt;&gt;<BR>
&gt;&gt;<BR>
&gt;&gt; Best Regards,<BR>
&gt;&gt;<BR>
&gt;&gt; M.Salman<BR>
&gt;&gt; University of Surrey,U.K.<BR>
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&gt;&gt;<BR>
&gt;&gt; ------------------------------------------------------------------------<BR>
&gt;&gt;<BR>
&gt;&gt; _______________________________________________<BR>
&gt;&gt; This is the private VTK discussion list.<BR>
&gt;&gt; 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>
&gt;&gt; Follow this link to subscribe/unsubscribe:<BR>
&gt;&gt; <A HREF="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</A><BR>
&gt;&gt;&nbsp;&nbsp;<BR>
&gt; ------------------------------------------------------------------------<BR>
&gt;<BR>
&gt; _______________________________________________<BR>
&gt; This is the private VTK discussion list.<BR>
&gt; 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>
&gt; Follow this link to subscribe/unsubscribe:<BR>
&gt; <A HREF="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</A><BR>
&gt;&nbsp;&nbsp;<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>