------------------------------------------------------------------------------ Read the row data of a vtk data file.
| 1351 | //------------------------------------------------------------------------------ |
| 1352 | // Read the row data of a vtk data file. |
| 1353 | int vtkDataReader::ReadRowData(vtkTable* t, vtkIdType numEdges) |
| 1354 | { |
| 1355 | char line[256]; |
| 1356 | vtkDataSetAttributes* a = t->GetRowData(); |
| 1357 | |
| 1358 | vtkDebugMacro(<< "Reading vtk row data"); |
| 1359 | |
| 1360 | // |
| 1361 | // Read keywords until end-of-file |
| 1362 | // |
| 1363 | while (this->ReadString(line)) |
| 1364 | { |
| 1365 | // |
| 1366 | // read scalar data |
| 1367 | // |
| 1368 | if (!strncmp(this->LowerCase(line), "scalars", 7)) |
| 1369 | { |
| 1370 | if (!this->ReadScalarData(a, numEdges)) |
| 1371 | { |
| 1372 | return 0; |
| 1373 | } |
| 1374 | } |
| 1375 | // |
| 1376 | // read vector data |
| 1377 | // |
| 1378 | else if (!strncmp(line, "vectors", 7)) |
| 1379 | { |
| 1380 | if (!this->ReadVectorData(a, numEdges)) |
| 1381 | { |
| 1382 | return 0; |
| 1383 | } |
| 1384 | } |
| 1385 | // |
| 1386 | // read 3x2 symmetric tensor data |
| 1387 | // |
| 1388 | else if (!strncmp(line, "tensors6", 8)) |
| 1389 | { |
| 1390 | if (!this->ReadTensorData(a, numEdges, 6)) |
| 1391 | { |
| 1392 | return 0; |
| 1393 | } |
| 1394 | } |
| 1395 | // |
| 1396 | // read 3x3 tensor data |
| 1397 | // |
| 1398 | else if (!strncmp(line, "tensors", 7)) |
| 1399 | { |
| 1400 | if (!this->ReadTensorData(a, numEdges)) |
| 1401 | { |
| 1402 | return 0; |
| 1403 | } |
| 1404 | } |
| 1405 | // |
| 1406 | // read normals data |
| 1407 | // |
| 1408 | else if (!strncmp(line, "normals", 7)) |
| 1409 | { |
| 1410 | if (!this->ReadNormalData(a, numEdges)) |
no test coverage detected