<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Tahoma size=2>Hi, Lina</FONT></DIV>
<DIV><FONT face=Tahoma size=2></FONT> </DIV>
<DIV><FONT face=Tahoma size=2>As the error message stated, you need to recast
the data type.</FONT></DIV>
<DIV><FONT face=Tahoma size=2>Here is a code snippet as an example,</FONT></DIV>
<DIV><FONT face=Tahoma size=2> ......</FONT></DIV>
<DIV><FONT face=Tahoma size=2> // create a sphere for all to use<BR>
vtkSphereSource *aSphere = vtkSphereSource::New();<BR>
aSphere->SetPhiResolution(100); </FONT></DIV>
<DIV><FONT face=Tahoma size=2>
aSphere->SetThetaResolution(100); </FONT></DIV>
<DIV><FONT face=Tahoma size=2></FONT> </DIV>
<DIV><FONT face=Tahoma size=2> // create texture coordianates for
all<BR> vtkImplicitTextureCoords *tcoords =
vtkImplicitTextureCoords::New();<BR>
tcoords->SetInput((vtkDataSet *)aSphere->GetOutput());</FONT></DIV>
<DIV><FONT face=Tahoma size=2> ......</FONT></DIV>
<DIV><FONT face=Tahoma size=2></FONT> </DIV>
<DIV><FONT face=Tahoma size=2>You also need to include the header file
vtkProperty.h in your code,</FONT></DIV>
<DIV><FONT face=Tahoma size=2></FONT> </DIV>
<DIV><FONT face=Tahoma size=2>#include "vtkProperty.h"</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT face=Tahoma size=2>Hope this help you.</FONT></DIV>
<DIV><FONT face=Tahoma size=2></FONT> </DIV>
<DIV><FONT face=Tahoma size=2>Huiqun Zhou</FONT></DIV>
<DIV><FONT face=宋体 size=2></FONT> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 9pt 宋体">----- Original Message ----- </DIV>
<DIV style="BACKGROUND: #e4e4e4; FONT: 9pt 宋体; font-color: black"><B>From:</B>
<A title=fazeleap@yahoo.com href="mailto:fazeleap@yahoo.com">Lina</A> </DIV>
<DIV style="BACKGROUND: #e4e4e4; FONT: 9pt 宋体; font-color: black"><B>To:</B>
<A title=vtkusers@vtk.org href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</A>
</DIV>
<DIV style="FONT: 9pt 宋体"><B>Sent:</B> Saturday, July 05, 2003 11:29 PM</DIV>
<DIV style="FONT: 9pt 宋体"><B>Subject:</B> [vtkusers] Help: Problem compiling
example code</DIV>
<DIV><BR></DIV>
<DIV>Hi all,</DIV>
<DIV>I'm a newbie at this. When compiling the example code available on the
vtk website for visualizing a quadric function, I get the following errors.
</DIV>
<DIV>Compiling...<BR>Quadric.cpp<BR>G:\wolken\vtk\Quadric\Quadric.cpp(26) :
error C2664: 'SetInput' : cannot convert parameter 1 from 'class vtkImageData
*' to 'class vtkDataSet *'<BR> Types
pointed to are unrelated; conversion requires reinterpret_cast, C-style cast
or function-style cast<BR>G:\wolken\vtk\Quadric\Quadric.cpp(42) : error C2664:
'SetInput' : cannot convert parameter 1 from 'class vtkImageData *' to 'class
vtkDataSet *'<BR> Types pointed to
are unrelated; conversion requires reinterpret_cast, C-style cast or
function-style cast<BR>G:\wolken\vtk\Quadric\Quadric.cpp(51) : error C2027:
use of undefined type
'vtkProperty'<BR> g:\program
files\vtk42\include\vtk\vtkactor.h(42) : see declaration of
'vtkProperty'<BR>G:\wolken\vtk\Quadric\Quadric.cpp(51) : error C2227: left of
'->SetColor' must point to class/struct/union</DIV>
<DIV> </DIV>
<DIV>Could somebody please help me with this?</DIV>
<DIV>Thanks!</DIV>
<P>
<HR SIZE=1>
Do you Yahoo!?<BR><A
href="http://pa.yahoo.com/*http://rd.yahoo.com/evt=1207/*http://promo.yahoo.com/sbc/">SBC
Yahoo! DSL</A> - Now only $29.95 per month!</BLOCKQUOTE></BODY></HTML>