The Insight Journal logo
Home

Using the strategy pattern to simplify ITK

Mueller, Dan
Philips Healthcare
Publication cover image

Please use this identifier to cite or link to this publication: http://hdl.handle.net/10380/3248
New: Prefer using the following doi: https://doi.org/10.54294/zc4tnl
Published in The Insight Journal - 2011 January-June.
Submitted by Dan Mueller on 2011-01-06 00:21:36.

ITK is becoming increasingly complex as it continues to grow and evolve. The SimpleITK initiative aims to address this concern by providing an easy-access layer around ITK for non-C++ expert developers. This article proposes an alternate (perhaps complementary) approach utilizing the strategy pattern. The software design pattern known as "strategy" allows an algorithm to be selected from a family of algorithms on-the-fly at runtime. Because ITK consists of many such algorithm families, this particular design pattern is quite interesting. This article describes a number of algorithm families which have been identified; so far thirteen families have been implemented, encapsulating nearly 130 filters/objects. Complete source code and examples are provided to demonstrate the concept.