[vtkusers] memcpy for a vector stored in vtkStructuredGrid
cel02000
cel02000 at yahoo.com
Mon May 21 04:43:12 EDT 2012
Dear All,
I have a vtkStructuredGrid dataset which has a vector of three components. I
want to copy the first component of the vector by using memcpy. I tried the
following but it copies all the components. Could someone help me how to do
it?
vtkIdType numberOfTuples = sgrid->GetNumberOfPoints();
double* data;
data = sgrid->GetPointData()->GetArray( "Vel3D" )->GetTupleN( 0,
numberOfTuples-1);
memcpy( (void *)(mxGetPr(pa2)), (void *) data, sizeof(data));
Thanks,
--
View this message in context: http://vtk.1045678.n5.nabble.com/memcpy-for-a-vector-stored-in-vtkStructuredGrid-tp5712797.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list