[vtkusers] FW: invalid vtkSource Pointer from vtkActor
Luigi Laneve
luigi_laneve at hotmail.com
Fri Sep 9 05:54:30 EDT 2011
Please,
Any suggestion?
In the meantime i've verified how the bounds and the center positionof the mapper object is exactly the same of the previously inserted sphere.
Thank you.
From: luigi_laneve at hotmail.com
To: vtkusers at vtk.org
Date: Wed, 7 Sep 2011 16:43:34 +0000
Subject: [vtkusers] invalid vtkSource Pointer from vtkActor
Hi to all,
After loading a certain number of vtkSphereSource in a vtkPropCollection object (actor_garbage_collection) ,i want to define a callback that is able to read them in order to make some calculations.____________________________________________________________int n=actor_garbage_collection->GetNumberOfItems(); for(int i=0;i<n;i++) { vtkActor *actor=(vtkActor*)(actor_garbage_collection->GetItemAsObject(i));
vtkMapper *mapper=actor->GetMapper(); vtkDataSet* dset=mapper->GetInput(); vtkSource* source = dset->GetSource();
// SOME COMPUTATION
}____________________________________________________________
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.
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110909/97bf7fb4/attachment.htm>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ATT00001
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110909/97bf7fb4/attachment.txt>
More information about the vtkusers
mailing list