Skip to content
Snippets Groups Projects
Commit 7fe52898 authored by Burlen Loring's avatar Burlen Loring Committed by Burlen Loring
Browse files

vtk pprobe pass arrays

optionally pass arrays on the input dataset

Change-Id: I51a95896d9101e0d2404e2ca3225fa62ebc173f3
parent 8ce16949
Branches
Tags
No related merge requests found
......@@ -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 **,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment