[vtk-developers] Extract vtkSource from vtkActor

Luigi Laneve luigi_laneve at hotmail.com
Mon Sep 12 09:15:43 EDT 2011


Hello,I'm sorry if this can be an off topic question, but i've already submitted to vtkusers forum without success.
I've tried to get the pointer, obtaining the vtkMapper, the vtkDataSet, and the vtkSource by means of the GetInput()->GetSource() method as indicated in the followinglines:
vtkSphereSource *sphere=vtkSphereSource::New();sphere->SetRadius(radius);sphere->SetCenter(pf[0],pf[1],pf[2]);vtkPolyDataMapper *mapper_sphere = vtkPolyDataMapper ::New();mapper_sphere->SetInput(sphere->GetOutput());vtkActor *actor_sphere = vtkActor::New();actor_sphere->SetMapper(mapper_sphere);actor_sphere->GetProperty()->SetColor(1.,0.,0.);actor_sphere->PickableOff();renderer->AddActor(actor_sphere);vtkMapper* map = actor_sphere->GetMapper();vtkSource* SS = map->GetInput()->GetSource();  SS is already NULL at this point!!!!!!!!!
But SS is always null.In vtk 4.2 this pointer was VALID, any idea?
Thank you, 
Luigi____________________________________________________________	Well, GetNumberOfItems() returns the exact number of spheres previously inserted,GetItemAsObject returns a valid actor pointer - GetMapper returns a valid mapper pointer and GetInput returns a valid dataset pointer.But i'm wondering how it's possible that GetSource returns A NULL source pointer :(Thanks in advance for your contribute to my question.Luigi.
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20110912/4835b8fa/attachment.html>


More information about the vtk-developers mailing list