------------------------------------------------------------------------------
| 694 | |
| 695 | //------------------------------------------------------------------------------ |
| 696 | int vtkEnSight6BinaryReader::ReadMeasuredGeometryFile( |
| 697 | const char* fileName, int timeStep, vtkMultiBlockDataSet* output) |
| 698 | { |
| 699 | char line[81]; |
| 700 | vtkIdType i; |
| 701 | int* pointIds; |
| 702 | float* coords; |
| 703 | vtkPoints* points = vtkPoints::New(); |
| 704 | vtkPolyData* pd = vtkPolyData::New(); |
| 705 | |
| 706 | this->NumberOfNewOutputs++; |
| 707 | |
| 708 | // Initialize |
| 709 | // |
| 710 | if (!fileName) |
| 711 | { |
| 712 | vtkErrorMacro("A MeasuredFileName must be specified in the case file."); |
| 713 | points->Delete(); |
| 714 | pd->Delete(); |
| 715 | return 0; |
| 716 | } |
| 717 | std::string sfilename; |
| 718 | if (this->FilePath) |
| 719 | { |
| 720 | sfilename = this->FilePath; |
| 721 | if (sfilename.at(sfilename.length() - 1) != '/') |
| 722 | { |
| 723 | sfilename += "/"; |
| 724 | } |
| 725 | sfilename += fileName; |
| 726 | vtkDebugMacro("full path to measured geometry file: " << sfilename); |
| 727 | } |
| 728 | else |
| 729 | { |
| 730 | sfilename = fileName; |
| 731 | } |
| 732 | |
| 733 | if (this->OpenFile(sfilename.c_str()) == 0) |
| 734 | { |
| 735 | vtkErrorMacro("Unable to open file: " << sfilename); |
| 736 | points->Delete(); |
| 737 | pd->Delete(); |
| 738 | return 0; |
| 739 | } |
| 740 | |
| 741 | this->ReadLine(line); |
| 742 | auto resultSubLine = |
| 743 | vtk::scan<std::string_view, std::string_view>(std::string_view(line), "{:s} {:s}"); |
| 744 | auto subLine = std::get<1>(resultSubLine->values()); |
| 745 | if (subLine != "Binary") |
| 746 | { |
| 747 | vtkErrorMacro("This is not a binary data set. Try " |
| 748 | << "vtkEnSightGoldReader."); |
| 749 | points->Delete(); |
| 750 | pd->Delete(); |
| 751 | return 0; |
| 752 | } |
| 753 |
nothing calls this directly
no test coverage detected