[vtkusers] Trouble with vtkTable

Andras Lasso lasso at queensu.ca
Thu Mar 31 11:42:00 EDT 2016


You can have a look how VTK tables are used in Slicer. In this class there are a set of convenience functions for adding/removing lines/columns to existing table:
https://github.com/Slicer/Slicer/blob/master/Libs/MRML/Core/vtkMRMLTableNode.cxx

Adding rows is easy (just call InsertNextBlankRow). Adding columns is tricky, as number of rows in all columns should match.

Andras

From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Sebastien Jourdain
Sent: March 31, 2016 10:40 AM
To: AlexUtrobin <AlexUtrobin at yandex.ru>
Cc: vtkusers <vtkusers at vtk.org>
Subject: Re: [vtkusers] Trouble with vtkTable

I think the way vtkTable works (from memory), you need to create any http://www.vtk.org/doc/nightly/html/classvtkDataArray.html
and add them as column to the table. They obviously need to be the same length, but other than that, that's it...



On Thu, Mar 31, 2016 at 12:15 AM, AlexUtrobin <AlexUtrobin at yandex.ru<mailto:AlexUtrobin at yandex.ru>> wrote:
I use the Java version of VTK 6.1.
I need to add value to VtkTable, but this class does not contain a function
setValue and insertNextValue.
I tried to add value using vtkVariantArray, also did not find methods for
inserting.

Please help me to understand how it works.





--
View this message in context: http://vtk.1045678.n5.nabble.com/Trouble-with-vtkTable-tp5737452.html
Sent from the VTK - Users mailing list archive at Nabble.com.
_______________________________________________
Powered by www.kitware.com<http://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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160331/96f80661/attachment.html>


More information about the vtkusers mailing list