[Paraview] nan

Eric E. Monson emonson at cs.duke.edu
Mon Aug 23 09:46:41 EDT 2010


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20100823/47c9c2f6/attachment.htm>


More information about the ParaView mailing list