[vtkusers] Convert vtkActor to vtkPolyData

David Gobbi david.gobbi at gmail.com
Sun Mar 2 11:38:44 EST 2014


Hi Agatte,

You cannot get the data from the actor until you have done the following:
1) set a mapper for the actor
2) set an input for the mapper

The actor has no data unless something gives the actor some data.

  David


On Sun, Mar 2, 2014 at 8:58 AM, Cory Quammen <cory.quammen at kitware.com> wrote:
> Would you be able to post a fully compilable program that has your
> original problem to help debug this? It's a bit of work on your part,
> but it is the easiest way for people on the list to help you.
>
> Thanks,
> Cory
>
> On Sun, Mar 2, 2014 at 10:42 AM, agatte <agatakrason at gmail.com> wrote:
>> 1) refLower = vtkPolyData::SafeDownCast(
>> actorLower->GetMapper()->GetInputAsDataSet());
>>     I received an exception concering  :
>>     Unhandled exception at 0x0f0fb5e1 (vtkFiltering.dll) : 0xC0000005:
>> Access violation reading location 0x00000034.
>>
>>
>> 2) I tried :
>> actorLower->GetMapper()->GetInputAsDataSet()->Print(std::cout);
>>     It doesn't compiled.
>>     error C2664: 'vtkPolyData::SafeDownCast' : cannot convert parameter 1
>> from 'void' to 'vtkObjectBase *'
>>
>>
>>
>>
>> 2014-03-02 16:01 GMT+01:00 Cory Quammen-2 [via VTK] <[hidden email]>:
>>>
>>> What does
>>>
>>> actorLower->GetMapper()->GetInputAsDataSet()->Print(std::cout);
>>>
>>> report?
>>>
>>> On Sun, Mar 2, 2014 at 9:52 AM, agatte <[hidden email]> wrote:
>>>
>>> > Thanks for quick reply Cory.
>>> >
>>> > I tried it but it doesn't work ...
>>> >
>>> >
>>> >
>>> > --
>>> > View this message in context:
>>> > http://vtk.1045678.n5.nabble.com/Convert-vtkActor-to-vtkPolyData-tp5726148p5726152.html
>>> > Sent from the VTK - Users mailing list archive at Nabble.com.
>>> > _______________________________________________
>>> > 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
>>>
>>>
>>> ________________________________
>>> If you reply to this email, your message will be added to the discussion
>>> below:
>>>
>>> http://vtk.1045678.n5.nabble.com/Convert-vtkActor-to-vtkPolyData-tp5726148p5726153.html
>>> To unsubscribe from Convert vtkActor to vtkPolyData, click here.
>>> NAML
>>
>>
>>
>> ________________________________
>> View this message in context: Re: Convert vtkActor to vtkPolyData
>>
>> Sent from the VTK - Users mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> 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


More information about the vtkusers mailing list