DGtal
0.6.devel
|
This part of the manual describe the interactions between DGTal and InsightToolkit ITK library (http://www.itk.org).
The junction point between DGtal and ITK is implemented via a specific image container: experimental::ImageContainterByITKImage.
For short, if you create an instance of this image type (using StdDefs shortcuts):
Since ImageContainerByITKImage is a model of the CImageContainer concept, all DGtal tools working on valid image containers are also compatible with the ITK container.
In the following example, we use ITK methods and ITK pipeline to process an image within DGtal (simple image thresholding):
Based on this example, we can see that:
Using a similar approach, DGtal methods can be used in a ITK pipeline with the help of a kind of wrapper filter. Indeed, ITK is based on a pipeline with filters connected by SetInput() and GetOutput() methods.
DGtal is not based on the same stream process. Hence, if you would like to use DGtal data and methods in ITK, you will have to create a simple ITK filter satisfying the stream mechanism API and whose internal computation method will instantiate DGtal objects and use DGtal methods.