Hey Aurélien,

(Someone with more detailed knowledge can correct me if I'm wrong...) pdi and 
inputs[0] refer to the same input to the programmable filter, but pdi is the 
VTK object and inputs[0] is a more Python-friendly wrapper for the VTK object 
which makes access to the object properties more pythonic, and allows easy 
creation of numpy arrays behind the scenes for shorter code. Maybe there is a 
way to prove that they refer to the same object, but I don't know offhand how 
to do that. :)

I end up using both methods for object access depending on what I'm doing. If 
I'm doing more "pure VTK" manipulations then I use pdi, but if I'm doing 
calculations (and sometimes assignments) with the attribute and point arrays, 
then I like using the new API with numpy.

Talk to you later,
-Eric


On Aug 23, 2010, at 3:38 AM, Aurélien Marsan wrote:

> Hello Eric, 
> 
> In the solution you propose, what is the inputs[0] for ?
> Is there a connection between the line : 
> pdi = self.GetInputDataObject(0,0)
> and inputs[0] ? 
> 
> Or does inputs[0] picks on something else ? 
> 
> Thanks,
> 
> Aurélien

_______________________________________________
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 ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to