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

Paul Tait - OPES Paul at opes.com.au
Tue Mar 20 19:53:38 EDT 2007


Its only 14 errors just change the floats to double

-----Original Message-----
From: vtkusers-bounces+paul=opes.com.au at vtk.org
[mailto:vtkusers-bounces+paul=opes.com.au at vtk.org] On Behalf Of
M.Salman at surrey.ac.uk
Sent: Wednesday, 21 March 2007 12:46 AM
To: vtkusers at vtk.org
Subject: [vtkusers] problem with different versions of vtkPointSet ! Help !



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/20070321/16183e75/attachment.htm>


More information about the vtkusers mailing list