[vtkusers] casting vtkVariant to vtkStringArray - how?

Tanaka Simon tanakas at gmx.ch
Tue Nov 4 18:48:08 EST 2014


Dear VTK users,

I have:

myVtkVariantArray->InsertNextValue( vtkVariant(myVtkStringArray) );

how can i get back the myVtkStringArray? something like this does not work:

myVtkStringArray_extract = myVtkVariantArray->getValue(...)



please have a look at the short example (attached).

thanks!
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: 1574 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20141105/23f6fb36/attachment.cxx>


More information about the vtkusers mailing list