Sie sind auf Seite 1von 394

IGSTK: The Book

For release 4.2

Edited by Kevin Cleary, Patrick Cheng, Andinet Enquobahrie, and Ziv Yaniv

c 2009 Insight Software Consortium All rights reserved. No part of this book may be

c 2009 Insight Software Consortium

All rights reserved. No part of this book may be reproduced, in any form or by any means, without the express written consent of the copyright holders. An electronic version of this document is available from http://www.igstk.org and may be used under the provisions of the IGSTK copyright found at http://www.igstk.org/copyright.htm

Contributors to this project include those listed on the cover page as well as:

Cover design: Dave Klemm, Educational Media, Georgetown University Editor: Cynthia Kroger Logo design: Julien Jomier

Printed by: Signature Book Printing, Gaithersburg, Maryland. http://www.signature-book.com

IGSTK: The Book

Edited by Kevin Cleary Patrick Cheng Andinet Enquobahrie Ziv Yaniv

Friday 29 th May, 2009

Email: igstk-users@public.kitware.com

”Progress is the life-style of man.” - Victor Hugo, Les Mis´erables

”Progress is the life-style of man.”

- Victor Hugo, Les Mis´erables

About the Covers

The front and back covers show several images from the project.

The front cover shows the following.

Top left. State diagram for the spatial object component.

Top right. Lung biopsy clinical trial using IGSTK at Georgetown University Hos- pital. The attending physician is Filip Banovac, MD

Bottom right. Architecture diagram showing tracker, spatial objects, spatial object representation, and viewers.

The back cover shows the four quadrant display and image reslicing from the Navigator ex- ample application.

Abstract

The Image-Guided Surgery Toolkit (IGSTK) is an open-source C++ software library that pro- vides the basic components needed to develop image-guided surgery applications. The focus of the toolkit is on robustness using a state machine architecture.

IGSTK is implemented in C++. It is cross-platform, using a build environment known as CMake to manage the compilation process in a platform-independent way.

Because IGSTK is an open-source project, developers from around the world can use, debug, maintain, and extend the software. IGSTK uses a model of software development referred to as Extreme Programming. Extreme Programming collapses the usual software creation methodol- ogy into a simultaneous and iterative process of design-implement-test-release. The key features of Extreme Programming are communication and testing. Communication among the members of the IGSTK community is what helps manage the rapid evolution of the software. Testing is what keeps the software stable. In IGSTK, an extensive testing process (using a system known as CDash) is in place that measures the quality on a daily basis. The IGSTK Testing Dashboard is posted continuously, reflecting the quality of the software at any moment.

This book is a guide to using IGSTK and developing image-guided surgery applications with IGSTK.

Contributors

The Image-Guided Surgery Toolkit (IGSTK) has been created by the efforts of many individuals and organizations.

This book lists a few of these contributors in the following paragraphs. Not all contributors are credited here, so please check the CVS source logs for code contributions.

The following is a brief description of the contributors to this software guide.

Kevin Cleary is an Associate Professor in the Department of Radiology’s Imaging Science and Information Systems Center at Georgetown University Medical Center. His research focuses on image-guided surgery and medical robotics. He is the IGSTK principal investigator and manages the project. Contact him at cleary@georgetown.edu.

Patrick Cheng is a Software Engineer in the Imaging Science and Information Systems Cen- ter at Georgetown University. His research interests include medical imaging, image-guided surgery, and open source software development. He is one of the main developers of IGSTK and his major contribution is developing applications based on IGSTK.

Andinet Enquobahrie is a Research and Development Engineer at Kitware Inc. Dr. En- quobahrie has an extensive experience in development of image visualization and analysis tools for computer aided diagnosis and image-guided intervention applications. He has been actively developing various components of the IGSTK toolkit since joining Kitware in 2005. Currently, he is a project lead coordinating various aspects of the IGSTK project at Kitware.

Ziv Yaniv is an Assistant Professor in the Department of Radiology, Georgetown University, where he conducts research in image-guided interventions. He obtained his PhD in computer science from The Hebrew University of Jerusalem, Jerusalem Israel, in 2004. From 2004 to 2006 he was a postdoctoral fellow at Georgetown University. His main areas of interest are image-guided interventions, medical image analysis, and computer vision. Dr. Yaniv is a mem- ber of IEEE Engineering in Medicine and Biology and IEEE Computer societies.

Stephen Aylward is Chief Medical Scientist at Kitware, Inc. Prior to joining Kitware, Stephen was a tenured Associate Professor of Radiology and director of the Computer-Aided Diagnosis

and Display Laboratory at UNC. Dr. Aylward’s research has recently focused on developing model-to-image registration strategies for image-guided surgery, vascular network segmenta- tion for disease diagnosis, and digital library technologies such as the Insight Journal and MI- DAS.

M. Brian Blake is a Professor of Computer Science at the University of Notre Dame. His research focuses on service-oriented computing, component-based software engineering, and workflow modeling. He was the main contributor for the requirements development for IGSTK.

Kevin Gary is an Assistant Professor in the Division of Computing Studies at Arizona State University’s Polytechnic Campus. His interests are in teaching and applied research in Software Engineering, particularly distributed and web-based software architectures. Prior to academia, he worked in industry on open source solutions for eLearning.

David Gobbi is an expert in medical image analysis and visualization. He received a Ph.D. in Medical Biophysics from the University of Western Ontario, and is the original contributor of the Tracker component of IGSTK.

¨

Ozg ur¨ G uler¨

is a computer scientist working as a research assistant at the Medical University

Innsbruck, Austria. His research focuses on image-based diagnosis and therapy, visualization

of medical imagery, image-guided navigation, and surgery. He is currently undertaking a PhD, researching novel paradigms for quality assurance in 3D-Navigation.

Luis Iba´ nez˜ is a Senior Research Engineer at Kitware Inc. He is one of the main developers and maintainers of the NLM’s Insight Toolkit ITK. His main interests are medical image analysis and open source software as a mechanism for technology dissemination. He is also an advocate of open access publishing. He is one of the main contributors to the architectural design of IGSTK.

Julien Jomier is a Research and Development Engineer at Kitware Inc. He is a developer of the Insight Toolkit and also the main contributor of the Spatial Objects and the Spatial Object Viewer toolkit. His main areas of research include image-guided surgery and multi-modality data fusion as well as computer-aided diagnosis.

Hee-su Kim currently works for a game development company in South Korea. He was a graduate student in the Department of Computer Science at Kyungpook National University in Korea. He has interests in computer graphics, medical imaging, and related computer science fields.

Frank Lindseth is a research scientist at SINTEF Medical Technology and have been working within the national center for 3D ultrasound in surgery (Trondheim, Norway) since 1995 when the center was established. He has been working with application development based on IGSTK (CustusX), integrating real-time imaging in the toolkit (the VideoImager component) and con- tributing to the IGSTK design discussions (e.g. SurgicalSceenGraph and ImageReslice).

Sebastian Ordas is a biomedical engineer at IDEUNO, Argentina. His research focuses on image-guided surgery and medical image analysis. His main contributions to IGSTK are the image reslicing component and application examples.

Junichi Tokuda Junichi Tokuda is a research fellow of Radiology, Brigham and Women’s Hos-

pital and Harvard Medical School. His research interests include computer assisted intervention especially hardware and software integration for image-guided therapy. He is one of the original developers of the OpenIGTLink protocol.

Matt Turek is a R&D Engineer at Kitware Inc. Dr. Turek has extensive academic and industry experience in developing medical applications. He has been involved in the IGSTK project since joining Kitware in 2007. His key contributions are coordinate system and events architecture.

Hui Zhang is an imaging research engineer at Accuray Inc. He previously worked at the Imag- ing Science and Information Systems Center at Georgetown University. His research focuses on image-guided surgery, image registration, treatment planning, and visualization.

Funding Sources

IGSTK Phase I and II (STTR) was funded by NIBIB/NIH (Georgetown-Kitware) Grant

R42EB000374.

The current IGSTK work is funded by NIBIB/NIH grant R01EB00719 under program officer Zohara Cohen, PhD.

Additional support was provided by U.S. Army grant W81XWH-04-1-007, administered by the Telemedicine and Advanced Technology Research Center (TATRC), Fort Detrick, Maryland. The content of this manuscript does not necessarily reflect the position or policy of the U.S. Government.

¨

Ozg¨ur G¨uler’s work on the VideoImager component was funded by the Austrian Science

Foundation (Project 20604-B13).

Partial funding support for OpenIGTLink was provided by the following NIH grants 5U41RR019703, 5P01CA067165, 1R01CA111288, and 1R01CA124377, in addition to the Intelligent Surgical Instruments Project of METI(Japan).

CONTENTS

I Getting Started

 

1

1 Introduction

 

3

1.1

Rationale and Background

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

4

1.2

Software Organization

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

5

1.2.1 Obtaining the Software

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

5

1.2.2 Downloading the Stable Releases .

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

6

1.2.3 Downloading the Development Release

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

6

1.2.4 Directory Structure

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

6

1.2.5 Documentation

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

7

1.2.6 Data

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

7

1.2.7

Join the Mailing List

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

7

2 Installation

 

9

2.1 Prerequisite .

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

9

 

2.1.1 Third-Party Libraries

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

9

2.1.2 Build Tool .

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

10

2.1.3 Caveat: Versions

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

10

2.2 Prepare for Installation

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

11

 

2.2.1 Download and Install CMake .

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

11

2.2.2 Download and Install ITK, VTK, and FLTK .

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

12

2.2.3 Caveat: Build Options

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

12

xiv

Contents

 

2.3 Configuring IGSTK

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

13

2.4 Hello World

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

15

3 Software Development Process

 

23

 

3.1 IGSTK Best Practices

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

23

3.2 Developer Practices

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

25

3.2.1 Code Conventions

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

25

3.2.2 Code Reviews .

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

26

3.2.3 Managed Communication

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

27

3.2.4 Source Code Control

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

27

3.2.5 Build and Release Management Processes

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

30

3.2.6 Continuous Testing using CDash

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

31

Software Quality Statistics

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

31

IGSTK Approach

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

33

3.3 Agile Methods and Refactoring

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

36

3.4 Conclusion

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

37

4 Requirements

 

39

 

4.1 What is an IGSTK Requirement?

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

39

4.2 Lightweight Requirements Management Process

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

40

4.2.1 Defined Requirements Management Process

 

.

.

.

.

.

.

.

.

.

.

.

.

.

40

4.2.2 Managing Concurrent Change in Requirements and Code

 

.

.

.

.

.

.

.

42

4.3 Conceptualizing Application Requirements through Activity Modeling

.

.

.

.

.

.

.

.

.

.

44

4.4 Accessing and Contributing to IGSTK Requirements

 

.

.

.

.

.

.

.

.

.

.

.

.

.

45

II

Framework Design

 

47

5

Architecture

49

5.1 General Background

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

49

5.2 Medical Errors

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

51

5.3 Layered Architecture

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

52

5.4 The Main Components .

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

53

5.4.1 Display

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

55

5.4.2 Geometric Representation

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

56

Contents

xv

 

5.4.3

Visual Representation .

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

58

5.4.4 .

Tracking .

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

59

5.4.5 Data Sources

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

60

5.4.6

Calibration and Registration

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

61

5.4.7 Infrastructure

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

61

5.4.8 Services

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

62

 

5.5

Timing

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

63

 

5.5.1 Timing Collaborations

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

64

5.5.2 Pulse Generator Implementation

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

68

 

5.6

Conclusion

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

68

6

State Machine