<!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.2715.400" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Hello to all!!!</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I'm writing a program that can add a texture in a 
Sphere. The compilation error is:</FONT></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <DIV><FONT face=Arial size=2><EM>cannot convert parameter 1 from 'class 
  vtkPolyData *' to 'class vtkDataSet 
  *'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Types pointed to are 
  unrelated; conversion requires reinterpret_cast, C-style cast or 
  function-style cast<BR>Error executing cl.exe.</EM></FONT></DIV></BLOCKQUOTE>
<DIV dir=ltr><EM><FONT face=Arial size=2></FONT></EM>&nbsp;</DIV>
<DIV dir=ltr>
<DIV><FONT face=Arial size=2>The code is the next. An the error line is 
marked.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>const char 
*m_TextureFileName=fl_file_chooser("Input Texture File 
Name","*.ppm","");</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;if (! 
m_TextureFileName)<BR>&nbsp;{<BR>&nbsp;&nbsp;return;<BR>&nbsp;}</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial 
size=2>vtkPNMReader&nbsp;*m_TextureReader;<BR>&nbsp;&nbsp;m_TextureReader=vtkPNMReader::New();<BR>&nbsp;&nbsp;m_TextureReader-&gt;SetFileName(m_TextureFileName);</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial 
size=2>&nbsp;vtkTexture&nbsp;&nbsp;*m_Texture;<BR>&nbsp;&nbsp;m_Texture=vtkTexture::New();<BR>&nbsp;&nbsp;m_Texture-&gt;SetInput(m_TextureReader-&gt;GetOutput());<BR>&nbsp;&nbsp;m_Texture-&gt;InterpolateOn();</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial 
size=2>vtkSphereSource&nbsp;*m_Sphere;<BR>&nbsp;&nbsp;m_Sphere=vtkSphereSource::New();<BR>&nbsp;&nbsp;m_Sphere-&gt;SetThetaResolution(7);<BR>&nbsp;&nbsp;m_Sphere-&gt;SetPhiResolution(7);</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>vtkTextureMapToCylinder 
*m_Tmapper;<BR>&nbsp;&nbsp;m_Tmapper=vtkTextureMapToCylinder::New();<BR><STRONG><EM>&nbsp;&nbsp;m_Tmapper-&gt;SetInput(m_Sphere-&gt;GetOutput()); 
***************************************************<BR></EM></STRONG>&nbsp;&nbsp;m_Tmapper-&gt;PreventSeamOn();</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;vtkTransformTextureCoords 
*m_Xform;<BR>&nbsp;&nbsp;m_Xform=vtkTransformTextureCoords::New();<BR>&nbsp;&nbsp;m_Xform-&gt; 
SetInput(m_Tmapper-&gt;GetOutput());<BR>&nbsp;&nbsp;m_Xform-&gt; SetScale 
(4,4,1);</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;vtkDataSetMapper 
*m_SphereMapper;<BR>&nbsp;&nbsp;m_SphereMapper=vtkDataSetMapper::New();<BR>&nbsp;&nbsp;m_SphereMapper-&gt;SetInput(m_Xform-&gt;GetOutput());</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial 
size=2>vtkActor&nbsp;*m_SphereActor;<BR>&nbsp;&nbsp;m_SphereActor=vtkActor::New();<BR>&nbsp;&nbsp;m_SphereActor-&gt;SetMapper(m_SphereMapper);<BR>&nbsp;&nbsp;m_SphereActor-&gt;SetTexture(m_Texture);</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial 
size=2>vtkRenderer&nbsp;*m_SphereRenderer;<BR>&nbsp;&nbsp;m_SphereRenderer=vtkRenderer::New();<BR>&nbsp;&nbsp;m_SphereRenderer-&gt;AddActor(m_SphereActor);</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial 
size=2>vtkRenderWindow&nbsp;*m_RenderWindow;<BR>&nbsp;&nbsp;m_RenderWindow=vtkRenderWindow::New();</FONT></DIV>
<DIV><FONT face=Arial 
size=2>&nbsp;&nbsp;m_RenderWindow-&gt;AddRenderer(m_SphereRenderer);</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial 
size=2>vtkRenderWindowInteractor&nbsp;*m_RenderWindowInteractor;<BR>&nbsp;&nbsp;m_RenderWindowInteractor=vtkRenderWindowInteractor::New();<BR>&nbsp;&nbsp;m_RenderWindowInteractor-&gt;SetRenderWindow(m_RenderWindow);<BR>&nbsp;&nbsp;m_RenderWindow-&gt;Render();<BR>&nbsp;&nbsp;m_RenderWindowInteractor-&gt;Start();</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV></DIV>
<DIV dir=ltr><FONT face=Arial size=2>I don't know what happens because 
vtkPolyDataType is inherited from vtkPointSet, and this from vtkDataSet. So, 
There would have no probles. wouldn't there?.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>¿does anybody know what happens?.</FONT></DIV>
<DIV><FONT face=Arial size=2>¿what can I do to solve the problem?.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Thanks in advance:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Sam</FONT></DIV></BODY></HTML>