<!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=Arial size=2>Hi Snehal</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I think you mean SetScalars not
GetScalars</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>HTH</FONT></DIV>
<DIV><FONT face=Arial size=2>Malcolm</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=ssnehal007@hotmail.com href="mailto:ssnehal007@hotmail.com">Snehal
Srikrishna</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=vtkusers@vtk.org
href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, February 02, 2004 12:00
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [vtkusers] Function cast
error</DIV>
<DIV><BR></DIV>
<DIV>
<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> _______________________________________________ This is
the private VTK discussion list. Please keep messages on-topic. Check the FAQ
at: <HTTP: vtkfaq cgi-bin public.kitware.com>Follow this link to
subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers
</BLOCKQUOTE></BODY></HTML>