The following sections summarize the technical features of NLM's Insight Toolkit (ITK):

The following are key features of the toolkit design philosophy.
  • The toolkit provides data representation and algorithms for performing segmentation and registration. The focus is on medical applications; although the toolkit is capable of processing other data types.
  • The toolkit provides data representations in general form for images (arbitrary dimension) and (unstructured) meshes.
  • The toolkit does not address visualization or graphical user interface. These are left to other toolkits (such as VTK, VisPack, 3DViewnix, Slicer, etc.)
  • Multi-threaded (shared memory) parallel processing is supported.
  • The development of the toolkit is based on principles of extreme programming. That is, design, implementation, and testing is performed in a rapid, iterative process. Testing forms the core of this process. In Insight, testing is performed continuously as files are checked in, and every night across multiple platforms and compilers. The ITK testing dashboard, where testing results are posted, is central to this process.

The following are key features of the toolkit architecture.
  • The toolkit is organized around a data-flow architecture. That is, data is represented using data objects which are in turn processed by process objects (filters). Data objects and process objects are connected together into pipelines. Pipelines are capable of processing the data in pieces according to a user-specified memory limit set on the pipeline.
  • Object factories are used to instantiate objects. Factories allow run-time extension of the system.
  • A command/observer design pattern is used for event processing.

The following are key features of the toolkit implementation philosophy.
  • The toolkit is implemented using generic programming principles. Such heavily templated C++ code challenges many compilers; hence development was carried out with the latest versions of the MSVC, Sun, gcc, Intel, and SGI compilers.
  • The toolkit is cross-platform (Unix, Windows and MacOSX).
  • The toolkit supports multiple language bindings, including such languages as Tcl, Python, and Java. These bindings are generated automatically using an auto-wrap process. CableSwig the tool we use for wrapping the code.
  • The memory model depends on "smart pointers" that maintain a reference count to objects. Smart pointers can be allocated on the stack, and when scope is exited, the smart pointers disappear and decrement their reference count to the object that they refer to.

ITK uses the CMake (cross-platform make) build environment. CMake is an operating system and compiler independent build process that produces native build files appropriate to the OS and compiler that it is run with. On Unix CMake produces makefiles and on Windows CMake generates projects and workspaces.


ITK supports an extensive testing environment. The code is tested daily (and even continuously) on many hardware/operating system/compiler combinations and the results are posted daily on the ITK testing dashboard. We use CDash to manage the testing process, and to post the results to the dashboard.



ITK uses many advanced design patterns and generic programming. You may find these references useful in understanding the design and syntax of Insight.
  • Design Patterns. by Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides, Grady Booch
  • Generic Programming and the Stl : Using and Extending the C++ Standard Template Library (Addison-Wesley Professional Computing Series) by Matthew H. Austern
  • Advanced C++ Programming Styles and Idioms by James O. Coplien
  • C/C++ Users Journal
  • C++ Report