diff --git a/Filters/Extraction/vtkExtractArraysOverTime.cxx b/Filters/Extraction/vtkExtractArraysOverTime.cxx index d102784c27a35b02899a7eedcb7eaed4eb3a26e3..ae0523b4d2a9e2d6c201a26edbcc0502f38e3a3a 100644 --- a/Filters/Extraction/vtkExtractArraysOverTime.cxx +++ b/Filters/Extraction/vtkExtractArraysOverTime.cxx @@ -882,12 +882,6 @@ int vtkExtractArraysOverTime::RequestData( return 0; } - if (!inputVector[1]->GetInformationObject(0)) - { - return 1; - } - - // get the output data object vtkInformation* outInfo = outputVector->GetInformationObject(0); @@ -895,7 +889,11 @@ int vtkExtractArraysOverTime::RequestData( if (!this->IsExecuting) { vtkInformation* inInfo2 = inputVector[1]->GetInformationObject(0); - vtkSelection* selection = vtkSelection::GetData(inInfo2); + vtkSelection* selection = this->GetSelection(inInfo2); + if (!selection) + { + return 1; + } if (!this->DetermineSelectionType(selection)) { return 0; @@ -961,7 +959,7 @@ void vtkExtractArraysOverTime::ExecuteAtTimeStep( vtkInformation *selInfo = inputVector[1]->GetInformationObject(0); vtkDataObject* input = vtkDataObject::GetData(inInfo); - vtkSelection* selInput = vtkSelection::GetData(selInfo); + vtkSelection* selInput = this->GetSelection(selInfo); vtkExtractSelection* filter = this->SelectionExtractor; if (!filter) @@ -1040,3 +1038,8 @@ int vtkExtractArraysOverTime::DetermineSelectionType(vtkSelection* sel) this->FieldType = fieldType; return 1; } +//---------------------------------------------------------------------------- +vtkSelection* vtkExtractArraysOverTime::GetSelection(vtkInformation* info) +{ + return vtkSelection::GetData(info); +} \ No newline at end of file diff --git a/Filters/Extraction/vtkExtractArraysOverTime.h b/Filters/Extraction/vtkExtractArraysOverTime.h index 6ed28a8c8e601a53281220caddcd12be0b8aaace..44713329724bf019b3c311d47cf691fb831e8aeb 100644 --- a/Filters/Extraction/vtkExtractArraysOverTime.h +++ b/Filters/Extraction/vtkExtractArraysOverTime.h @@ -105,6 +105,9 @@ protected: vtkInformationVector** inputVector, vtkInformationVector* outputVector); + // Add virtual method to be overwritten in the subclass. takes the + virtual vtkSelection* GetSelection(vtkInformation* info); + // Description: // Determines the FieldType and ContentType for the selection. If the // selection is a vtkSelection::SELECTIONS selection, then this method ensures