NA-MIC National Alliance for Medical Image Computing IGT Software Design and Process Bill Lorensen GE Research
National Alliance for Medical Image Computing Outline Background Design Principles Software Process Challenges
National Alliance for Medical Image Computing Open Source Menu for Success A Community with a common vision A pool of talented and motivated developers/scientists A mix of academic and commercial An organized, light weight approach to software development A leadership structure Communication A business model
National Alliance for Medical Image Computing Guiding Principles Open is good Proprietary is bad Reuse is good NIH * is bad Modularity is good Monolithic is bad *Not invented here
NA-MIC National Alliance for Medical Image Computing Design Principles
National Alliance for Medical Image Computing Toolkits and Libraries Visualization - VTK Segmentation/Registration - ITK State machines – IGSTK UI – KWWidgets, ?? Tracking – OpenTracker, ?? DICOM – dcmtk, gdcm File I/O – nrrd, meta, pnglib, …
National Alliance for Medical Image Computing Object-Oriented Design Dominated software systems throughout the 1990’s Continues to be the accepted software design technique Particularly useful for dealing with complexity Provides programmatic abstractions to deal with generalization and encapsulation C++ and Java have mechanisms to support OOD
National Alliance for Medical Image Computing Generic Programming Organize libraries consisting of generic—or reusable—software components. The essential ideas of generic programming are containers to hold data, iterators to access the data, and generic algorithms that use containers and iterators to create efficient, fundamental algorithms. ITK uses generic programming to process n-dimensional “images”.
National Alliance for Medical Image Computing Design Patterns Good object-oriented software systems have recurring designs (patterns) that occur frequently ITK employs a number of powerful design patterns –object factories –command/observer –smart pointer memory management
National Alliance for Medical Image Computing Frameworks Define how a group of participants can be put together to solve a particular task. Particularly suitable for describing complex flows or algorithms that have a number of steps that can be varied ITK Frameworks –A demand-driven data processing pipeline that connects algorithms to process n- dimensional image data –Registration framework –Level-set framework
National Alliance for Medical Image Computing Separation of Algorithms from Interfaces Implement the algorithms with a clear separation from the applications and especially the user interfaces. Uses the Command/Observer design pattern that permits applications to watch for significant events during the execution of an algorithm ITK has no built-in visualization, but has been interfaced to several systems including 3D Slicer, Analyze, SciRun and Volview.
National Alliance for Medical Image Computing Slicer 3 Execution Model: Goals Provide interface to batch programs –Simplify and unify command line processing Auto generate C++ command line processing –Simplify and unify GUI Auto generate GUI
National Alliance for Medical Image Computing User Desktop Slicer 3.0 AlgorithmsITKVTK Slicer Modules VTK Apps Using ITK Scripts of Slicer Mods Batch Programs Non-NAMIC Cmd tools LONI Pipeline Birn Grid Data/Compute Slicer 3.0
National Alliance for Medical Image Computing Execution Model: Plugins XML Interface Description –Describes command line options –Describes suggestions for GUI GenerateCLP –Generates C++ command line processing code from XML –Reports XML description
National Alliance for Medical Image Computing Program Flow User Desktop prog.xmlGenerateCLPprogCLP.h Slicer Modules prog.cxx Non-NAMIC Cmd tools LONI Pipeline Birn Grid Data/Compute Slicer 3.0
National Alliance for Medical Image Computing Resample --xml filtering Resample Volume Resamples a volume 1.0 Bill Lorensen Resampling Parameters Parameters used for resampling outputPixelSpacing -s --spacing Spacing along each dimension (0 means use input spacing) Spacing 0,0,0 IO Input/output parameters InputVolume input Volume input 0 Input volume to be resampled OutputVolume output 1 Resampled Volume
National Alliance for Medical Image Computing Resample.cxx. #include “ResampleCLP.h” Main (int argc, char *argv[]) { PARSE_ARGS; algorithm code }
National Alliance for Medical Image Computing Resample --help USAGE: ResampleVolume [--xml] [--echo] [-s >] [--] [--version] [-h] Where: --xml Produce xml description of command line arguments (default: 0) --echo Echo the command line arguments (default: 0) -s >, --spacing > Spacing along each dimension (0 means use input spacing) (default: 0,0,0) --, --ignore_rest Ignores the rest of the labeled arguments following this flag. --version Displays version information and exits. -h, --help Displays usage information and exits. (required) Input volume to be resampled (default: None) (required) Resampled Volume (default: None) Resamples a volume
NA-MIC National Alliance for Medical Image Computing Software Process
National Alliance for Medical Image Computing NA-MIC Rhythms Yearly All-Hands Meeting Bi-annual Programmers’ Week Weekly Engineering T-Cons Nightly Build/Test –ITK –VTK –Slicer
National Alliance for Medical Image Computing NA-MIC Tools CMake –Cross-platform build Dart 2 –Build/Test server CTest –Build/Test client Cpack –Packaging and Distribution Media Wiki –Reporting/discussion forum POTS –T-cons
National Alliance for Medical Image Computing How DART Enables Collaboration CVS SVN Results posted on web (the dashboard) CVS/SVN maintains source code revisions DART compiles source code, runs tests Developers review results Developers check-in code
National Alliance for Medical Image Computing Dart
National Alliance for Medical Image Computing
Multi-Platform Builds
National Alliance for Medical Image Computing IGT Challenges Define an architecture tailored to IGT requirements Leverage existing toolkits Fill in toolkit gaps
NA-MIC National Alliance for Medical Image Computing IGT Software Design and Process Bill Lorensen GE Research