<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'>
<div style="font-family: Tahoma; font-size: 10pt; ">Hello,</div><div style="font-family: Tahoma; font-size: 10pt; ">I'm sorry if this can be an off topic question, but i've already submitted to vtkusers forum without success.</div><div style="font-family: Tahoma; font-size: 10pt; "><span class="Apple-style-span" style="color: rgb(42, 42, 42); line-height: 17px; "><br></span></div><div style="font-family: Tahoma; font-size: 10pt; "><span class="Apple-style-span" style="color: rgb(42, 42, 42); line-height: 17px; ">I've tried to get the pointer, obtaining the vtkMapper, the vtkDataSet, and the vtkSource </span><span class="Apple-style-span" style="color: rgb(42, 42, 42); line-height: 17px; ">by means of the GetInput()->GetSource() method as indicated in the following</span></div><div style="font-family: Tahoma; font-size: 10pt; "><span class="Apple-style-span" style="color: rgb(42, 42, 42); line-height: 17px; ">lines:</span></div><div style="font-family: Tahoma; font-size: 10pt; "><br></div><div><span class="Apple-style-span" style="color: rgb(42, 42, 42); "><font class="Apple-style-span" face="Tahoma" size="2"><span class="Apple-style-span" style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 13px; "><pre style="line-height: 17px; white-space: normal; ">vtkSphereSource *sphere=vtkSphereSource::New();<br style="line-height: 17px; ">sphere->SetRadius(radius);<br style="line-height: 17px; ">sphere->SetCenter(pf[0],pf[1],pf[2]);<br style="line-height: 17px; ">vtkPolyDataMapper *mapper_sphere = vtkPolyDataMapper ::New();<br style="line-height: 17px; ">mapper_sphere->SetInput(sphere->GetOutput());<br style="line-height: 17px; ">vtkActor *actor_sphere = vtkActor::New();<br style="line-height: 17px; ">actor_sphere->SetMapper(mapper_sphere);<br style="line-height: 17px; ">actor_sphere->GetProperty()->SetColor(1.,0.,0.);<br style="line-height: 17px; "><br style="line-height: 17px; ">actor_sphere->PickableOff();<br style="line-height: 17px; ">renderer->AddActor(actor_sphere);<br style="line-height: 17px; ">vtkMapper* map = actor_sphere->GetMapper();<br style="line-height: 17px; ">vtkSource* SS = map->GetInput()->GetSource(); SS is already NULL at this point!!!!!!!!!</pre><pre style="line-height: 17px; white-space: normal; "><br></pre><pre style="line-height: 17px; white-space: normal; "><b>But SS is always null.</b></pre><pre style="line-height: 17px; white-space: normal; ">In vtk 4.2 this pointer was VALID, any idea?</pre><pre style="line-height: 17px; white-space: normal; "><br></pre><pre style="line-height: 17px; white-space: normal; ">Thank you, </pre><pre style="line-height: 17px; white-space: normal; "><br></pre><pre style="line-height: 17px; white-space: normal; ">Luigi</pre></span></font><div style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 10pt; line-height: 17px; "><div style="line-height: 17px; font-family: Tahoma; font-size: 10pt; ">____________________________________________________________<span class="ecxApple-tab-span" style="line-height: 17px; white-space: pre; "> </span></div></div><div style="line-height: 17px; font-family: Tahoma; font-size: 10pt; "><span class="ecxApple-tab-span" style="line-height: 17px; white-space: pre; "><br style="line-height: 17px; "></span></div><div style="line-height: 17px; font-family: Tahoma; font-size: 10pt; ">Well, GetNumberOfItems() returns the exact number of spheres previously inserted,</div><div style="line-height: 17px; font-family: Tahoma; font-size: 10pt; "><span class="ecxApple-style-span" style="line-height: 17px; font-size: 10pt; ">GetItemAsObject returns </span>a valid actor pointer - GetMapper returns a valid mapper pointer</div><div style="line-height: 17px; font-family: Tahoma; font-size: 10pt; "> and GetInput returns a valid dataset pointer.</div><div style="line-height: 17px; font-family: Tahoma; font-size: 10pt; "><br style="line-height: 17px; "></div><div style="line-height: 17px; font-family: Tahoma; font-size: 10pt; ">But i'm wondering how it's possible that GetSource returns <b style="line-height: 17px; font-weight: bold; ">A NULL source pointer :(</b></div><div style="line-height: 17px; font-family: Tahoma; font-size: 10pt; "><br style="line-height: 17px; "></div><div style="line-height: 17px; font-family: Tahoma; font-size: 10pt; ">Thanks in advance for your contribute to my question.</div><div style="line-height: 17px; font-family: Tahoma; font-size: 10pt; "><br style="line-height: 17px; "></div><div style="line-height: 17px; font-family: Tahoma; font-size: 10pt; ">Luigi.</div></span></div><div style="font-family: Tahoma; font-size: 10pt; "><br></div> </div></body>
</html>