vtkStandardNewMacro(VISU_CommonCellsFilter);
VISU_CommonCellsFilter
-::VISU_CommonCellsFilter() :
- myIsProfileSet( false ),
- myIsCellsSet( false )
-{}
+::VISU_CommonCellsFilter()
+{
+ this->SetNumberOfInputPorts(1);
+}
VISU_CommonCellsFilter
::~VISU_CommonCellsFilter()
VISU_CommonCellsFilter
::SetProfileUG(vtkAlgorithmOutput *input)
{
- myIsProfileSet = true;
this->SetInputConnection(0, input);
}
VISU_CommonCellsFilter
::SetCellsUG(vtkAlgorithmOutput *input)
{
- myIsCellsSet = true;
+ this->SetNumberOfInputPorts(2);
this->SetInputConnection(1, input);
}
{
VISU::TTimerLog aTimerLog(MYDEBUG,"VISU_CommonCellsFilter::Execute");
- if( !myIsProfileSet )
- return 0;
-
vtkInformation *inInfo1 = inputVector[0]->GetInformationObject(0);
vtkUnstructuredGrid *anInputProfileUG = vtkUnstructuredGrid::SafeDownCast(
inInfo1->Get(vtkDataObject::DATA_OBJECT()));
vtkUnstructuredGrid *anInputCellsUG = NULL;
- if( myIsCellsSet )
+ if( this->GetNumberOfInputPorts() > 1 )
{
vtkInformation *inInfo2 = inputVector[1]->GetInformationObject(0);
anInputCellsUG = vtkUnstructuredGrid::SafeDownCast(
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); //generate output data
-private:
- bool myIsProfileSet;
- bool myIsCellsSet;
-
private:
VISU_CommonCellsFilter(const VISU_CommonCellsFilter&); // Lock copy
void operator=(const VISU_CommonCellsFilter&); // Lock copy