[Paraview] Get Key values from spread sheet

David E DeMarle dave.demarle at kitware.com
Mon Mar 28 10:34:13 EDT 2016


Now you have a vtk data object, so use vtk level python to work with it:

vtkarray = p.GetCellData().GetArray("Volume")
for index in range(0, vtkarray.GetNumberOfTuples()):
  print vtkarray.GetValue(index)



David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909

On Mon, Mar 28, 2016 at 10:18 AM, Arshpreet Singh <arsh840 at gmail.com> wrote:

> On Tue, Mar 22, 2016 at 10:38 PM, Cory Quammen <cory.quammen at kitware.com>
> wrote:
>
> >>> You probably need to fetch the data over to the client side with
> >>>
> >>> Fetch(values_table)
> >>
> >> Thanks Cory, That was helpful.
>
> Hi Cory, I am still not able to find the value of "Volume" array.
>
>
> <code>
>
> p = Fetch(value_table)
>
> print p.GetCellData()
>
> </code>
>
> as the above code returns following output:
>
> vtkCellData (0xada13c0)
> Debug: Off
> Modified Time: 1916512
> Reference Count: 2
> Registered Events:
> Registered Observers:
> vtkObserver (0xad3bae0)
> Event: 33
> EventName: ModifiedEvent
> Command: 0xad28fe0
> Priority: 0
> Tag: 1
> Number Of Arrays: 1
> Array 0 name = Volume
> Number Of Components: 1
> Number Of Tuples: 1
> Copy Tuple Flags: ( 1 1 1 1 1 0 1 1 )
> Interpolate Flags: ( 1 1 1 1 1 0 0 1 )
> Pass Through Flags: ( 1 1 1 1 1 1 1 1 )
> Scalars: (none)
> Vectors: (none)
> Normals: (none)
> TCoords: (none)
> Tensors: (none)
> GlobalIds: (none)
> PedigreeIds: (none)
> EdgeFlag: (none)
>
> --
>
> Thanks
> Arshpreet Singh
>
> I am Sikh boy, Learning by doing and Learning by teaching is my religion.
>
> ------------------------------------------------------------------------------
> Slashdot TV.
> Video for Nerds.  Stuff that matters.
> http://tv.slashdot.org/
> _______________________________________________
> 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
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20160328/77f62e83/attachment.html>


More information about the ParaView mailing list