[vtkusers] vtkCellDerivatives + vtkGenericEnSightReader
Hans van Piggelen
hansvp at hotmail.com
Tue Mar 18 11:10:01 EDT 2008
Hi,
I'm using a large EnSight dataset, which contains one tetrahedron cell array and around a hundred point arrays, with over 500,000 nodes. I would like to calculate the spatial derivatives of each of these point arrays using the cell derivatives class. I'm wondering whether I'm using it correctly (see below), so can anyone please comment on it?
In short it works like this:
vtkGenericEnSightReader *vEnSightReader = vtkGenericEnSightReader::New();...Load/display EnSight data...vtkCellDerivatives *vCellDerivatives = vtkCellDerivatives::New();vtkCellDataToPointData *vCellToPointData = vtkCellDataToPointData::New();vCellDerivatives->SetVectorModeToComputeGradient();
vEnsightReader->GetOutput()->GetPointData()->SetActiveAttribute(iIndex, 0)
vCellDerivatives->SetInput(vEnsightReader->GetOutput());
vCellDerivatives->Update();
vCellDerivatives->SetInput(vEnsightReader->GetOutput());
vCellToPointData->SetInput(vCellDerivatives->GetOutput());
vCellToPointData->Update();
...
Get values using vCellToPointData->GetOutput()
The code works without crashing or anything, and displaying is also working, though I find it difficult to check my results.
Thanks in advance!
Hans
_________________________________________________________________
Watch “Cause Effect,” a show about real people making a real difference. Learn more.
http://im.live.com/Messenger/IM/MTV/?source=text_watchcause
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080318/25397825/attachment-0004.htm>
More information about the vtkusers
mailing list