<div dir="ltr">Great!<div><br></div><div>Note that in VTK 6 and above, the SetInput() method has been replaced with SetInputData(). See [1].</div><div><br></div><div>Best regards,</div><div>Cory</div><div><br></div><div>[1] <a href="http://www.vtk.org/Wiki/VTK/VTK_6_Migration/Replacement_of_SetInput">http://www.vtk.org/Wiki/VTK/VTK_6_Migration/Replacement_of_SetInput</a></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 29, 2015 at 1:16 PM, Ricardo Santos <span dir="ltr"><<a href="mailto:ricardo.c.r.santos@gmail.com" target="_blank">ricardo.c.r.santos@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Yup, that did the trick! Thank you.<div><br></div><div>I am running VTK 5.10, downloaded with the Anaconda.</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 29, 2015 at 12:36 PM, Cory Quammen <span dir="ltr"><<a href="mailto:cory.quammen@kitware.com" target="_blank">cory.quammen@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Ricardo,<div><br></div><div>I suspect you are using an older version of VTK. Which version are you running? Try changing SetInputData to just SetInput.</div><div><br></div><div>Thanks,</div><div>Cory</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Tue, Sep 29, 2015 at 11:28 AM, Ricardo Santos <span dir="ltr"><<a href="mailto:ricardo.c.r.santos@gmail.com" target="_blank">ricardo.c.r.santos@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">Hello,<div><br></div><div> I am trying to run the python vtk example from <a href="http://www.vtk.org/Wiki/VTK/Examples/Python/PolyData/SubdivisionFilters" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Python/PolyData/SubdivisionFilters</a> and I am getting an error on this line:</div><div><br></div><div><pre style="font-family:monospace,monospace;padding:0px;border:0px none white;color:rgb(0,0,0);line-height:1.2em;font-stretch:normal;font-size:1em;margin-top:0px;margin-bottom:0px;vertical-align:top;background:none rgb(249,249,249)">cleanPolyData.<span>SetInputData</span><span>(</span>trianglePolyData<span>)</span></pre><br>The preceding lines of code are:</div><div><br></div><div><pre style="font-family:monospace,monospace;padding:0px;border:0px none white;color:rgb(0,0,0);line-height:1.2em;font-stretch:normal;font-size:1em;margin-top:0px;margin-bottom:0px;vertical-align:top;background:none rgb(249,249,249)"><span style="color:rgb(128,128,128);font-style:italic"># Create a polydata object</span>
trianglePolyData <span style="color:rgb(102,204,102)">=</span> vtk.<span>vtkPolyData</span><span>(</span><span>)</span>
<span style="color:rgb(128,128,128);font-style:italic"># Add the geometry and topology to the polydata</span>
trianglePolyData.<span>SetPoints</span><span>(</span>points<span>)</span>
trianglePolyData.<span>GetPointData</span><span>(</span><span>)</span>.<span>SetScalars</span><span>(</span>colors<span>)</span>
trianglePolyData.<span>SetPolys</span><span>(</span>triangles<span>)</span>
<span style="color:rgb(128,128,128);font-style:italic"># Clean the polydata so that the edges are shared !</span>
cleanPolyData <span style="color:rgb(102,204,102)">=</span> vtk.<span>vtkCleanPolyData</span><span>(</span><span>)</span>
cleanPolyData.<span>SetInputData</span><span>(</span>trianglePolyData)</pre><pre style="font-family:monospace,monospace;padding:0px;border:0px none white;color:rgb(0,0,0);line-height:1.2em;font-stretch:normal;font-size:1em;margin-top:0px;margin-bottom:0px;vertical-align:top;background:none rgb(249,249,249)"><br></pre>and the error I am getting is:<br><br><br> File "C:/Users/Ricardo Santos/Documents/Python Scripts/testeVTK3.py", line 80, in <module><br> cleanPolyData.SetInputData(trianglePolyData)<br><br>AttributeError: SetInputData<br><br><br> Does anyone know what I am getting wrong? Thanks!<br></div></div>
<br></div></div>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><span><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div>Cory Quammen<br>R&D Engineer<br>Kitware, Inc.</div>
</font></span></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Cory Quammen<br>R&D Engineer<br>Kitware, Inc.</div>
</div>