Presentation is loading. Please wait.

Presentation is loading. Please wait.

Office of High Performance Computing and Communication,

Similar presentations


Presentation on theme: "Office of High Performance Computing and Communication,"— Presentation transcript:

1 Office of High Performance Computing and Communication,
Open Source Software Development for Medical Image Analysis and Computer Assisted Surgery Ziv Yaniv, Ph.D., Office of High Performance Computing and Communication, National Library of Medicine, National Institutes of Health and TAJ Technologies Inc. Last Modified October 2017

2 RED == Pay Attention

3 Open Source Software Merriam-Webster online dictionary:
1. of software :having the source code freely available for possible modification and redistribution 2. of, relating to, or promoting open-source software the open-source movement/community Open source does not necessarily mean that the software does not cost money (more often than not there is no purchase cost). “Linux is only free if your time has no value” J. Zawinski (netscape fame) in a 1998 interview

4 Open Source Random Examples
Operating Systems: Linux, Android, FreeBSD, OpenBSD… Software development: Eclipse IDE, GCC, Python, R, CMake, emacs, git… Machine learning/AI: TensorFlow, Caffe, Torch… Medicine – ITK, SimpleITK, MITK, ITK-SNAP, IGSTK, 3D Slicer… The web: Apache web server, MySQL, PHP… Document creation: TexStudio, Apache OpenOffice... Entertainment: VLC media player, GIMP, Blender…

5 Some Notable Moments 1970s – Unix from AT&T for academic and government use, but later closed – Richard Stallman creates the GNU project and founds the Free Software Foundation – Linus Torvalds, first release of Linux kernel – FreeBSD and NetBSD released – Eric Raymond publishes ”The Cathedral and the Bazaar” 1998 – Eric Raymond et al. create the Open Source Initiative. Late 1990’s – Apache web server ascension. 2000’s – Linux ascension as server OS. Release of Android OS. 2010s - Open source projects become common, including from large corporations (Google, Amazon, Microsoft, Facebook…)

6 Be Clear: use a license Two major organizations dealing with open source licensing: Open Source Initiative Free Software Foundation [sponsers the GNU project, Founded by Richard Stallman (MIT, 1983)] GNU's Not Unix! approves “open source” licenses approves “free software” licenses

7 FSF Definition of Free Software
Free to run, anyone and for any purpose. Free to study and modify the source code. Free to redistribute in both source and binary form. Free to distribute your modifications in source and binary form. GNU Public License (GPL): “Share Alike” requirement: All derivatives of the work must be licensed under the same license as the original or a license compatible with it.

8 OSI Definition of Open Source
License must allow redistribution as part of an aggregate software distribution. Program must include source code and allow redistribution both in source and binary form. License must allow modifications of source and allow its distribution under same terms as original license. License may restrict modifications of original code but allow distribution of "patch files" that modify the program at build time. No Discrimination Against Persons or Groups

9 OSI Definition of Open Source
No Discrimination Against Fields of Endeavor The rights attached to the program must apply to all to whom the program is redistributed without the need for execution of an additional license by those parties. License Must Not Be Specific to a Product License Must Not Restrict Other Software License Must Be Technology-Neutral Promote a variety of licenses including GPL, and many less restrictive ones that only require attribution ( e.g. Apache License 2.0).

10 If it’s Not Software (use a copyright license)
Web application for selecting the appropriate license: By Creative Commons - Public Domain,

11 Why Would You Participate individual
Intrinsic: fun and enjoyment of creative process. be part of a community. make the world a better place. Extrinsic: paid to do it as part of your job (lucky you). improve professional skills. add features you personally need. improve future employment prospects. required for reproducible research. potentially increase citations/popularity of your research. J. Feller et al., “Perspectives on Free and Open Source Software”, MIT Press, 2005.

12 Why Would You Participate commercial entities
Financial benefits (Andersen-Gott et al.): selling complimentary services. building greater innovative capability. cost reduction, outsourcing to the community. Company perceived as good citizen, socially responsible. Attract talent. Increased productivity of new employees (already familiar with code base). There are many reasons for commercial companies not to participate in open source. Are there nefarious reasons for participating in open source? M. Andersen-Gott et al., “Why do commercial companies contribute to open source software?”, International Journal of Information Management 32: , 2012.

13 Where’s the Party Main arena for open source projects in 2017:
Other hosting services where you will find open source projects include: Bitbucket GitLab Only clone/fork from reputable repositories.

14 Social Aspects of OSS Distributed development Cultural differences
K. Coar, “The Sun Never Sets on Distributed Development”, ACM Queue, vol. 1(9):33-39, 2004. Cultural differences Efraim Diveroli: “Don’t worry, I have to go first, I'm American.” War Dogs (2016). Which natural Languages? Luckily for us English is the lingua franca. Which English (color/colour, center/centre). Community based decision making. One person, one vote? Meritocracy vs. Democracy. Core developers are first among equals.

15 Social Aspects of OSS Feller et al. 2005 (ch.1,2): 1.2%-2.5% women.
Demographics: Feller et al (ch.1,2): 1.2%-2.5% women. Robles et al. 2016: ~10% women. Bias in contribution acceptance on GitHub (Terrel et al.): women's contributions tend to be accepted more often than men's. women’s contributions from outside the project are accepted less often. J. Feller et al., “Perspectives on Free and Open Source Software”, MIT Press, 2005. G. Robles et al., “Women in Free/Libre/Open Source Software: The Situation in the 2010s”, Open Source Systems: Integrating Communities, , 2016. J. Terrell et al. (2017), “Gender differences and bias in open source: pull request acceptance of women versus men”, PeerJ Computer Science 3:e111

16 Code of Conduct Many projects have a formal code of conduct:
Python: R: Mozilla: Linux kernel: Did not have one till rather recently (2015), rather vague: (

17 Who’s Who In an Open Source Project
Core Developer(s) Module Contributors Patch and Documentation Contributors Bug Reporters Users

18 Mission Critical Software
SpaceX rocket control Cyberknife radiosurgery system Software used in the healthcare setting is regulated by the FDA.

19 We Don’t Need No Regulation Yes We Do
Therac-25 radiosurgery device (a reminder): Six accidents where the device delivered massive overdoses resulting in patient death or serious injury. Violated multiple software engineering principles: Documentation should not be an afterthought. Establish software quality assurance practices. Keep design simple. Log information so that errors are traceable. Extensive testing and formal analysis at module and software level (a.k.a. unit testing). Regulation inhibits innovation (or does it)? N.G. Leveson, C.S. Turner, “An investigation of the Therac-25 accidents”, IEEE Computer 26(7):

20 FDA Regulation Software as a device.
IDE - Investigation device exemption  510(k) – Substantial equivalence  PMA - Premarket application  HME – Humanitarian device exemption  FDA provides guidance with regard to “General Principles of Software Validation” Design control: management policies and processes applied to design activities. It’s all about the process and being able to trace it. Testing isn’t enough: Requirements, documentation, identified hazards, mitigation, verification and validation. In short, you need a process which is able to provide a paper trail between requirements, implemented code, testing, bugs, and bug fixes.

21 FDA Regulation FDA does not test your device, they rely on the documentation you submit and make sure that your development process is appropriate. Your process may be perfect (FDA approved the product) but if your testing at the unit/module/system level is not aggressive enough you will have problems (recalls happen). Problems in a safety critical domain may cause harm or kill someone. Beyond rules and regulations: Ask yourself this, would I be willing to have this device used on me or my loved ones?

22 Open Source in Medical Image Computing and Computer Aided Interventions

23 The Image-Guided Surgery Toolkit (IGSTK)
Georgetown University IRB approved clinical study (FDA IDE): Z. Yaniv et al., “Needle-based interventions with the image-guided surgery toolkit (IGSTK): From phantoms to clinical trials”,IEEE Trans. Biomed. Eng., 57(4), pp , 2010.

24 IGSTK Development Process
Modified agile process: Ticketing system manages formal requirements and bug reports. Requirements added throughout the development cycle with software components/features implemented only if associated with requirement. Component design discussions using a wiki. Documentation as part of the code submission (Doxygen) with design decisions documented on wiki. Software components designed as explicit state machines validated using a simulation framework. Continuous integration testing (formal validation of state machines + unit testing). Built in logging facilities to enable audit of error trails. legally discoverable K. Gary et al., “Agile methods for open source safety-critical software”, Soft. Pract. Exper. 41: , 2011.

25 Git for Newcomers to GitHub

26 Forking Workflow common workflow
Single authoritative remote repository. Every developer has a remote copy (fork) of the authoritative repository and their own local copy. Every developer pushes changes to their personal remote repository and issues a pull request to the authoritative repository. hosting service local GitHub description: Bitbucket description:

27 Forking Workflow common workflow
One time setup: Fork repository of interest on git hosting service (GitHub/Bitbucket/…), let’s call it ‘repo’. Locally clone your copy: git clone Add the original repository as a remote, usually named ‘upstream’: git remote add upstream Check that we have two remote repositories (origin, upstream): git remote -v

28 Forking Workflow common workflow
If not synched with upstream repository, synch before beginning to work: git fetch upstream git checkout master git merge upstream/master Create branch on which you will work: git checkout –b my-branch-name Write code+tests and commit locally: git add my_file git commit my_file Push branch to your repository on hosting service: git push origin my-branch-name On the hosting service site, open a pull request from my-branch-name to the upstream repository. Owner of the upstream repository will do a code review. Repeat steps 3,4,6 until the branch is merged into the upstream repository. Delete the branch on your remote and local repositories: git push origin --delete my-branch-name git branch –d my-branch-name

29 Support Open Source


Download ppt "Office of High Performance Computing and Communication,"

Similar presentations


Ads by Google