[Insight-developers] Connecting ITK and VTK pipelines.

Brad King brad.king@kitware.com
Thu, 18 Oct 2001 14:40:47 -0400 (EDT)


Hello, all:

This morning I checked in two new classes in BasicFilters:

class VTKImageExportBase: public ProcessObject { ... };

template <typename TInputImage>
class VTKImageExport: public VTKImageExportBase { ... };

These classes allow an ITK image pipeline to connect to a VTK pipeline.  
I added functionality to vtkImageImport to allow pipeline updates to
invoke callbacks to collect information from a third-party source.  The
itk::VTKImageExport class provides implementations for these callbacks.
Connecting the pipelines together allows an ITK pipeline that is out of
date to be updated due only to an update of the VTK pipeline.  Once
connected through this pair of classes, the two pipelines function as one.

The advantage of this approach is that neither ITK nor VTK needs to
include headers from the other.  Only an application wishing to connect
the pipelines needs to include both.

There is an example in Insight/Unsupported/vtk called
itkCurvatureFlowToVTK that demonstrates the connection of an ITK
pipeline's output to the beginning of a VTK pipeline that renders the
image.

-Brad