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

Method RequestData

Filters/Modeling/vtkDijkstraGraphGeodesicPath.cxx:63–98  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

61
62//------------------------------------------------------------------------------
63int vtkDijkstraGraphGeodesicPath::RequestData(vtkInformation* vtkNotUsed(request),
64 vtkInformationVector** inputVector, vtkInformationVector* outputVector)
65{
66 vtkInformation* inInfo = inputVector[0]->GetInformationObject(0);
67 vtkInformation* outInfo = outputVector->GetInformationObject(0);
68
69 vtkPolyData* input = vtkPolyData::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT()));
70 if (!input)
71 {
72 return 0;
73 }
74
75 vtkPolyData* output = vtkPolyData::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT()));
76 if (!output)
77 {
78 return 0;
79 }
80
81 if (this->AdjacencyBuildTime.GetMTime() < input->GetMTime())
82 {
83 this->Initialize(input);
84 }
85 else
86 {
87 this->Reset();
88 }
89
90 if (this->NumberOfVertices == 0)
91 {
92 return 0;
93 }
94
95 this->ShortestPath(input, this->StartVertex, this->EndVertex);
96 this->TraceShortestPath(input, output, this->StartVertex, this->EndVertex);
97 return 1;
98}
99
100//------------------------------------------------------------------------------
101void vtkDijkstraGraphGeodesicPath::Initialize(vtkDataSet* inData)

Callers

nothing calls this directly

Calls 7

InitializeMethod · 0.95
ResetMethod · 0.95
ShortestPathMethod · 0.95
TraceShortestPathMethod · 0.95
GetInformationObjectMethod · 0.80
GetMethod · 0.45
GetMTimeMethod · 0.45

Tested by

no test coverage detected