MCPcopy Create free account
hub / github.com/Kitware/VTK / RequestData

Method RequestData

Filters/Modeling/vtkBandedPolyDataContourFilter.cxx:319–912  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Create filled contours for polydata

Source from the content-addressed store, hash-verified

317//------------------------------------------------------------------------------
318// Create filled contours for polydata
319int 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

Callers

nothing calls this directly

Calls 15

InsertCellMethod · 0.95
ClipEdgeMethod · 0.95
InsertLineMethod · 0.95
GetContourEdgesOutputMethod · 0.95
GetInformationObjectMethod · 0.80
backMethod · 0.80
ComputeClipIndexMethod · 0.80
CopyFieldOffMethod · 0.80
InterpolateAllocateMethod · 0.80
SetScalarsMethod · 0.80
GetVertsMethod · 0.80

Tested by

no test coverage detected