[vtkusers] vtkStringArray with heterogeneous number of components?

Tanaka Simon tanakas at gmx.ch
Tue Nov 4 11:12:14 EST 2014


Dear VTK users,

I want to have a vtkStringArray, but the number of components shall NOT 
be the same for all points.

Example (a sample code is attached):
-> for point 1, the string attribute should be "one"
-> for point2, the string attributes should be "one" and "two"
-> etc.

That is like std::vector< std::vector<...> > where the inner vectors may 
have different length.


What would be the approach:
-> heterogeneous number of components?
-> heterogeneous number of tuples?
-> not vtkStringArray, but some other vtkXXXArray containing another 
container with variable length?


Thanks for any suggestions
Simon



-------------- next part --------------

cmake_minimum_required(VERSION 2.8)

PROJECT(vtk_heterogeneous_array)

find_package(VTK REQUIRED)
include(${VTK_USE_FILE})

add_executable(vtk_heterogeneous_array MACOSX_BUNDLE vtk_heterogeneous_array)

if(VTK_LIBRARIES)
  target_link_libraries(vtk_heterogeneous_array ${VTK_LIBRARIES})
else()
  target_link_libraries(vtk_heterogeneous_array vtkHybrid vtkWidgets)
endif()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vtk_heterogeneous_array.cxx
Type: text/x-c++src
Size: 1253 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20141104/814f6289/attachment-0001.cxx>


More information about the vtkusers mailing list