//---------------------------------------
myPointsNumDataSet->Delete();
- myPtsLabeledDataMapper->RemoveAllInputs();
+ // commented: porting to vtk 5.0
+ // myPtsLabeledDataMapper->RemoveAllInputs();
myPtsLabeledDataMapper->Delete();
- myPtsSelectVisiblePoints->UnRegisterAllOutputs();
+ // commented: porting to vtk 5.0
+ // myPtsSelectVisiblePoints->UnRegisterAllOutputs();
myPtsSelectVisiblePoints->Delete();
- myPtsMaskPoints->UnRegisterAllOutputs();
+ // commented: porting to vtk 5.0
+ // myPtsMaskPoints->UnRegisterAllOutputs();
myPtsMaskPoints->Delete();
myPointLabels->Delete();
myClsLabeledDataMapper->RemoveAllInputs();
myClsLabeledDataMapper->Delete();
- myClsSelectVisiblePoints->UnRegisterAllOutputs();
+ // commented: porting to vtk 5.0
+ // myClsSelectVisiblePoints->UnRegisterAllOutputs();
myClsSelectVisiblePoints->Delete();
- myClsMaskPoints->UnRegisterAllOutputs();
+ // commented: porting to vtk 5.0
+ // myClsMaskPoints->UnRegisterAllOutputs();
myClsMaskPoints->Delete();
- myCellCenters->UnRegisterAllOutputs();
+ // commented: porting to vtk 5.0
+ // myCellCenters->UnRegisterAllOutputs();
myCellCenters->Delete();
myCellsLabels->Delete();
#include <VTKViewer_Transform.h>
#include <VTKViewer_TransformFilter.h>
-#include <VTKViewer_PassThroughFilter.h>
#include <VTKViewer_ExtractUnstructuredGrid.h>
// VTK Includes
#include <vtkUnsignedCharArray.h>
#include <vtkImplicitBoolean.h>
+#include <vtkPassThroughFilter.h>
#include "utilities.h"
myTransformFilter = VTKViewer_TransformFilter::New();
for(int i = 0; i < 6; i++)
- myPassFilter.push_back(VTKViewer_PassThroughFilter::New());
+ myPassFilter.push_back(vtkPassThroughFilter::New());
}
class vtkScalarBarActor;
class vtkLookupTable;
class vtkImplicitBoolean;
+class vtkPassThroughFilter;
class VTKViewer_Transform;
class VTKViewer_TransformFilter;
-class VTKViewer_PassThroughFilter;
class VTKViewer_ExtractUnstructuredGrid;
class SMESH_ExtractGeometry;
bool myStoreClippingMapping;
VTKViewer_GeometryFilter *myGeomFilter;
VTKViewer_TransformFilter *myTransformFilter;
- std::vector<VTKViewer_PassThroughFilter*> myPassFilter;
+ std::vector<vtkPassThroughFilter*> myPassFilter;
vtkShrinkFilter* myShrinkFilter;
bool myIsShrinkable;
#include <vtkObjectFactory.h>
#include <vtkPointData.h>
#include <vtkUnstructuredGrid.h>
+#include <vtkInformation.h>
+#include <vtkInformationVector.h>
using namespace std;
}
-void SMESH_ExtractGeometry::Execute()
+int SMESH_ExtractGeometry::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
+ vtkDataSet *input = vtkDataSet::SafeDownCast(
+ inInfo->Get(vtkDataObject::DATA_OBJECT()));
+ vtkUnstructuredGrid *output = vtkUnstructuredGrid::SafeDownCast(
+ outInfo->Get(vtkDataObject::DATA_OBJECT()));
+
vtkIdType ptId, numPts, numCells, i, cellId, newCellId, newId, *pointMap;
vtkIdList *cellPts;
vtkCell *cell;
vtkFloatingPointType multiplier;
vtkPoints *newPts;
vtkIdList *newCellPts;
- vtkDataSet *input = this->GetInput();
vtkPointData *pd = input->GetPointData();
vtkCellData *cd = input->GetCellData();
- vtkUnstructuredGrid *output = this->GetOutput();
vtkPointData *outputPD = output->GetPointData();
vtkCellData *outputCD = output->GetCellData();
int npts;
if ( ! this->ImplicitFunction )
{
vtkErrorMacro(<<"No implicit function specified");
- return;
+ return 0;
}
newCellPts = vtkIdList::New();
}
output->Squeeze();
+ return 1;
}
SMESH_ExtractGeometry();
~SMESH_ExtractGeometry();
- void Execute();
+ // Usual data generation method
+ virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
private:
bool myStoreMapping;
myMapper->RemoveAllInputs();
myMapper->Delete();
- myPlaneSource->UnRegisterAllOutputs();
+ // commented: porting to vtk 5.0
+ // myPlaneSource->UnRegisterAllOutputs();
myPlaneSource->Delete();
};