VTKinformation with vector values


Could somebody help me using vtkInformationDoubleVectorKey ? I compiled the example given here: https://kitware.github.io/vtk-examples/site/Cxx/PolyData/AttachAttributes/ , works as expected.

However I do not quite understand the Set function. It looks to me that the number of arguments corresponds to the size of the vector. Is there a way to pass the vector directly ? By the way if I use a size 4 vector, e.g. if I change length to 4 and add values[3] to the argument list of function Set, compilation fails with following message:

error: no matching function for call to ‘vtkInformation::Set(vtkInformationDoubleVectorKey*&, double&, double&, double&, double&)’

Any help please ?

well… sorry. There is indeed a function Set (vtkInformation *info, const double *value, int length)

This function however does not work for me with Java. I can use append instead but this is not as flexible… Would anyone have a hint or a working example ?