//create a VTK array to store the values
vtkSmartPointer<vtkFloatArray> values = vtkSmartPointer<vtkFloatArray>::New();
values->SetName("values");
for( uint i = 0; i < DATA.size(); ++i ){
float value = .... ; //insert your object's element getter here
values->InsertNextValue( value );
}
Enclose your code block between two ``` one before the 1st line and the other after the last line.
Paulo,
Thank for reply
Actually there is also another solution with Armadillo matrix tha looks like: arrC->SetArray(DATA.memptr(), DATA.size(), 1);
But anyway, thank for help