------------------------------------------------------------------------------ Create filled contours for polydata
| 317 | //------------------------------------------------------------------------------ |
| 318 | // Create filled contours for polydata |
| 319 | int vtkBandedPolyDataContourFilter::RequestData(vtkInformation* vtkNotUsed(request), |
| 320 | vtkInformationVector** inputVector, vtkInformationVector* outputVector) |
| 321 | { |
| 322 | // get the info objects |
| 323 | vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); |
| 324 | vtkInformation* outInfo = outputVector->GetInformationObject(0); |
| 325 | |
| 326 | // get the input and output |
| 327 | vtkPolyData* input = vtkPolyData::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT())); |
| 328 | vtkPolyData* output = vtkPolyData::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT())); |
| 329 | |
| 330 | vtkPointData* pd = input->GetPointData(); |
| 331 | vtkPointData* outPD = output->GetPointData(); |
| 332 | vtkCellData* outCD = output->GetCellData(); |
| 333 | vtkPoints* inPts = input->GetPoints(); |
| 334 | vtkDataArray* inScalars = this->GetInputArrayToProcess(0, inputVector); |
| 335 | bool abort = false; |
| 336 | vtkIdType npts = 0; |
| 337 | vtkIdType cellId = 0; |
| 338 | const vtkIdType* pts = nullptr; |
| 339 | int numEdgePts, maxCellSize; |
| 340 | vtkIdType v; |
| 341 | vtkIdType vR; |
| 342 | const vtkIdType* intPts; |
| 343 | vtkIdType intCellId; |
| 344 | vtkIdType numIntPts; |
| 345 | vtkIdType numPts, numCells, estimatedSize; |
| 346 | |
| 347 | vtkDebugMacro(<< "Executing banded contour filter"); |
| 348 | |
| 349 | // Check input |
| 350 | // |
| 351 | |
| 352 | numCells = input->GetNumberOfCells(); |
| 353 | if (!inPts || (numPts = inPts->GetNumberOfPoints()) < 1 || numCells < 1) |
| 354 | { |
| 355 | vtkErrorMacro(<< "No input data!"); |
| 356 | return 1; |
| 357 | } |
| 358 | |
| 359 | if (!inScalars) |
| 360 | { |
| 361 | vtkErrorMacro(<< "No input data: point scalars required!"); |
| 362 | return 1; |
| 363 | } |
| 364 | |
| 365 | if (inScalars->GetNumberOfComponents() < this->Component + 1) |
| 366 | { |
| 367 | vtkErrorMacro(<< "Input scalars expected to have " << this->Component + 1 << " components"); |
| 368 | return 0; |
| 369 | } |
| 370 | |
| 371 | if (this->ContourValues->GetNumberOfContours() < 1) |
| 372 | { |
| 373 | vtkWarningMacro(<< "No contour values"); |
| 374 | return 1; |
| 375 | } |
| 376 |
nothing calls this directly
no test coverage detected