Skip to content

Add transformation to CostImage DijkstraImageContourLine

The CostImage that is set for the vtkDijkstraContourLineInterpolator is a vtkImageData object. Those objects do not contain specific information about where they live in space. This means that they can only express orthogonal slices. If you are using a vtkContourWidget together with a vtkBoundedPlanePointPlacer in an oblique slice, there is no way you can map the points from the point placer to the CostImage. This in turn means that you can not implement a live-wire contour that uses the Dijkstra shorest path algorithm in non-orthogonal slices. To overcome this, this commit provides the ability to add a transformation (vtkMatrix4x4) to the vtkDijkstraContourLineInterpolator. This transformation is intended to express the mapping between the oblique slice that the point placer is working on and the CostImage that the vtkDijkstraContourLineInterpolator holds. This allows you to use the Dijkstra shortest path algorithm in any plane.

Merge request reports