<html><div style='background-color:'><DIV class=RTE>Hi vtk users,</DIV>
<DIV class=RTE> </DIV>
<DIV class=RTE>I have been trying to convert the tcl code- 'shepard.tcl' into a c++ code but I am encountering an error in one particular function as shown below:</DIV>
<DIV class=RTE> </DIV>
<DIV class=RTE>TCL code:</DIV>
<DIV class=RTE> </DIV>
<DIV class=RTE>vtkFloatArray scalars<BR>for {set i 0} {$i<50} {incr i 1} {<BR> eval scalars InsertValue $i [math Random 0 1]<BR>}</DIV>
<DIV class=RTE>vtkPolyData profile<BR> profile SetPoints points</DIV>
<DIV class=RTE>profile GetPointData] SetScalars scalars</DIV>
<DIV class=RTE> </DIV>
<DIV class=RTE>C++ code:</DIV>
<DIV class=RTE> </DIV>
<DIV class=RTE>vtkFloatArray *amplitudeScalars=vtkFloatArray::New();</DIV>
<DIV class=RTE> for(int j=0;j<numFilteredPoints;j++)<BR> {<BR> amplitudeScalars->InsertValue(j,filteredPoints->amplitudeValue);<BR> }</DIV>
<DIV class=RTE> vtkPolyData *profile=vtkPolyData::New();<BR> profile->SetPoints(points);<BR> profile->GetPointData()->GetScalars(amplitudeScalars); </DIV>
<DIV class=RTE> </DIV>
<DIV class=RTE>The error i am encountering is as follows:</DIV>
<DIV class=RTE> </DIV>
<DIV class=RTE>class vtkDataArray *__thiscall vtkDataSetAttributes::GetScalars(const char *)' : cannot convert parameter 1 from 'class vtkFloatArray *' to 'const char *'<BR> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast....</DIV>
<DIV class=RTE> </DIV>
<DIV class=RTE>Could anyone one help me on how to fix this?</DIV>
<DIV class=RTE> </DIV>
<DIV class=RTE>Thanks a zillion,</DIV>
<DIV class=RTE> </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>