[vtkusers] problem with different versions of vtkPointSet ! Help !

M.Salman at surrey.ac.uk M.Salman at surrey.ac.uk
Tue Mar 20 11:46:21 EDT 2007


I had to reinstall vtk on my system .I had devloped my code using vtk 4.4 by installing precompiled windows version available on the vtk Site which is no more offered.
Instead, I had to download the source code and compile it to install it on my system now.
when I try to run the code developed on previous installation(one using precompiled binaries for windows) on the new installation(one compiled by me)
it gives following errors.

*************************************************************************************
--------------------Configuration: test - Win32 Debug--------------------
Compiling...
basic.cxx
c:\vtkprojects\mem\copy of basic2\code\basic.cxx(96) : error C2664: 'void __thiscall vtkPointSet::GetPoint(int,double [])' : cannot convert parameter 2 from 'float [3]' to 'double []'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\vtkprojects\mem\copy of basic2\code\basic.cxx(112) : error C2664: 'void __thiscall vtkPointSet::GetPoint(int,double [])' : cannot convert parameter 2 from 'float [3]' to 'double []'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
coreEmbed.cpp
c:\vtkprojects\mem\copy of basic2\code\coreembed.cpp(192) : error C2664: 'void __thiscall vtkPointSet::GetPoint(int,double [])' : cannot convert parameter 2 from 'float *' to 'double []'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\vtkprojects\mem\copy of basic2\code\coreembed.cpp(364) : error C2664: 'void __thiscall vtkPointSet::GetPoint(int,double [])' : cannot convert parameter 2 from 'float *' to 'double []'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\vtkprojects\mem\copy of basic2\code\coreembed.cpp(527) : error C2440: '=' : cannot convert from 'double *' to 'float *'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\vtkprojects\mem\copy of basic2\code\coreembed.cpp(533) : error C2664: 'void __thiscall vtkPointSet::GetPoint(int,double [])' : cannot convert parameter 2 from 'float *' to 'double []'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\vtkprojects\mem\copy of basic2\code\coreembed.cpp(823) : error C2664: 'void __thiscall vtkPoints::GetPoint(int,double [])' : cannot convert parameter 2 from 'float *' to 'double []'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\vtkprojects\mem\copy of basic2\code\coreembed.cpp(1079) : error C2664: 'void __thiscall vtkPointSet::GetPoint(int,double [])' : cannot convert parameter 2 from 'float *' to 'double []'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
functions.cpp
c:\vtkprojects\mem\copy of basic2\code\functions.cpp(332) : error C2664: 'void __thiscall vtkPointSet::GetPoint(int,double [])' : cannot convert parameter 2 from 'float [3]' to 'double []'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\vtkprojects\mem\copy of basic2\code\functions.cpp(395) : error C2664: 'void __thiscall vtkPointSet::GetPoint(int,double [])' : cannot convert parameter 2 from 'float [3]' to 'double []'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\vtkprojects\mem\copy of basic2\code\functions.cpp(829) : error C2440: 'initializing' : cannot convert from 'double *' to 'float *'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\vtkprojects\mem\copy of basic2\code\functions.cpp(893) : error C2440: 'initializing' : cannot convert from 'double *' to 'float *'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\vtkprojects\mem\copy of basic2\code\functions.cpp(929) : error C2664: 'void __thiscall vtkDataArrayTemplate<float>::GetTuple(int,double *)' : cannot convert parameter 2 from 'float [3]' to 'double *'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\vtkprojects\mem\copy of basic2\code\functions.cpp(1359) : error C2664: 'void __thiscall vtkPointSet::GetPoint(int,double [])' : cannot convert parameter 2 from 'float *' to 'double []'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Error executing cl.exe.

test.exe - 14 error(s), 0 warning(s)


*************************************************************************************
when I checked the header files available with both installations,for vtkPointSet::GetPoint, I found them different
vtkPointSet::GetPoint(int, double[])(installation using self compiled binary)
vtkPointSet::GetPoint(int, float[]) (installation using precompiled binary)

Interestingly, the online documentation of vtkPointSet conforms to the second signature and is not in accordance with the source code.


I presume the implementation of vtkPointSet::GetPoint() has been changed in later releases. If the implementation of vtkPointSet is changed in vtk 5, why is the online documentation still inline with previous 
implementation.
Is there any quick fix to this problem or I have to change the source code and recompile vtk.I MUST need float instead of double.

thanks for your time 
Regards
Salman
University of Surrey,U.K.
                                                                                                     

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070320/48a18e8e/attachment.htm>


More information about the vtkusers mailing list