44 vtkInformation *request,
45 vtkInformationVector **inputVector,
46 vtkInformationVector *outputVector)
48 vtkInformation *inInfo = inputVector[0]->GetInformationObject(0);
50 vtkPolyData *input = vtkPolyData::SafeDownCast(
51 inInfo->Get(vtkDataObject::DATA_OBJECT()));
54 boundaryExtractor->SetInputData(input);
55 boundaryExtractor->Update();
57 vtkPolyData* boundaries = boundaryExtractor->GetOutput();
59 int numberOfBoundaries = boundaries->GetNumberOfCells();
61 if (numberOfBoundaries != 2)
63 vtkWarningMacro(<<
"Input poly data is not topologically a cylinder.");
64 boundaryExtractor->Delete();
65 this->GetOutput()->DeepCopy(input);
82 for (
int i=0; i<numberOfBoundaries; i++)
84 vtkCell* boundaryCell = boundaries->GetCell(i);
86 for (
int j=0; j<boundaryCell->GetNumberOfPoints(); j++)
88 this->
BoundaryPointIds->InsertNextId(
static_cast<vtkIdType
>(boundaries->GetPointData()->GetScalars()->GetTuple1(boundaryCell->GetPointId(j))));