[vtkusers] PolyData and tensors

Darshan Pai darshanpai at gmail.com
Wed Mar 24 18:46:36 EDT 2010


I am trying to make a polydata composed of polylines , I am planning to add
tensor information at each of the points .
i want to make a EllipsoidTensorProbeRepresentation which will add this
polyline as a trajectory so that I can get an
ellipsoid representation across the polyline.

My main problem is adding the tensor.
I did the following

vtkDoubleArray *dbar = vtkDoubleArray::New();
dbar->SetNumberOfValues(size);
dbar->SetNumberOfComponents(9);

The for each point I add the 9 components using the following function

dbar->SetComponent(i,0,1)
dbar->SetComponent(i,1,1);
.............. and so on

When I try to add it to the polydata though
indata->GetPointData()->SetTensors(dbar);

It crashes .

I am not sure where I am going wrong

Please Help

Darshan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100324/bc71f3a6/attachment.htm>


More information about the vtkusers mailing list