------------------------------------------------------------------------------
| 98 | |
| 99 | //------------------------------------------------------------------------------ |
| 100 | int vtkExtractSelectedArraysOverTime::RequestData( |
| 101 | vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector) |
| 102 | { |
| 103 | if (this->ArraysExtractor->GetNumberOfTimeSteps() <= 0) |
| 104 | { |
| 105 | vtkErrorMacro("No time steps in input data!"); |
| 106 | return 0; |
| 107 | } |
| 108 | |
| 109 | // get the output data object |
| 110 | vtkInformation* outInfo = outputVector->GetInformationObject(0); |
| 111 | |
| 112 | // is this the first request |
| 113 | if (!this->IsExecuting) |
| 114 | { |
| 115 | vtkSelection* selection = vtkSelection::GetData(inputVector[1], 0); |
| 116 | if (!selection) |
| 117 | { |
| 118 | return 1; |
| 119 | } |
| 120 | |
| 121 | if (!this->DetermineSelectionType(selection)) |
| 122 | { |
| 123 | return 0; |
| 124 | } |
| 125 | |
| 126 | bool reportStats = this->ReportStatisticsOnly; |
| 127 | switch (this->ContentType) |
| 128 | { |
| 129 | // for the following types were the number of elements selected may |
| 130 | // change over time, we can only track summaries. |
| 131 | case vtkSelectionNode::QUERY: |
| 132 | reportStats = true; |
| 133 | break; |
| 134 | default: |
| 135 | break; |
| 136 | } |
| 137 | |
| 138 | this->ArraysExtractor->SetReportStatisticsOnly(reportStats); |
| 139 | const int association = vtkSelectionNode::ConvertSelectionFieldToAttributeType(this->FieldType); |
| 140 | this->ArraysExtractor->SetFieldAssociation(association); |
| 141 | switch (association) |
| 142 | { |
| 143 | case vtkDataObject::POINT: |
| 144 | this->ArraysExtractor->SetInputArrayToProcess(0, 0, 0, association, "vtkOriginalPointIds"); |
| 145 | break; |
| 146 | case vtkDataObject::CELL: |
| 147 | this->ArraysExtractor->SetInputArrayToProcess(0, 0, 0, association, "vtkOriginalCellIds"); |
| 148 | break; |
| 149 | case vtkDataObject::ROW: |
| 150 | this->ArraysExtractor->SetInputArrayToProcess(0, 0, 0, association, "vtkOriginalRowIds"); |
| 151 | break; |
| 152 | default: |
| 153 | this->ArraysExtractor->SetInputArrayToProcess( |
| 154 | 0, 0, 0, association, vtkDataSetAttributes::GLOBALIDS); |
| 155 | break; |
| 156 | } |
| 157 | this->IsExecuting = true; |
nothing calls this directly
no test coverage detected