[vtkusers] Problem with vtkTable and vtkVariantArray

Wylie, Brian bnwylie at sandia.gov
Tue Mar 31 10:16:01 EDT 2009


Just adding to the list...

I particularly like the python examples...

database.py, database2.py, mysql_database.py, etc in VTK\Examples\Infovis\Python. They show nice small examples of connecting to a database pulling information as tables and constructing graphs.

and also the EasyView example shows databases, tables, trees, and Qt all together...

in VTK\Examples\Infovis\Cxx\EasyView

  Brian Wylie - Org 1424
  Sandia National Laboratories
  MS 1323 - Building CSRI/242
  (505)844-2238 FAX(505)284-2518   
       _______ __
      /_  __(_) /_____ _____
       / / / / __/ __ `/ __ \
      / / / / /_/ /_/ / / / /
     /_/ /_/\__/\__,_/_/ /_/
            Informatics Toolkit

-----Original Message-----
From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of Jeff Baumes
Sent: Tuesday, March 31, 2009 5:27 AM
To: Roger Blum
Cc: vtkusers at public.kitware.com
Subject: Re: [vtkusers] Problem with vtkTable and vtkVariantArray

On Tue, Mar 31, 2009 at 5:08 AM, Roger Blum <rogerblum at hawaii.rr.com> wrote:
> My questions:
> - Is there an easier way to extract the data from the vtkRowQuery
>  object?

Your way is the easy way to do it in C++, but it is not currently available in wrapped languages. The problem is vtkVariant, which is a lightweight, stack-based object that does not subclass from vtkObject.
No methods that take or return a variant are wrapped.

> - Why is method GetValue with 2 params invalid when the online doc
>  tells me this method exists? Maybe a wrapping problem?

Yes, it is a wrapping issue.

> - How else can I read the values of vtkTable and/or vtkVarianArray

vtkTable's data is internally stored as a collection of arrays that are uniformly-typed, just like attributes of other data objects in VTK. You can access the columns through table->GetColumn(i) or
table->GetColumnByName(name), which are wrapped. The column array
types should match the types in the database. vtkVariantArray is currently essentially unaccessable through wrappers, since you cannot set or retrieve values.

> - Are there any examples available for the newer Vtk classes?

Some of the newer data objects (table, graph, tree) were made primarily for the infovis effort in VTK. See Examples/Infovis and the tests in Infovis/Testing/Cxx and Views/Testing/Cxx. Some rudimentary documentation is available for Titan (i.e. infovis in VTK) at http://www.sandia.gov/Titan and http://www.kitware.com/InfovisWiki.
There are plenty of other new classes; search for tests or examples that use them in the VTK repository.

Jeff
_______________________________________________
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

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





More information about the vtkusers mailing list