Commit 9ad49843 authored by Burlen Loring's avatar Burlen Loring Committed by Code Review

Merge topic 'probe-pass-arrays' into master

7fe52898 vtk pprobe pass arrays
parents 0b20a7ba 7fe52898
......@@ -52,6 +52,9 @@ vtkProbeFilter::vtkProbeFilter()
this->CellList = 0;
this->UseNullPoint = true;
this->PassCellArrays = 0;
this->PassPointArrays = 0;
}
//----------------------------------------------------------------------------
......@@ -116,6 +119,27 @@ int vtkProbeFilter::RequestData(
}
this->Probe(input, source, output);
// copy point data arrays
if (this->PassPointArrays)
{
int numPtArrays = input->GetPointData()->GetNumberOfArrays();
for (int i=0; i<numPtArrays; ++i)
{
output->GetPointData()->AddArray(input->GetPointData()->GetArray(i));
}
}
// copy cell data arrays
if (this->PassCellArrays)
{
int numCellArrays = input->GetCellData()->GetNumberOfArrays();
for (int i=0; i<numCellArrays; ++i)
{
output->GetCellData()->AddArray(input->GetCellData()->GetArray(i));
}
}
return 1;
}
......
......@@ -86,11 +86,22 @@ public:
vtkSetStringMacro(ValidPointMaskArrayName)
vtkGetStringMacro(ValidPointMaskArrayName)
// Description:
// Shallow copy the input arrays to the output.
vtkSetMacro(PassCellArrays, int);
vtkGetMacro(PassCellArrays, int);
//
vtkSetMacro(PassPointArrays, int);
vtkGetMacro(PassPointArrays, int);
//BTX
protected:
vtkProbeFilter();
~vtkProbeFilter();
int PassCellArrays;
int PassPointArrays;
int SpatialMatch;
virtual int RequestData(vtkInformation *, vtkInformationVector **,
......
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