From Ohm

ITK Pipeline

Medical Processing in ITK is organized as a series of filters, the processing pipeline.

Each filter does a particular job, and sends the processed data to the next stage of the pipeline.

Each filter has inputs and outputs. Configuring the pipeline is done by connecting the inputs of one filter to the output of its predecessor.

Unlike the concept of a linear pipeline which gets fed with data at its head, ITK follows a different approach, a pull-pipeline:

Each filter is derived from the templated base class

itk::ImageToImageFilter< TInputImage, TOutputImage >

N linearily connected filters:

// create filters
ReaderType::Pointer reader = ReaderType::New();
Filter1Type::Pointer filter1 = Filter1Type::New();
Filter2Type::Pointer filter2 = Filter2Type::New();
FilterNType::Pointer filterN = Filter2Type::New();

// connect input of filters to output of predecessors

Pull the pipeline:


Processed data is available as image on:

ImageType::ConstPointer image = filterN->getOutput();

Usually, the last filter is connected the output of an image writer.

Note: Graph must not contain loops.

Retrieved from

Page last modified on December 10, 2013, at 02:15 PM