[vtkusers] Error running example

Cory Quammen cory.quammen at kitware.com
Tue Sep 29 13:19:20 EDT 2015


Great!

Note that in VTK 6 and above, the SetInput() method has been replaced with
SetInputData(). See [1].

Best regards,
Cory

[1] http://www.vtk.org/Wiki/VTK/VTK_6_Migration/Replacement_of_SetInput

On Tue, Sep 29, 2015 at 1:16 PM, Ricardo Santos <
ricardo.c.r.santos at gmail.com> wrote:

> Yup, that did the trick! Thank you.
>
> I am running VTK 5.10, downloaded with the Anaconda.
>
> On Tue, Sep 29, 2015 at 12:36 PM, Cory Quammen <cory.quammen at kitware.com>
> wrote:
>
>> Hi Ricardo,
>>
>> I suspect you are using an older version of VTK. Which version are you
>> running? Try changing SetInputData to just SetInput.
>>
>> Thanks,
>> Cory
>>
>> On Tue, Sep 29, 2015 at 11:28 AM, Ricardo Santos <
>> ricardo.c.r.santos at gmail.com> wrote:
>>
>>> Hello,
>>>
>>>      I am trying to run the python vtk example from
>>> http://www.vtk.org/Wiki/VTK/Examples/Python/PolyData/SubdivisionFilters
>>> and I am getting an error on this line:
>>>
>>> cleanPolyData.SetInputData(trianglePolyData)
>>>
>>>
>>> The preceding lines of code are:
>>>
>>> # Create a polydata object
>>> trianglePolyData = vtk.vtkPolyData()
>>>  # Add the geometry and topology to the polydata
>>> trianglePolyData.SetPoints(points)
>>> trianglePolyData.GetPointData().SetScalars(colors)
>>> trianglePolyData.SetPolys(triangles)
>>>  # Clean the polydata so that the edges are shared !
>>> cleanPolyData = vtk.vtkCleanPolyData()
>>> cleanPolyData.SetInputData(trianglePolyData)
>>>
>>>
>>> and the error I am getting is:
>>>
>>>
>>>   File "C:/Users/Ricardo Santos/Documents/Python Scripts/testeVTK3.py",
>>> line 80, in <module>
>>>     cleanPolyData.SetInputData(trianglePolyData)
>>>
>>> AttributeError: SetInputData
>>>
>>>
>>>      Does anyone know what I am getting wrong? Thanks!
>>>
>>> _______________________________________________
>>> 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
>>>
>>> Search the list archives at: http://markmail.org/search/?q=vtkusers
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://public.kitware.com/mailman/listinfo/vtkusers
>>>
>>>
>>
>>
>> --
>> Cory Quammen
>> R&D Engineer
>> Kitware, Inc.
>>
>
>


-- 
Cory Quammen
R&D Engineer
Kitware, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150929/17aaf698/attachment.html>


More information about the vtkusers mailing list