- aDataSet->Update();
- int numCells=aDataSet->GetNumberOfCells();
- int numPts = aDataSet->GetNumberOfPoints();
- //It's impossible to use to apply "shrink" for "empty" dataset
- if (numCells < 1 || numPts < 1)
- return;
- myShrinkFilter->SetInput( aDataSet );
- myPassFilter[ 1 ]->SetInput( myShrinkFilter->GetOutput() );
+ myPassFilter[ 0 ]->Update();
+ if ( vtkDataSet* aDataSet = myPassFilter[ 0 ]->GetOutput() )
+ {
+ int numCells=aDataSet->GetNumberOfCells();
+ int numPts = aDataSet->GetNumberOfPoints();
+ //It's impossible to use to apply "shrink" for "empty" dataset
+ if (numCells < 1 || numPts < 1)
+ return;
+ }
+ myShrinkFilter->SetInputConnection( anOutput );
+ myPassFilter[ 1 ]->SetInputConnection( myShrinkFilter->GetOutputPort() );