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

Method RequestData

Filters/Geometry/vtkProjectSphereFilter.cxx:96–125  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

94
95//------------------------------------------------------------------------------
96int vtkProjectSphereFilter::RequestData(vtkInformation* vtkNotUsed(request),
97 vtkInformationVector** inputVector, vtkInformationVector* outputVector)
98{
99 vtkDebugMacro("RequestData");
100
101 vtkInformation* inInfo = inputVector[0]->GetInformationObject(0);
102 vtkInformation* outInfo = outputVector->GetInformationObject(0);
103
104 vtkPointSet* input = vtkPointSet::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT()));
105 if (vtkPolyData* poly = vtkPolyData::SafeDownCast(input))
106 {
107 if (poly->GetVerts()->GetNumberOfCells() > 0 || poly->GetLines()->GetNumberOfCells() > 0 ||
108 poly->GetStrips()->GetNumberOfCells() > 0)
109 {
110 vtkErrorMacro("Can only deal with vtkPolyData polys.");
111 return 0;
112 }
113 }
114
115 vtkPointSet* output = vtkPointSet::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT()));
116
117 vtkNew<vtkIdList> polePointIds;
118 this->TransformPointInformation(input, output, polePointIds.GetPointer());
119 this->TransformCellInformation(input, output, polePointIds.GetPointer());
120 output->GetFieldData()->ShallowCopy(input->GetFieldData());
121
122 vtkDebugMacro("Leaving RequestData");
123
124 return 1;
125}
126
127//------------------------------------------------------------------------------
128void vtkProjectSphereFilter::TransformPointInformation(

Callers

nothing calls this directly

Calls 11

GetInformationObjectMethod · 0.80
GetVertsMethod · 0.80
GetStripsMethod · 0.80
GetMethod · 0.45
GetNumberOfCellsMethod · 0.45
GetLinesMethod · 0.45
GetPointerMethod · 0.45
ShallowCopyMethod · 0.45
GetFieldDataMethod · 0.45

Tested by

no test coverage detected