{"version":1,"kind":"Article","sha256":"","slug":"786","location":"","dependencies":[],"doi":"10.54294/zc4tnl","thumbnail":"https://pub.desci.com/ipfs/bafkreib55yxoc3oxuk6p2gocsw6wo7vak5nigomzljiavlibndlws537cq","frontmatter":{"title":"Using the strategy pattern to simplify ITK","abstract":"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.","license":"You are licensing your work to Kitware Inc. under the\nCreative Commons Attribution License Version 3.0.\n\nKitware Inc. agrees to the following:\n\nKitware is free\n * to copy, distribute, display, and perform the work\n * to make derivative works\n * to make commercial use of the work\n\nUnder the following conditions:\n\\\"by Attribution\\\" - Kitware must attribute the work in the manner specified by the author or licensor.\n\n * For any reuse or distribution, they must make clear to others the license terms of this work.\n * Any of these conditions can be waived if they get permission from the copyright holder.\n\nYour fair use and other rights are in no way affected by the above.\n\nThis is a human-readable summary of the Legal Code (the full license) available at\nhttp://creativecommons.org/licenses/by/3.0/legalcode","keywords":["ITK","SimpleITK","strategy","pattern"],"authors":[{"name":"Mueller, Dan","email":"dan.muel@gmail.com","affiliations":["Philips Healthcare"],"corresponding":true}],"date_submitted":"2011-01-06 00:21:36","external_publication_id":786,"revision_cids":["bafkreidozqwp6tveptnkbbjfnczzxu5vux2bwbbrjknmehlrq3nnegnb3q"],"github":"https://github.com/midas-journal/midas-journal-786.git","thumbnail":"https://pub.desci.com/ipfs/bafkreib55yxoc3oxuk6p2gocsw6wo7vak5nigomzljiavlibndlws537cq"},"mdast":{"type":"root"},"downloads":[{"url":"https://ipfs.desci.com/ipfs/bafkreicc3t6k3yvbvda32tqb7gufcveh2rik7u34gsg4qm2ejheymphhey","title":"root/insight-journal-metadata.json","filename":"insight-journal-metadata.json","extra":{"size_bytes":3248,"type":"file"}},{"url":"https://pub.desci.com/ipfs/bafkreibgvtkglgcljxq656x5v363u3nz7yihjkzfg5gzcpp5kbgh52lyju","title":"root/code/CMakeLists.txt","filename":"CMakeLists.txt","extra":{"size_bytes":621,"type":"file"}},{"url":"https://pub.desci.com/ipfs/bafkreif6e6suim4ynvm7adwvltbpa6hw57bowhoskkbaxxiqust24dskey","title":"root/code/Testing/CMakeLists.txt","filename":"CMakeLists.txt","extra":{"size_bytes":13084,"type":"file"}},{"url":"https://pub.desci.com/ipfs/bafkreib7jlxh3ik5d5oih44zyqv42gd2vdihbxym2ba75shfukyv7ib5ie","title":"root/code/Testing/StrategyTest01.cxx","filename":"StrategyTest01.cxx","extra":{"size_bytes":13599,"type":"file"}},{"url":"https://pub.desci.com/ipfs/bafkreie5joxfns3pu2d5i3niw34qegurlipflmzs5tw5vgozex7h2nrspa","title":"root/code/Testing/StrategyTest02.cxx","filename":"StrategyTest02.cxx","extra":{"size_bytes":11344,"type":"file"}},{"url":"https://pub.desci.com/ipfs/bafkreif4uukoqryitzlqmxe7eonmmpydt5rmyddn7aiz5aqd5n7abambhu","title":"root/code/Testing/StrategyTest03.cxx","filename":"StrategyTest03.cxx","extra":{"size_bytes":11089,"type":"file"}},{"url":"https://pub.desci.com/ipfs/bafkreiauxqun3kpsaju6eijqajjxxaufrhqlv6p6kodrbt3kss6zdrzczu","title":"root/code/Testing/StrategyTest04.cxx","filename":"StrategyTest04.cxx","extra":{"size_bytes":11092,"type":"file"}},{"url":"https://pub.desci.com/ipfs/bafkreibg7rd6ceu2jomko2ujpaaxl2k7zxl6m6etw2flg732q5nkhracri","title":"root/code/Source/CMakeLists.txt","filename":"CMakeLists.txt","extra":{"size_bytes":596,"type":"file"}},{"url":"https://pub.desci.com/ipfs/bafkreicftcvr65xy6gmhqs3rwh2y2msepneh3n3vmanbfynszxr4gezbp4","title":"root/code/Source/itkSimpleBinaryPixelMathImageFilter.h","filename":"itkSimpleBinaryPixelMathImageFilter.h","extra":{"size_bytes":11744,"type":"file"}},{"url":"https://pub.desci.com/ipfs/bafkreichumi2qjimzquptccwvczyrezwqoctgw4seyylozg2tmio6r5tcy","title":"root/code/Source/itkSimpleDistanceMapImageFilter.h","filename":"itkSimpleDistanceMapImageFilter.h","extra":{"size_bytes":12503,"type":"file"}},{"url":"https://pub.desci.com/ipfs/bafkreidsmvxnsb7nlk2fuacn6nf5ya6vhgg7whudmbimgc4lqbe3we2kce","title":"root/code/Source/itkSimpleGradientImageFilter.h","filename":"itkSimpleGradientImageFilter.h","extra":{"size_bytes":6884,"type":"file"}},{"url":"https://pub.desci.com/ipfs/bafkreicxhw2jy2pexuekfvokftibd6vv2ghtp4rzdrhqi54jzd2uzekymi","title":"root/code/Source/itkSimpleGradientMagnitudeImageFilter.h","filename":"itkSimpleGradientMagnitudeImageFilter.h","extra":{"size_bytes":9868,"type":"file"}},{"url":"https://pub.desci.com/ipfs/bafkreicsr4n3kv46xkimuvah56aukcqtlq2qkghwlydugrznzxhd3jg3fa","title":"root/code/Source/itkSimpleImageToImageMetric.h","filename":"itkSimpleImageToImageMetric.h","extra":{"size_bytes":25392,"type":"file"}},{"url":"https://pub.desci.com/ipfs/bafkreibak43eo4qmh3vp5xx3gkum64nwz7ritd6behkp3xhgotemvjybli","title":"root/code/Source/itkSimpleInterpolateImageFunction.h","filename":"itkSimpleInterpolateImageFunction.h","extra":{"size_bytes":13694,"type":"file"}},{"url":"https://pub.desci.com/ipfs/bafkreiecfdx4546bozfymhj5ekwlfoxk6dbfdankigkvecou3y6fsm3pym","title":"root/code/Source/itkSimpleMorphologyImageFilter.h","filename":"itkSimpleMorphologyImageFilter.h","extra":{"size_bytes":41095,"type":"file"}},{"url":"https://pub.desci.com/ipfs/bafkreideulehioffbmbbzrvzjwihb2b72sem6wtspwm75zvrir3y6r6vri","title":"root/code/Source/itkSimpleOptimizer.h","filename":"itkSimpleOptimizer.h","extra":{"size_bytes":23799,"type":"file"}},{"url":"https://pub.desci.com/ipfs/bafkreiffmclfohvjhr2slwj4ypi5oljomksyugqzeehxz3pbkg5j6jipou","title":"root/code/Source/itkSimpleProjectionImageFilter.h","filename":"itkSimpleProjectionImageFilter.h","extra":{"size_bytes":11909,"type":"file"}},{"url":"https://pub.desci.com/ipfs/bafkreiasokkhpshudu477uzuz3ehvzrqmc2jivnyf4sme5mwifi2xzcali","title":"root/code/Source/itkSimpleSmoothImageFilter.h","filename":"itkSimpleSmoothImageFilter.h","extra":{"size_bytes":11391,"type":"file"}},{"url":"https://pub.desci.com/ipfs/bafkreignh4yhoh3pwikziqiooryx4qjqwatrowqrqco5mzgv5qjd3sfl4a","title":"root/code/Source/itkSimpleThresholdImageFilter.h","filename":"itkSimpleThresholdImageFilter.h","extra":{"size_bytes":16363,"type":"file"}},{"url":"https://pub.desci.com/ipfs/bafkreidx2w727sqm75qugkujekmh3sjklsfzp2uecl4xum5o7inglvdke4","title":"root/code/Source/itkSimpleTransform.h","filename":"itkSimpleTransform.h","extra":{"size_bytes":17986,"type":"file"}},{"url":"https://pub.desci.com/ipfs/bafkreifjbjdsff7w3nrdujstv2oolvddccgkdixp3eceufvx6mwonmo6v4","title":"root/code/Source/itkSimpleUnaryPixelMathImageFilter.h","filename":"itkSimpleUnaryPixelMathImageFilter.h","extra":{"size_bytes":12281,"type":"file"}},{"url":"https://pub.desci.com/ipfs/bafkreidcuvighhaxs3dhzj5fsivxplacqqeozf7xc5nwv7usymylggnrti","title":"root/code/Source/itkStrategyCommand.h","filename":"itkStrategyCommand.h","extra":{"size_bytes":2455,"type":"file"}},{"url":"https://pub.desci.com/ipfs/bafkreiccufmplxexcvtioorvhqqu4auylrgfckgibgd3pdmig6mop4i5wu","title":"root/code/Source/itkStrategyFactory.h","filename":"itkStrategyFactory.h","extra":{"size_bytes":5680,"type":"file"}},{"url":"https://pub.desci.com/ipfs/bafkreicde7ev3nk27cboy6abqsjcpzvrs32ceyc5jhel7p6ejfym2myqly","title":"root/code/Source/itkStrategyFactory.txx","filename":"itkStrategyFactory.txx","extra":{"size_bytes":3207,"type":"file"}},{"url":"https://pub.desci.com/ipfs/bafkreiftvb5yq5szm72zly6tyza7c5sxik2ugp4kks2px7fjr6qsnstlom","title":"root/code/Source/itkTransform.h","filename":"itkTransform.h","extra":{"size_bytes":11546,"type":"file"}},{"url":"https://pub.desci.com/ipfs/bafkreibi5x5fchqtgldxs6q5cfjwtk7gadu5wil4t5csurv4qdz3cfsmoe","title":"root/code/Source/itkTransform.txx","filename":"itkTransform.txx","extra":{"size_bytes":2705,"type":"file"}},{"url":"https://pub.desci.com/ipfs/bafkreigtwuyksm7xlhh2vdd4eys5dldzgcbhl62frjnq7frb732wo76uxm","title":"root/code/Source/main.cxx","filename":"main.cxx","extra":{"size_bytes":3840,"type":"file"}},{"url":"https://pub.desci.com/ipfs/bafkreihshmjsfrysjbqxgqn3igzrfrqmeixlmxc5a3pz2gqjholoixq5xe","title":"root/code/Data/BrainProtonDensitySlice.png","filename":"BrainProtonDensitySlice.png","extra":{"size_bytes":34597,"type":"file"}},{"url":"https://pub.desci.com/ipfs/bafkreigdp2or4aonntsm5suph6pnz5aox6czjpvf2f6w3hb4zjoziqtvkq","title":"root/code/Data/Spots.png","filename":"Spots.png","extra":{"size_bytes":2434,"type":"file"}},{"url":"https://pub.desci.com/ipfs/bafkreife5osxxssq2egqism34pqnr7lgjko6wfhnlr6j25w7gek55rsl6y","title":"root/code/Data/closerec1.jpg","filename":"closerec1.jpg","extra":{"size_bytes":14180,"type":"file"}},{"url":"https://pub.desci.com/ipfs/bafkreifazi2on32eqj4hxu6hxvmn3pf6ru4zswfwiwvfa77s5ljz3fzroq","title":"root/code/Data/cthead1.mha","filename":"cthead1.mha","extra":{"size_bytes":49192,"type":"file"}},{"url":"https://pub.desci.com/ipfs/bafkreif7ogpfh5sse4knvbgoxoaan6gqqd4yhlu32dndk4qoqiy4apxdxe","title":"root/code/Data/cthead1.png","filename":"cthead1.png","extra":{"size_bytes":28956,"type":"file"}},{"url":"https://pub.desci.com/ipfs/bafybeihjuhx4noj3pvgkatmz6vstfaim6mn2ilp2qy5zcpr3wdowwyfsza","title":"root/code/Data/engine.mha","filename":"engine.mha","extra":{"size_bytes":3170538,"type":"file"}},{"url":"https://dweb.link/ipfs/bafkreia7agnmcxr725q2xlhy6mjr54dd7r2k3it7h7ldeawi4ngf5zyjci","title":"root/article.pdf","filename":"article.pdf","extra":{"size_bytes":104849,"type":"file"}}],"references":{"cite":{"order":["ref1"]},"data":{"ref1":{"label":"ref1","enumerator":"1","html":"Elements of Reusable Object-Oriented Software+Addison-Wesley+1977+1+4+Erich Gamma"}}}}