#include <vtkCellData.h>
#include <vtkPoints.h>
#include <vtkIdList.h>
+#include <vtkInformation.h>
+#include <vtkInformationVector.h>
vtkStandardNewMacro(VISU_MaskPointsFilter);
VISU_MaskPointsFilter::~VISU_MaskPointsFilter(){}
-void VISU_MaskPointsFilter::Execute(){
- vtkPointSet *anInput = this->GetInput(), *anOutput = this->GetOutput();
+int VISU_MaskPointsFilter::RequestData(
+ vtkInformation *vtkNotUsed(request),
+ vtkInformationVector **inputVector,
+ vtkInformationVector *outputVector)
+{
+ // get the info objects
+ vtkInformation *inInfo = inputVector[0]->GetInformationObject(0);
+ vtkInformation *outInfo = outputVector->GetInformationObject(0);
+
+ // get the input and ouptut
+ vtkPointSet *anInput = vtkPointSet::SafeDownCast(
+ inInfo->Get(vtkDataObject::DATA_OBJECT()));
+ vtkPointSet *anOutput = vtkPointSet::SafeDownCast(
+ outInfo->Get(vtkDataObject::DATA_OBJECT()));
+
anOutput->GetPointData()->CopyAllOff();
anOutput->GetCellData()->CopyAllOff();
anOutput->CopyStructure(anInput);
anOutput->SetPoints(aNewPoints);
aNewPoints->Delete();
aPoints->Delete();
+ return 1;
}