[vtkusers] recovering the Polydata
Bill Lorensen
bill.lorensen at gmail.com
Tue Jun 22 19:02:07 EDT 2010
Is the pipeline up-to-date? That is, have you rendered the actor?
On Tue, Jun 22, 2010 at 12:04 PM, Giancarlo Amati
<ilferraresebono at hotmail.it> wrote:
> That's what I do:
>
> void setDataset(vtkPolyData *pd) {
> _dataset = vtkPolyData::SafeDownCast(pd);
> _dataset->Update();
> }
>
> vtkSmartPointer<vtkActor> tmpAct = mv_actors.front();
>
> if (tmpAct->GetMapper()->IsA("vtkPolyDataMapper")) {
> vtkPolyDataMapper *tmpPD =
> vtkPolyDataMapper::SafeDownCast(tmpAct->GetMapper());
> mp_windImg->setDataset(tmpPD->GetInput());
> }
>
> where setData is member function of mp_windImg.
>
> GC.
>
> ________________________________
> From: robbie.banks at gmail.com
> To: darshanpai at gmail.com
> Date: Tue, 22 Jun 2010 09:01:14 -0700
> CC: vtkusers at vtk.org
> Subject: Re: [vtkusers] recovering the Polydata
>
> To get polydata you will have to safe downcast, I,e.
> Vtkploydata::safedowncast(actor->GetMapper()->GetInput())
> I think
>
> On Jun 22, 2010, at 8:20 AM, Darshan Pai <darshanpai at gmail.com> wrote:
>
> I am just wondering , maybe I am wrong, but if you delete the Input then
> Actor->GetMapper()->GetInput() should fail . Maybe that is your error here ?
>
> On Tue, Jun 22, 2010 at 10:59 AM, Jothy <jothybasu at gmail.com> wrote:
>
> Actor.Getmapper()->GetInput() work well for me.
>
> Verify your input
>
> Jothy
>
> On Tue, Jun 22, 2010 at 3:44 PM, Giancarlo Amati
> <ilferraresebono at hotmail.it> wrote:
>
> Hello everybody,
>
> I am trying to retrieve the polydata linked to a particular actor. I have my
> actor saved in a list
> I used the "GetMapper" function to get the pointer to a vtkMapper * and the
> I used
> the function "IsA" to test if it is a vtkPolyDataMapper.
> The IsA function returns true and I used
>
> vtkPolyData *pd = mapper->GetInput();
>
> to retrieve the polydata, but somehow I don't get anything reasonable and
> the number of vertices is 0.
>
> is that the right way to retrieve a polydata from the pipeline?
>
> Many thanks.
> Giancarlo
>
> ________________________________
> Un mondo di personalizzazioni per Messenger, PC e cellulare, scaricale
> gratis!
> _______________________________________________
> 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
>
>
>
> _______________________________________________
> 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
>
>
> _______________________________________________
> 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
>
> ________________________________
> Un mondo di personalizzazioni per Messenger, PC e cellulare, scaricale
> gratis!
> _______________________________________________
> 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
>
>
More information about the vtkusers
mailing list