------------------------------------------------------------------------------ Read the point data of a vtk data file. The number of points (from the dataset) must match the number of points defined in point attributes (unless no geometry was defined).
| 866 | // dataset) must match the number of points defined in point attributes (unless |
| 867 | // no geometry was defined). |
| 868 | int vtkDataReader::ReadPointData(vtkDataSet* ds, vtkIdType numPts) |
| 869 | { |
| 870 | char line[256]; |
| 871 | vtkDataSetAttributes* a = ds->GetPointData(); |
| 872 | |
| 873 | vtkDebugMacro(<< "Reading vtk point data"); |
| 874 | |
| 875 | // |
| 876 | // Read keywords until end-of-file |
| 877 | // |
| 878 | while (this->ReadString(line)) |
| 879 | { |
| 880 | // |
| 881 | // read scalar data |
| 882 | // |
| 883 | if (!strncmp(this->LowerCase(line), "scalars", 7)) |
| 884 | { |
| 885 | if (!this->ReadScalarData(a, numPts)) |
| 886 | { |
| 887 | return 0; |
| 888 | } |
| 889 | } |
| 890 | // |
| 891 | // read vector data |
| 892 | // |
| 893 | else if (!strncmp(line, "vectors", 7)) |
| 894 | { |
| 895 | if (!this->ReadVectorData(a, numPts)) |
| 896 | { |
| 897 | return 0; |
| 898 | } |
| 899 | } |
| 900 | // |
| 901 | // read 3x2 symmetric tensor data |
| 902 | // |
| 903 | else if (!strncmp(line, "tensors6", 8)) |
| 904 | { |
| 905 | if (!this->ReadTensorData(a, numPts, 6)) |
| 906 | { |
| 907 | return 0; |
| 908 | } |
| 909 | } |
| 910 | // |
| 911 | // read 3x3 tensor data |
| 912 | // |
| 913 | else if (!strncmp(line, "tensors", 7)) |
| 914 | { |
| 915 | if (!this->ReadTensorData(a, numPts)) |
| 916 | { |
| 917 | return 0; |
| 918 | } |
| 919 | } |
| 920 | // |
| 921 | // read normals data |
| 922 | // |
| 923 | else if (!strncmp(line, "normals", 7)) |
| 924 | { |
| 925 |
no test coverage detected