[vtkusers] vtkIterativeClosestPointTransform.h

M.Salman at surrey.ac.uk M.Salman at surrey.ac.uk
Wed May 2 15:29:52 EDT 2007


Thanks Amy,
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.

Best Regards,

M.Salman 
University of Surrey,U.K.
                                                                                                     



-----Original Message-----
From: Amy Squillacote [mailto:amy.squillacote at kitware.com]
Sent: Wed 02/05/2007 2:48 PM
To: Salman M Mr (PG/R - Electronic Eng)
Cc: burlen; vtkusers at vtk.org
Subject: Re: [vtkusers] vtkIterativeClosestPointTransform.h
 
Also, did you build VTK yourself? vtkIterativeClosestPointTransform is 
in VTK/Hybrid, and there used to be a CMake option for whether to build 
they Hybrid library (VTK_USE_HYBRID, I think). I don't remember if that 
was VTK 4.4, or if it was earlier than that.

If the vtkHybrid library was built in your copy of VTK, make sure you're 
including that library when you link your application.

- Amy

burlen wrote:
> Hi ,
> I will preface this by saying: I Haven't worked in windows or ms vc++ 
> in long time.
>
> it really sounds like you may not be including a relavent vtk library 
> in your link command. I say this because none of the symbols for 
> vtkIteratorClosestPointTransform seem to be found. That said I don't 
> know how vtk builds on windows. does everything get put into one lib, 
> or dll? In a linux  build vtk puts various classes into different .so 
> files. so you just examine them to find which one has the symbols you 
> need.
>
> there used to be a program named dumpbin that came with visual studio. 
> You could use it to display the symbols in lib, and dll files. you 
> could use "dumpbin" to see what functions are actually in the vtk 
> library that you are linking against. that might give you some ideas. 
> By the way the linux equivalent is "nm".
>
> Burlen
>
> M.Salman at surrey.ac.uk wrote:
>>
>> Hi All,
>> Sorry for reposting the problem but I am really stuck with problem 
>> and thought it might have been overlooked by many as I posted it late 
>> on the weekend.
>>
>>
>> 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 at vtkIterativeClosestPointTransform@@QAEXPAVvtkDataSet@@@Z)
>> basic.obj : error LNK2001: unresolved external symbol "public: void 
>> __thiscall vtkIterativeClosestPointTransform::SetSource(class 
>> vtkDataSet *)" 
>> (?SetSource at vtkIterativeClosestPointTransform@@QAEXPAVvtkDataSet@@@Z)
>> basic.obj : error LNK2001: unresolved external symbol "public: static 
>> class vtkIterativeClosestPointTransform * __cdecl 
>> vtkIterativeClosestPointTransform::New(void)" 
>> (?New at vtkIterativeClosestPointTransform@@SAPAV1 at 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,
>>
>> M.Salman
>> University of Surrey,U.K.
>>                                                                                                     
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> This is the private VTK discussion list. 
>> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>   

-- 
Amy Squillacote
Kitware, Inc.
28 Corporate Drive
Clifton Park, NY 12065
Phone: (518) 371-3971 x106


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070502/5ae2bc97/attachment.htm>


More information about the vtkusers mailing list