Commit 63892d2b authored by Utkarsh Ayachit's avatar Utkarsh Ayachit

vtkPExtractHistogram: avoid depending on array order.

Fix logic to lookup arrays using index. Use array names instead.
parent aec29ce8
......@@ -87,7 +87,7 @@ int vtkPExtractHistogram::RequestData(
}
vtkTable* output = vtkTable::GetData(outputVector, 0);
vtkSmartPointer<vtkDataArray> oldExtents = output->GetRowData()->GetArray((int)0);
vtkSmartPointer<vtkDataArray> oldExtents = output->GetRowData()->GetArray("bin_extents");
if (oldExtents == NULL)
{
// Nothing to do if there is no data
......@@ -122,7 +122,7 @@ int vtkPExtractHistogram::RequestData(
vtkErrorMacro(<< "Reduced data has 0 arrays");
return 0;
}
output->GetRowData()->GetArray((int)0)->DeepCopy(oldExtents);
output->GetRowData()->GetArray("bin_extents")->DeepCopy(oldExtents);
if (this->CalculateAverages)
{
vtkDataArray* bin_values = output->GetRowData()->GetArray("bin_values");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment