------------------------------------------------------------------------------
| 61 | |
| 62 | //------------------------------------------------------------------------------ |
| 63 | int 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 | //------------------------------------------------------------------------------ |
| 101 | void vtkDijkstraGraphGeodesicPath::Initialize(vtkDataSet* inData) |
nothing calls this directly
no test coverage detected