------------------------------------------------------------------------------
| 71 | |
| 72 | //------------------------------------------------------------------------------ |
| 73 | int vtkXMLPStructuredGridReader::ReadPrimaryElement(vtkXMLDataElement* ePrimary) |
| 74 | { |
| 75 | if (!this->Superclass::ReadPrimaryElement(ePrimary)) |
| 76 | { |
| 77 | return 0; |
| 78 | } |
| 79 | |
| 80 | // Find the PPoints element. |
| 81 | this->PPointsElement = nullptr; |
| 82 | int numNested = ePrimary->GetNumberOfNestedElements(); |
| 83 | for (int i = 0; i < numNested; ++i) |
| 84 | { |
| 85 | vtkXMLDataElement* eNested = ePrimary->GetNestedElement(i); |
| 86 | if ((strcmp(eNested->GetName(), "PPoints") == 0) && (eNested->GetNumberOfNestedElements() == 1)) |
| 87 | { |
| 88 | this->PPointsElement = eNested; |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | if (!this->PPointsElement) |
| 93 | { |
| 94 | int extent[6]; |
| 95 | this->GetCurrentOutputInformation()->Get( |
| 96 | vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), extent); |
| 97 | if ((extent[0] <= extent[1]) && (extent[2] <= extent[3]) && (extent[4] <= extent[5])) |
| 98 | { |
| 99 | vtkErrorMacro("Could not find PPoints element with 1 array."); |
| 100 | return 0; |
| 101 | } |
| 102 | } |
| 103 | |
| 104 | return 1; |
| 105 | } |
| 106 | |
| 107 | //------------------------------------------------------------------------------ |
| 108 | void vtkXMLPStructuredGridReader::SetupOutputData() |
nothing calls this directly
no test coverage detected