------------------------------------------------------------------------------
| 570 | |
| 571 | //------------------------------------------------------------------------------ |
| 572 | bool vtkNetCDFReader::ComputeArraySelection() |
| 573 | { |
| 574 | if (this->VariableArraySelection->GetNumberOfArrays() == 0 || this->CurrentDimensions.empty()) |
| 575 | { |
| 576 | return false; |
| 577 | } |
| 578 | |
| 579 | this->VariableArraySelection->DisableAllArrays(); |
| 580 | |
| 581 | bool found = false; |
| 582 | for (vtkIdType i = 0; i < this->VariableDimensions->GetNumberOfValues(); i++) |
| 583 | { |
| 584 | if (this->VariableDimensions->GetValue(i) == this->CurrentDimensions) |
| 585 | { |
| 586 | const char* variableName = this->VariableArraySelection->GetArrayName(i); |
| 587 | this->VariableArraySelection->EnableArray(variableName); |
| 588 | found = true; |
| 589 | } |
| 590 | } |
| 591 | |
| 592 | if (!found) |
| 593 | { |
| 594 | vtkWarningMacro("Variable of dimensions (" << this->CurrentDimensions << ") not found."); |
| 595 | } |
| 596 | |
| 597 | return found; |
| 598 | } |
| 599 | |
| 600 | //------------------------------------------------------------------------------ |
| 601 | void vtkNetCDFReader::SetDimensions(const char* dimensions) |
no test coverage detected