------------------------------------------------------------------------------
| 45 | |
| 46 | //------------------------------------------------------------------------------ |
| 47 | void vtkDijkstraGraphGeodesicPath::GetCumulativeWeights(vtkDoubleArray* weights) |
| 48 | { |
| 49 | if (!weights) |
| 50 | { |
| 51 | return; |
| 52 | } |
| 53 | |
| 54 | weights->Initialize(); |
| 55 | double* weightsArray = new double[this->Internals->CumulativeWeights.size()]; |
| 56 | std::copy(this->Internals->CumulativeWeights.begin(), this->Internals->CumulativeWeights.end(), |
| 57 | weightsArray); |
| 58 | weights->SetArray( |
| 59 | weightsArray, static_cast<vtkIdType>(this->Internals->CumulativeWeights.size()), 0); |
| 60 | } |
| 61 | |
| 62 | //------------------------------------------------------------------------------ |
| 63 | int vtkDijkstraGraphGeodesicPath::RequestData(vtkInformation* vtkNotUsed(request), |