<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'><div dir='ltr'>
Ops sorry,<div><br></div><div>The code works fine in VTK 4.2, but now returns null pointer on vtk 5.2.</div><div><br></div><div>Do you think that in VTK is impossible to get the vtkSource from the vtkActor?</div><div><br></div><div><br></div><div><br><br><div>&gt; Date: Fri, 9 Sep 2011 12:11:33 -0400<br>&gt; Subject: Re: [vtkusers] FW: invalid vtkSource Pointer from vtkActor<br>&gt; From: daviddoria@gmail.com<br>&gt; To: luigi_laneve@hotmail.com; vtkusers@vtk.org<br>&gt; <br>&gt; On Fri, Sep 9, 2011 at 12:07 PM, Luigi Laneve &lt;luigi_laneve@hotmail.com&gt; wrote:<br>&gt; &gt; vtkSource can be a vtkSphereSource or a&nbsp;vtkTubeFilter.<br>&gt; &gt; During a mouse move event callback i want to modify its dimensions as a<br>&gt; &gt; function of&nbsp;"camera-source" distance.<br>&gt; &gt; if ((source-&gt;IsA("vtkSphereSource"))==1)<br>&gt; &gt; {<br>&gt; &gt; float *center=(float*)(((vtkSphereSource*)source)-&gt;GetCenter());<br>&gt; &gt; double<br>&gt; &gt; radius=distance(position[0],position[1],position[2],center[0],center[1],center[2])*d_marker;<br>&gt; &gt; ((vtkSphereSource*)source)-&gt;SetRadius(radius);<br>&gt; &gt; }<br>&gt; &gt; if ((source-&gt;IsA("vtkTubeFilter"))==1)<br>&gt; &gt; {<br>&gt; &gt; double<br>&gt; &gt; radius=distance(position[0],position[1],position[2],0,0,0)*d_marker*0.5;<br>&gt; &gt; ((vtkTubeFilter*)source)-&gt;SetRadius(radius);<br>&gt; &gt; }<br>&gt; &gt; }<br>&gt; <br>&gt; Please keep your replies on the mailing list.<br>&gt; <br>&gt; Oh, I see. I've never used GetSource(), so I'm not sure if it is<br>&gt; supposed to return what you are looking for or not. I can confirm that<br>&gt; is NULL where you have said though.<br>&gt; <br>&gt; David<br></div></div>                                               </div></body>
</html>