[vtkusers] (no subject)

M.Salman at surrey.ac.uk M.Salman at surrey.ac.uk
Fri Apr 27 12:07:32 EDT 2007



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 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,
Salman Bhatti
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070427/128a846f/attachment.htm>


More information about the vtkusers mailing list