------------------------------------------------------------------------------
| 555 | |
| 556 | //------------------------------------------------------------------------------ |
| 557 | void vtkImageStack::UpdatePaths() |
| 558 | { |
| 559 | if (this->GetMTime() > this->PathTime || |
| 560 | (this->Paths && this->Paths->GetMTime() > this->PathTime)) |
| 561 | { |
| 562 | if (this->Paths) |
| 563 | { |
| 564 | this->Paths->Delete(); |
| 565 | } |
| 566 | |
| 567 | // Create the list to hold all the paths |
| 568 | this->Paths = vtkAssemblyPaths::New(); |
| 569 | vtkAssemblyPath* path = vtkAssemblyPath::New(); |
| 570 | |
| 571 | // Add ourselves to the path to start things off |
| 572 | path->AddNode(this, this->GetMatrix()); |
| 573 | |
| 574 | // Add the active image |
| 575 | vtkImageSlice* image = this->GetActiveImage(); |
| 576 | |
| 577 | if (image) |
| 578 | { |
| 579 | path->AddNode(image, image->GetMatrix()); |
| 580 | image->BuildPaths(this->Paths, path); |
| 581 | path->DeleteLastNode(); |
| 582 | } |
| 583 | |
| 584 | path->Delete(); |
| 585 | this->PathTime.Modified(); |
| 586 | } |
| 587 | } |
| 588 | |
| 589 | //------------------------------------------------------------------------------ |
| 590 | void vtkImageStack::BuildPaths(vtkAssemblyPaths* paths, vtkAssemblyPath* path) |
no test coverage detected