Skip to content
Snippets Groups Projects
Commit 65a09b2c authored by Schuyler Kylstra's avatar Schuyler Kylstra
Browse files

ENH: refs #14978 - Added virtual method to return vtkSelection pointer

Added virtual GetSelection function to be overwritten by subclasses of vtkExtractarraysOverTime.
parent 0dd022b8
No related merge requests found
......@@ -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
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment