[vtk-developers] new method for vtkContourRepresentation
Karthik Krishnan
karthik.krishnan at kitware.com
Thu Aug 21 14:33:13 EDT 2008
Dean:
Thanks very much for contributing the two classes. Couple of suggestions.
Dean Inglis wrote:
>
> Hi all,
>
> I’ve been working on a variant of vtkDijkstraGraphGeodesicPath
>
> that works on vtkImageData (uses vtkPixel as the cell for building the
> adjacency list):
>
> not sure what to call it (vtkImageDijkstra ?).
>
I would recommend following the same class hierarchy/naming convention
as in:
vtkGeodesicPath <- vtkImageGeodesicPath <- vtkDijkstraImageGeodesicPath
vtkGeodesicPath <- vtkGraphGeodesicPath <- vtkDijkstraGraphGeodesicPath
I derived vtkGeodesicPath from vtkPolyDataAlgorithm, (I realize now that
I should have subclassed vtkAlgorithm). I think that's ok, the
ImageGeodesicPath would just have to override a few methods to take
vtkImageData as input. It still generates a vtkPolyData as output right ?
>
> I have also subclassed a new vtkContourLineInterpolator for
> vtkContourRepresentation
>
> that maintains the above filter as an ivar and uses it to track edges
> in an interactive
>
> manner similar to what is done with a LiveWire algorithm:
>
> not sure what to call it (vtkDijkstraContourLineInterpolator ?).
>
That name is I would prefer if there is a way to allow an arbitrary
image to be set as input to the vtkDijkstraImageGeodesicPath. This would
allow several variants (I can think of at least 3).
(a) livewire edge-tracker by tracing shortest path on the inverse
gradient magnitude of the image
(b) extract vasculature "interactively" by tracing shortest path on the
Frangi vesselness measure of the image. This was done in [1] although
they used wavefront propagation to solve the minimal cost problem, to
avoid discretization artifacts.
(c) to extract centerlines of objects (such as vasculature)
interactively by tracing the shortest path on the distance-map of the
binary segmentation. This was done in [2] although they use fast
marching to solve the minimum path problem on the distance map, (again
to avoid discretization artefacts).
It would be nice to expose that part, either allowing the user to set
this image or override by subclassing, allowing the user can easily
construct these variants.
> The line interpolator takes the contour rep as a vtkPolyData,
>
> which means that it will sometimes try to interpolate between
>
> many intermediate points between a contour’s nodes. I would like
>
> to add a method to vtkContourRepresentation to recover only the
>
> lines segments between nodes:
>
> void GetNodePolyData( vtkPolyData*);
>
Great. Please add that. Thanks.
>
> wherein the user supplies the polydata.
>
> Currently there is vtkPolyData* GetContourRepresentationAsPolyData();
>
> to recover all line segments between nodes
>
> and intermediate points.
>
> Are there any objections to adding this method? Are there
>
> any suggestions for better class/method names? Is there any
>
> interest in having this interactive edge tracker to contributed to VTK?
>
Yes. It would be very cool and useful to have. Can't wait for it :). Thanks.
BTW: Have you also checked out [3]. Its ITK code, and not a VTK widget,
but uses a gradient based cost function, rather than Dijkstra to find
the shortest path.
[1] Wink, O., Niessen, W.J., Viergever, M.A., 2004. Multiscale vessel
tracking. IEEE Transactions on Medical Imaging 23 (1), 130–133.
[2] Deschamps, T., Cohen, L.D., 2001. Fast extraction of minimal paths
in 3D images and applications to virtual endoscopy. Medical Image
Analysis 5 (4), 281–299.
[3] http://insight-journal.org/midas/handle.php?handle=1926/1372
--
Karthik Krishnan
R & D Engineer,
Kitware Inc,
Ph: 518 371 3971 x119
Fax: 518 371 3971
More information about the vtk-developers
mailing list