[vtkusers] Problem getting the correct number of cell arrays

Dennis Merkert dennis.merkert at itwm.fraunhofer.de
Fri Aug 19 10:09:48 EDT 2011


Hi,

i have the following problem:

I've got a vtk file of structured points (the file is attached). When I
try to determine the number of cell arrays, I get the wrong number.

There should be 6 arrays ("Materials", "vonMisesStrain", "Stress",
"vonMisesStress", "Displacement", "DisplacementMagnitude") but I get
only the arrays "Materials", "Stress" and
 "Displacement".

Paraview displays the correct number of cell data.

The code I use is the following (in C++):

vtkStructuredPoints *dataSet;     //Here I have previously loaded the
structured points array
int numberOfResultsForCellData =
dataSet->GetCellData()->GetNumberOfArrays();     //returns 3
int numberOfResultsForPointData =
dataSet->GetPointData()->GetNumberOfArrays();  //returns 0


I'm using vtk in version 5.6.1 and gcc in version 4.3.2.

I hope you can help me.


Best regards,

Dennis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: loadcase_xx.vtk
Type: application/octet-stream
Size: 1642 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110819/dfae8267/attachment.obj>


More information about the vtkusers mailing list