<html><div style='background-color:'><DIV class=RTE>Hi vtk users,</DIV>
<DIV class=RTE>&nbsp;</DIV>
<DIV class=RTE>I have been trying to convert&nbsp;the tcl code- 'shepard.tcl' into a c++ code but I am encountering an&nbsp;error in one particular function as shown below:</DIV>
<DIV class=RTE>&nbsp;</DIV>
<DIV class=RTE>TCL code:</DIV>
<DIV class=RTE>&nbsp;</DIV>
<DIV class=RTE>vtkFloatArray scalars<BR>for {set i 0} {$i&lt;50} {incr i 1} {<BR>&nbsp;&nbsp;&nbsp; eval scalars InsertValue $i [math Random 0 1]<BR>}</DIV>
<DIV class=RTE>vtkPolyData profile<BR>&nbsp;&nbsp;&nbsp; profile SetPoints points</DIV>
<DIV class=RTE>profile GetPointData] SetScalars scalars</DIV>
<DIV class=RTE>&nbsp;</DIV>
<DIV class=RTE>C++ code:</DIV>
<DIV class=RTE>&nbsp;</DIV>
<DIV class=RTE>vtkFloatArray *amplitudeScalars=vtkFloatArray::New();</DIV>
<DIV class=RTE>&nbsp;for(int j=0;j&lt;numFilteredPoints;j++)<BR>&nbsp;{<BR>&nbsp;&nbsp;amplitudeScalars-&gt;InsertValue(j,filteredPoints-&gt;amplitudeValue);<BR>&nbsp;}</DIV>
<DIV class=RTE>&nbsp;vtkPolyData *profile=vtkPolyData::New();<BR>&nbsp;profile-&gt;SetPoints(points);<BR>&nbsp;profile-&gt;GetPointData()-&gt;GetScalars(amplitudeScalars);&nbsp;</DIV>
<DIV class=RTE>&nbsp;</DIV>
<DIV class=RTE>The error i am encountering is as follows:</DIV>
<DIV class=RTE>&nbsp;</DIV>
<DIV class=RTE>class vtkDataArray *__thiscall vtkDataSetAttributes::GetScalars(const char *)' : cannot convert parameter 1 from 'class vtkFloatArray *' to 'const char *'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast....</DIV>
<DIV class=RTE>&nbsp;</DIV>
<DIV class=RTE>Could anyone one help me on how to fix this?</DIV>
<DIV class=RTE>&nbsp;</DIV>
<DIV class=RTE>Thanks a zillion,</DIV>
<DIV class=RTE>&nbsp;</DIV>
<DIV class=RTE>Snehal</DIV></div><br clear=all><hr>Play the prediction game on MEZ. Win Sehwag’s autographed T-shirts. <a href="http://g.msn.com/8HMAENIN/2731??PS=">Predict and win on myenjoyzone.com</a> </html>