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

Method RequestData

Filters/Modeling/vtkDijkstraImageGeodesicPath.cxx:114–152  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

112
113//------------------------------------------------------------------------------
114int vtkDijkstraImageGeodesicPath::RequestData(vtkInformation* vtkNotUsed(request),
115 vtkInformationVector** inputVector, vtkInformationVector* outputVector)
116{
117 vtkInformation* costInfo = inputVector[0]->GetInformationObject(0);
118 vtkInformation* outInfo = outputVector->GetInformationObject(0);
119
120 vtkImageData* image = vtkImageData::SafeDownCast(costInfo->Get(vtkDataObject::DATA_OBJECT()));
121
122 if (!image)
123 {
124 return 0;
125 }
126
127 vtkPolyData* output = vtkPolyData::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT()));
128
129 if (!output)
130 {
131 return 0;
132 }
133
134 if (this->AdjacencyBuildTime.GetMTime() < image->GetMTime())
135 {
136 this->Initialize(image);
137 }
138 else
139 {
140 // if the filter's static cost weights change, then update them
141 if (this->RebuildStaticCosts)
142 {
143 this->UpdateStaticCosts(image);
144 }
145 this->Reset();
146 }
147
148 this->ShortestPath(image, this->StartVertex, this->EndVertex);
149 this->TraceShortestPath(image, output, this->StartVertex, this->EndVertex);
150
151 return 1;
152}
153
154//------------------------------------------------------------------------------
155double vtkDijkstraImageGeodesicPath::CalculateStaticEdgeCost(

Callers

nothing calls this directly

Calls 8

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

Tested by

no test coverage detected