[vtkusers] Table/array swizzling
david.gobbi at gmail.com
Wed May 26 16:48:00 EDT 2010
On Wed, May 26, 2010 at 1:36 PM, David Doria <daviddoria+vtk at gmail.com> wrote:
> 2) I don't think there is any "mass cast" like this. It should be too
> bad to loop through the array and cast each member individually and
> add it to the other type of array.
With the vtkDataArray sublcasses, you can achieve this by doing a
DeepCopy between the arrays: all the values will be converted
automatically. The string arrays do not support this auto-conversion
feature, however. I'm not sure why they don't, but conversion from
strings to unicode is tricky because there are a lot of international
8-bit string encodings out there and it usually isn't safe to try and
guess which encoding is being used.
More information about the vtkusers