------------------------------------------------------------------------------
| 57 | |
| 58 | //------------------------------------------------------------------------------ |
| 59 | int vtkXMLStructuredDataReader::ReadPrimaryElement(vtkXMLDataElement* ePrimary) |
| 60 | { |
| 61 | // Get the whole extent attribute. |
| 62 | int extent[6]; |
| 63 | if (ePrimary->GetVectorAttribute("WholeExtent", 6, extent) == 6) |
| 64 | { |
| 65 | memcpy(this->WholeExtent, extent, 6 * sizeof(int)); |
| 66 | |
| 67 | // Set the output's whole extent. |
| 68 | vtkInformation* outInfo = this->GetCurrentOutputInformation(); |
| 69 | outInfo->Set(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), extent, 6); |
| 70 | |
| 71 | // Check each axis to see if it has cells. |
| 72 | for (int a = 0; a < 3; ++a) |
| 73 | { |
| 74 | this->AxesEmpty[a] = (extent[2 * a + 1] > extent[2 * a]) ? 0 : 1; |
| 75 | } |
| 76 | } |
| 77 | else |
| 78 | { |
| 79 | vtkErrorMacro(<< this->GetDataSetName() << " element has no WholeExtent."); |
| 80 | return 0; |
| 81 | } |
| 82 | |
| 83 | return this->Superclass::ReadPrimaryElement(ePrimary); |
| 84 | } |
| 85 | |
| 86 | //------------------------------------------------------------------------------ |
| 87 | void vtkXMLStructuredDataReader::SetupOutputInformation(vtkInformation* outInfo) |
nothing calls this directly
no test coverage detected