<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Using Python I did some testings before I went to the C++ version of my
code.<br>
But, for my surprise , I got some type checking problems... :(<br>
<br>
Here are the codes: <br>
<br>
<i>Python:<br>
<br>
(...)<br>
dem = vtk.vtkVolume16Reader()<br>
dem.SetDataDimensions(480, 600)<br>
dem.SetDataByteOrderToLittleEndian()<br>
dem.SetFilePrefix("brasil")<br>
dem.SetDataSpacing(1000, 1000, 10)<br>
<br>
geometry = vtk.vtkImageDataGeometryFilter()<br>
geometry.SetInput(dem.GetOutput())<br>
<br>
warp = vtk.vtkWarpScalar()<br>
warp.SetInput(geometry.GetOutput())<br>
warp.SetScaleFactor(1)<br>
(...)<br>
<br>
C++:<br>
<br>
(...)<br>
vtkVolume16Reader *dem = vtkVolume16Reader::New();<br>
dem->SetDataDimensions(480, 600);<br>
dem->SetDataByteOrderToLittleEndian();<br>
dem->SetFilePrefix("brasil");<br>
dem->SetDataSpacing(1000, 1000, 10);<br>
<br>
vtkImageDataGeometryFilter *geometry =
vtkImageDataGeometryFilter::New();<br>
geometry->SetInput(dem->GetOutput());<br>
<br>
vtkWarpScalar *warp = vtkWarpScalar::New();<br>
warp->SetInput(geometry->GetOutput()); // I get the
error here!!!!<br>
warp->SetScaleFactor(1);<br>
(...)</i><br>
<br>
This is the error I get:<br>
<br>
main.cc:33: no matching function for call to
`vtkWarpScalar::SetInput(vtkPolyData*)'<br>
/usr/local/include/vtk/vtkPointSetToPointSetFilter.h:57: candidates
are: void <br>
vtkPointSetToPointSetFilter::SetInput(vtkPointSet*)<br>
<br>
In all the examples (python or tcl) you can get the output from the
"vtkImageDataGeometryFilter" and set it as the input to "vtkWarpScalar".<br>
But when I did it using C++ I got the error above.<br>
<br>
Please, can anyone tell me what's wrong? ... I am stuck.<br>
Any suggestions are more than welcome!!!! :)<br>
<br>
Thanks for you time and patience,<br>
<br>
Lucas <br>
<pre class="moz-signature" cols="72">--
Lucas Peetz Dulley <a class="moz-txt-link-rfc2396E" href="mailto:dulley@lsi.usp.br"><dulley@lsi.usp.br></a>
Homepage: <a class="moz-txt-link-freetext" href="http://www.lsi.usp.br/~dulley/">http://www.lsi.usp.br/~dulley/</a>
Virtual Reality Center - CAVERNA Digital
LSI - POLI - USP Tel: +55-11-3091-5374
Av. Prof. Luciano Gualberto, 158 trav. 3
CEP: 05508-900 - Sao Paulo - SP - Brazil
</pre>
</body>
</html>