MCPcopy Create free account
hub / github.com/Kitware/VTK / ReadPointData

Method ReadPointData

IO/Legacy/vtkDataReader.cxx:868–1031  ·  view source on GitHub ↗

------------------------------------------------------------------------------ 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).

Source from the content-addressed store, hash-verified

866// dataset) must match the number of points defined in point attributes (unless
867// no geometry was defined).
868int 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

Callers 6

ReadCellDataMethod · 0.95
ReadMeshSimpleMethod · 0.80
ReadMeshSimpleMethod · 0.80
ReadMeshSimpleMethod · 0.80
ReadMeshSimpleMethod · 0.80
ReadMeshSimpleMethod · 0.80

Calls 15

ReadStringMethod · 0.95
LowerCaseMethod · 0.95
ReadScalarDataMethod · 0.95
ReadVectorDataMethod · 0.95
ReadTensorDataMethod · 0.95
ReadNormalDataMethod · 0.95
ReadTCoordsDataMethod · 0.95
ReadGlobalIdsMethod · 0.95
ReadPedigreeIdsMethod · 0.95
ReadEdgeFlagsMethod · 0.95
ReadCoScalarDataMethod · 0.95
ReadLutDataMethod · 0.95

Tested by

no test coverage detected