Issue 29Issue • April24 • Jan2013 2014

TABLE OF CONTENTS RECENT RELEASES

Editor's Note...... 1 VTK 6.1.0 RELEASED Kitware and the entire VTK team are happy to announce the Recent Releases...... 1 release of VTK 6.1.0. The release fixes bugs and adds fea- tures on top of the more modular code structure of version Use of CMake at Canonical...... 2 6.0. The source, data, and new vtkpython binary packages can be downloaded from VTK's website.

Meta-configuration of C/C++ projects with CMake...... 4 This release introduces the vtkDax accelerator module and vtkSMP multi-threaded filters. The Dax interface allows VTK Packaging VistA for Debian...... 7 to offload work to Sandia's Dax framework for GPGPU and multi-core data processing. In addition, Inria's vtkSMP brings CMake and the Wolfram Language...... 10 a framework for fine-grained work-stealing parallel process- ing inside of unstructured data processing filters. Writing STL Files from ITK for 3D Printing...... 13 Also in this release, VTK takes a giant leap onto the web processing frontier. ParaView's core web interface and UVis: Web-based Analysis and Visualization for Large widget components have been promoted to VTK, and new Climate and Geospatial Datasets...... 14 features have been added such as an integrated, object- oriented python framework for writing dashboard tests of Kitware News...... 17 web applications; a simple python-based launcher and file upload server; and a viewport that drives the VGL (webgl- EDITOR'S NOTE based) rendering library developed by Kitware and NYU. Beginning with this release, Kitware published runnable binaries of VTK's python shell interface for Mac, Windows, At Kitware, we are continuing to make new developments and operating systems, along with the usual source, in medical computing, scientific computing, data manage- data, and documentation packages. These replace and ment, software process, informatics, and computer vision improve upon the old vtk-tcl.exe windows-only package. that we are pleased to share with you. For one, we released new versions of VTK, CMake, and ITK. We also announced funding for projects that will advance the field of medical computing in areas such as neurosurgery simulation and longitudinal image analysis.

In addition, we attended events including SPIE Medical Imaging 2014, HackNC, Conference on Data Analysis 2014, VIZBI 2014, GPU Technology Conference, and 2014 Oil & Gas HPC Workshop. We also hosted a CMake tutorial in Santa Fe, presented live computer vision webinars, and had members of Kitware SAS exhibit our visualization, data processing, and modeling expertise at an Inria Industry Meeting. More information regarding our presentations, tutorials, and exhibitions at these events can be found in the Kitware News section at www.kitware.com/news. Example of ParaView's surface LIC in action (http://www.vtk.org/Wiki/ParaView/Line_Integral_Convolution) CMAKE 3.0-RC1 READY FOR TESTING CMake 3.0 has entered the release candidate stage. USE OF CMAKE AT CANONICAL Among the significant changes made in CMake 3.0 are the following: By Jussi Pakkanen (Canonical) • Compatibility options supporting code written for CMake versions prior to 2.4 have been removed. • The CMake language has been extended with *Bracket Canonical is most known for Ubuntu, which is the most Argument* and *Bracket Comment* syntax inspired by popular desktop Linux distribution in the world. Its main Lua long brackets. product is very different than most software and solution • The CMake documentation has been converted to reStruc- vendors. Consequently, the way software is created at turedText and now uses Sphinx generation. Canonical is quite unusual.

• Generators for Visual Studio 10 (2010) and later were Rather than having one or a few grand source trees, renamed to include the product year. Canonical has many individual projects. These projects are • A new "CodeLite" extra generator is available for use with combined into a cohesive whole using standard Debian the Makefile or Ninja generators. packaging tools. Another uncommon thing is that most employees work from home and come from every corner of • A new "Kate" extra generator is available for use with the the world. It is normal in a development team of five people Makefile or Ninja generators. to have participants from two or three different continents. • The "add_library()" command learned a new "INTERFACE" Teams are given a rather large degree of autonomy regard- library type. ing how they organize and implement their work items, as The release notes can be found on: long as they stay within certain agreed upon limits. While http://www.cmake.org/cmake/help/v3.0/release/3.0.0.html. this is great for initial development efficiency, it may cause friction when people move between projects because the ITK 4.5.1 RELEASED tools vary between them. On behalf of the Insight Toolkit Community, we are happy to announce the release of ITK 4.5.1. ITK 4.5.1 is a patch In regards to build systems, most of Canonical’s projects release that addresses several critical issues. For one, it helps previously used GNU Autotools. Some of the newer ones, SimpleITK build with MacOSX Clang 5.0. It also fosters Visual however, used CMake and a few Qt applications used qmake. Studio builds of MINCIO and SCIFIO, release builds with GCC Build system selection was usually based on the very simple 4.8, and TIFF compression. algorithm of going with the one with which the project ini- tiator was most familiar. To download ITK 4.5.1, visit www.itk.org. Questions and com- ments are welcome on the ITK mailing lists. The next feature THE RACE TO STANDARDIZATION release, ITK 4.6.0, is scheduled for June. It will include more In late spring of 2012, Canonical started to really focus on patch releases. bringing Ubuntu to phones. One major infrastructure piece in this puzzle was the Mir Display Server. When the project SIMPLE ITK 0.8.0 RELEASED started, for possibly the first time, there was an actual Kitware is pleased to announce the release of SimpleITK debate about what build system to use. Eventually, CMake 0.8.0. SimpleITK is a simplified layer built on top of ITK. was chosen due to its flexibility and good cross compilation By providing binaries for several wrapped languages, it support. facilitates ITK's use in rapid prototyping, education, and interpreted languages. It should be noted that Canonical's use of CMake is again slightly different than with most corporate entities. With The 0.8.0 release includes several improvements to SimpleITK such entities, the choice is driven by CMake's multi-platform including support for events and command call-backs and support, especially for certain non-POSIX operating systems support for compiling OSX Mavericks by automatically from the northwestern United States that seem to be quite enabling C++11. More information about these improve- popular on the desktop. Canonical's projects are, almost ments can be found on http://itk.org. without exception, designed to be Linux only. Even in this The release also improves support for C++11 and for single-platform case, CMake was deemed to provide a better setting dimensional vector parameters as scalars in the OOP developer experience than its competition. interface. Additional release improvements include the Positive results from Ubuntu and a few other projects even- availability of threshold management in automatic thresh- tually led to the decision to make CMake the standardized olding filters and the use of ITK 4.5.1. build system across all Canonical projects. Given earlier For additional information on the release, visit http://www. discussions on the issue, this was expected to raise some itk.org/SimpleITKDoxygen/html/CommandPage.html. objections from people whose experiences were mostly with

2 other build systems. Once the decision was made, the actual Another issue that was raised had to do with CMake's transition occurred with little opposition. language syntax. While expressing basic build setup was considered straightforward, coding new functionality was Currently, CMake is the standard build system for all projects deemed trickier than necessary. Fortunately, most build at Canonical. There are still some old projects that use other issues have been solvable with the core modules that come build systems. However, a gentle and loving but continuously with CMake. increasing pressure is being applied to them to transition. This process is expected to be finalized within a few months. Overall, the transition has been successful. While there has been no formal evaluation of how the transition has changed PROBLEMS ENCOUNTERED AND LESSONS developer productivity, informal discussions seem to indicate LEARNED that after the initial adjustment period, most people feel at The single biggest selling point of CMake to people accus- home and enjoy the benefits provided by Ninja and other tomed to other build systems was something no one ever nice features offered by CMake. expected. It turned out to be the Ninja backend. Unix devel- opers have used Make for so long that they have become accustomed to its disadvantages. One of these disadvan- tages is that Make is actually quite slow. That is not to say that any single implementation of Make is slow, but rather that Make as a system is slow. The reasons for this are varied and interesting, but they basically boil down to certain design decisions that turn out to be impossible to implement efficiently.

If you have even a moderate sized code base, Make can take tens of seconds just to determine that the build is up-to-date and that nothing needs to be done. Ninja can determine the same in a fraction of a second. Showing this to developers made them immediately see the benefits of transitioning to CMake. Many of them have since expressed severe dissatis- faction when they have had to work on any projects that do not have a Ninja backend.

Like any large-scale project, this transition also had some negative points. The main one had to do with CMake modules, rather than the core system itself. One of the main advantages of GNU Autotools is that it has a massive third- party library of code that can be used to do almost anything A screenshot of a prototype version of Ubuntu phone imaginable. CMake's modules do not provide as much func- running the Unity 8 shell on top of the Mir display server, tionality, and the quality of some portions could be better. both built with CMake

Because Ubuntu is a global project, localization of soft- Jussi Pakkanen received his Ph.D in ware is extremely important. Internationalization is usually Computer Science in 2006. He currently done with the GNU Gettext software package. CMake does works for Canonical, where he is colloquially provide a module for Gettext, but it has turned out to be known as that guy you should talk to if you confusing to use. People encountering it for the first time have CMake questions. He has worked on have, almost without exception, asked for help in using projects such as the multi-touch framework, it. Some Autotools proponents even raised this as an issue the Libcolumbus fuzzy matching library, Mediascanner, and serious enough to revert back to Autotools. Eventually, these Unity Scopes. He has also written his own build system called problems were dealt with, and there have been few issues Meson, which is available at https://sourceforge.net/projects/ since then. meson/.

3 META-CONFIGURATION OF C/C++ PROJECTS WITH CMAKE

By Diego Rodriguez-Losada (biicode)

Project configuration in software development is the process writes the following three (simplified) files for a Hello World of setting up “how” your code will be built, managed, and/ application. or run. It varies depending on the programming language and tools used, such as the IDE. For instance, when program- ming in C/C++, the project setup usually entails defining what artifacts (e.g., executables, libraries) will be built from certain source code files, with given compiling and linking options. In Microsoft Visual, this can be completed, for the most part, with wizards, menu, and contextual commands. For example, you can configure your directories containing external libraries in a dialog (Project Properties).

Other languages, especially interpreted ones such as node or python, typically require much less project configura- tion or setup. In languages such as Java, project setup can be accomplished with IDEs including Eclipse or Netbeans. Fig. 1. Automatically generating a CMakeLists.txt from the source Nevertheless, the use of Maven is more extended. Maven code. There is a main.cpp file that defines an entry point for an allows you not only to define how the project has to be executable, which depends by #include to a hello.h header, which built, packaged, executed, or tested, but it also allows you in turn is implemented by a hello.cpp. to specify dependencies to binaries artifacts (jars), which can be retrieved from external servers. Analyzing the source code, it is clear that the user wants to build an executable (from the main function, in green) that In the C/C++ ecosystem, the best tool for project configura- includes the file "hello.h" (red). By cross-checking declared tion is CMake. CMake allows you to specify the build of a and defined symbols in "hello.h" and "hello.cpp," it can project, in files named CMakeLists.txt, with a simple syntax easily be deduced that the implementation (blue) of the (much simpler than writing Makefiles). From those files, function hello() is found in the "hello.cpp" file and, there- CMake can generate projects for the most popular IDEs and fore, it is required to build the application. Accordingly, build systems on different OSs. It is a must-have tool. It is a CMakeLists.txt such as the one depicted above could be the de-facto standard in the industry for the C/C++ multi- automatically generated. platform and even for single OS development. We love it. We have used it for a long time in our own projects and, What makes this automatic generation of the CMakeLists. as professors, we have taught it from the first day in our txt file interesting? If a couple of new files are added and Software Engineering courses. included by "main.cpp" or "hello.cpp," they will automati- cally be added to the executable. If the user wants to create C/C++ PROJECT META-CONFIGURATION a new executable, all they have to do is write a file (with What is project meta-configuration? You probably already whatever name) with a main() function inside. That is, the know something about meta-programming. Meta- user just has to focus on writing code. The rest of the process programming is a process in which the code you write (e.g., can practically be automated. Although real, large-scale mul- a C++ template) is the specification or instructions for how tiplatform projects usually have a complex building process, the real code will be generated by a system (in the case of which probably cannot be automatically fully deduced, this C++ templates, the compiler). approach can be very valuable for students, programming In biicode, meta-configuration is the process in which the courses, rapid prototyping, testing, etc. project setup is completed (most of the time automatically) INTEGRATING DEPENDENCIES by collecting information about the project and user inten- Biicode allows you to very simply publish and share your tions from different origins. For example, the source code source code to the biicode cloud. You (or anyone else in the itself is a great source of information that can be exploited world) can later easily reuse code in another project. All you for this purpose. have to do to reuse previously published code is to write a Let's see how it works with the well-known example "Hello #include directive in your code in the form of "username/ World." Imagine someone (“user1”) starts to write code and block/path/to/file.h." If biicode does not find such a file

4 Fig. 2. Publishing code to the biicode cloud is very easy, as it requires just a simple command. The source code files, together with the meta information (such as the dependencies between files), are also uploaded so the user does not have to define any package or write any configu- ration at all. If the user modifies one file and publishes again, the server tracks information about the changes that can afterwards be used to check compatibility in the user dependencies graph. locally, it will look for it in biicode cloud and retrieve it into CMAKE INTEGRATION your project, along with other files (included by or imple- Obviously, the above approach is not very useful; if the menting such file, i.e., red and blue arrows in the graph). CMakeLists.txt is continuously generated, there is little What happens with such source code? chance that the user can actually use his or her own con- It is retrieved as source code, not as binaries, so it has to figuration and adapt the project to his or her specific needs. be built locally. The source files could just be directly added The files inside the CMake folder are automatically gener- to the executable, but it seems more intuitive to define a ated by biicode. The CMakeLists.txt is created just once, so library that contains such files, as they will not usually be the user can modify its contents if necessary. edited by the user and link the executable to such a library. PROJECT( hello ) For example, imagine that the user, “user2,” is developing a ... simple chat application and includes the “hello.h” file pre- # This file defines variables viously published by “user1.” After invoking biicode, “user INCLUDE(bii_vars.cmake) 2” ends with the following layout of files, from which a CMakeList can also be easily deduced. # This file defines the actual targets using the # variables in the above file INCLUDE(bii_targets.cmake)

It includes two other files, also generated by biicode. These two files are overwritten every time the “bii” tool is called and there are changes in the project.

The first file, “bii_vars.cmake,” creates variables that define the targets to build, as well as their properties, but does not create those targets yet. Some variables might be empty, but they are declared here for the user’s convenience. A very simplified example for "Hello World" could be:

SET(TARGET_user1_hello_main_NAME user1_hello_main) SET(TARGET_user1_hello_main_FILES ../blocks/user1/hello/hello.cpp ../blocks/user1/hello/hello.h ../blocks/user1/hello/main.cpp) Fig. 3. In this example, “user2” has written some code and added The other “bii_targets.cmake” file is the one that a #include to the code previously published by “user1.” The biicode actually defines the targets to be built, based on system automatically finds it in the server and retrieves the files the variables declared in the previous file: “hello.h” and “hello.cpp” to the “user2” machine. These files are ADD_EXECUTABLE( ${TARGET_user1_hello_main_ NAME} automatically integrated in the project, creating a library with ${TARGET_user1_hello_main_FILES}) CMake. Note that the “user1” main.cpp file has been automatically TARGET_LINK_LIBRARIES( removed here, as it is not a real dependency so it is not included ${TARGET_user1_hello_main_NAME} in the build and, thus, it does not generate a because of multiple ${TARGET_user1_hello_main_LIBS}) definition of “main” function error link.

5 Using this file makes it very simple to define or customize mation, mainly source code. This is a powerful approach the building process. Users can edit the used variables in that can lower barriers for students and new users of the C/ the CMakeLists.txt between the two included .cmake files. C++ language. However, we are also working on support- They can even completely drop the “bii_targets.cmake” and ing more languages such as node and python (even fortran define their own targets. Note that this approach does not thanks to CMake fortran support), as well as embedded exclude the possibility of users having their own CMakeLists systems including Arduino and RaspberryPI. along with their source code or even of having other cmake We currently target users of the major OSs: Windows files that could be included from the biicode generated (mingw, Visual), Linux (Ubuntu only now), and MacOS. We CMakeList.txt one. For example, if your code is using boost could not have reached our current functionality without (only header libraries), a simple approach could be: CMake; it is the most required element in our tool chain. We cannot imagine developing C/C++ projects without CMake PROJECT( hello ) and, thus, we have integrated it in biicode from the very ... first moment. The fact that we use CMake has been widely # This file defines variables accepted by our users, as it is something they know and value INCLUDE(bii_vars.cmake) very highly. As we are just using a fraction of CMake’s power, INCLUDE_DIRECTORIES(path/to/boost/installation) our next steps involve using more of its power, as well as # This file defines the actual targets using the creating more value for the CMake community by helping # variables in the above file to automate some tasks in the package definition process. INCLUDE(bii_targets.cmake) ACKNOWLEDGEMENT Of course, you can also use the FIND_PACKAGE features of This work is partially funded by Spanish Ministry of Economy, CMake for such a purpose. In fact, we are already using it under Program INNPACTO (Ref: SDT- Scalable Development to find and configure projects with well-known dependen- Tools: IPT-2012-0797-430000) cies, including large and massively used libraries such as WxWidgets or Boost, so that it will be enough for users to just #include what they want. Biicode is able to fully config- REFERENCES ure the project if a local installation of such libraries is found. 1. www.biicode.com 2. http://web.biicode.com/blog/meta-configuration-of-cc-proj- ONGOING WORK ects-with-cmake-1 We are currently working toward better integration with CMake and are trying to empower the synergies between both tools. CMake is incredibly powerful and has advanced Diego Rodriguez-Losada is an Industrial features (e.g., INTERFACE targets) that are a very natural Engineer with an M.S. in Mechanics and a fit for some biicode requirements. We also like the OBJECT Ph.D in Robotics. He is the co-founder and library targets, which could be very helpful for many of CTO of biicode, where he currently enjoys our use cases. However, we have a problem here. As I said, one of his great passions, SW development. biicode can be great for students and beginners, many of He is an Associate Professor (now on a leave) whom are using mainstream linux distributions, as could at Universidad Politecnica de Madrid UPM and a researcher Ubuntu 12.04 LTS. These distributions come with a CMake at Intelligent Control Group, a research group located at 2.8.7 version, which does not yet support these features. We DISAM laboratory in Madrid, Spain, that belongs to the are currently evaluating the policy as follows: force our users Center for Automation and Robotics CAR UPM-CSIC. to manually upgrade CMake on their machines so we can use those features or implement hacks and workarounds in While his main research interest is Mobile Robots Navigation, biicode that offer the same final functionality. specifically Simultaneous Localization and Mapping (SLAM), he has been involved in a variety of robotics and industrial We are also working in a better binaries products manage- projects. ment. Biicode always builds executables and libraries from source, but it still lacks integration or support with “install” features. Here, we are concentrating on automatically generating packages and package information so that gen- erated binaries can also be easily discovered and used with FIND_PACKAGE.

CONCLUSION In this post, I have introduced a new approach to C/C++ project configuration: meta-configuration from user infor-

6 PACKAGING VISTA FOR DEBIAN

By Luis Ibáñez (Kitware)

This article describes the process of packaging VistA for MUMPS is the key component to nearly all of the large EHR the Debian Linux distribution. It begins with our rationale systems including those that are proprietary such as Epic, and motivation and continues with a discussion on the col- Allscripts, , GE , and McKesson, as well as laboration process that followed with many members of the those that are open source such as VistA, CHCS (the EHR used open-source community. by the Department of Defense), and RPMS (the EHR used by the Indian Health Service). WHAT IS VISTA? The Veterans Health Information Systems and Technology One of the main challenges facing the M/MUMPS com- Architecture (VistA) is the most comprehensive Electronic munity is the shift in demographics that has occurred over Health Records (EHR) system in the world. VistA was inter- time. Currently, the M/MUMPS community is composed of an nally developed by the Department of Veterans Affairs (VA) aging population, harboring decades of invaluable expertise and is freely available as open-source software. VistA is cur- that is not being transmitted to the next generation. This rently deployed universally across the VA at more than 1,500 has resulted in an under-representation of young developers care sites including 153 hospitals, 765 outpatient clinics, and in the ranks of beginners who are gaining experience with nearly 300 VA Vet Centers. In total, it helps provide health- both the language and the underlying NoSQL database. care for over 7.84 million patients. Consequently, the number of professionals available to maintain and improve EHR systems is very limited. WHAT IS MUMPS? VistA is written in MUMPS. MUMPS is a programming EDUCATING THE NEXT GENERATION language with a built-in NoSQL hierarchical database. Despite being the platform that runs the large majority of Sometimes, the MUMPS language is referred to as M. It is healthcare installations in the US (over 500 hospitals), the also common to see the dual mention of M/MUMPS. M/MUMPS language and database is not very well known Hierarchical databases were some of the first data models. in the mainstream of programming technologies in either The World Wide Web, Wikis, and the file systems of most industry or academia. modern operating systems are hierarchical databases. In However, from an economic and social point of view, the rel- short, they store data in tree-like structures. evance of healthcare is so high that the field of Healthcare IT should be receiving a great deal of attention from the MYLABEL ; This is a comment academic community. For example, the US spends 18% of WRITE !,”Hello World” its GDP (close to $2.8 trillion) every year on healthcare. Out QUIT of this sum, close to $778 billion is spent in hospitals. As a (Hello world in MUMPS) reference, the entire worldwide software-for-sale industry amounts to only $220 billion a year, and the entire hardware FIBONACCI ; compute the Fibonacci series industry amounts to close to $480 billion a year. Despite SET (A,B)=1 the heavy investment in healthcare, the US ranks 28th in FOR I=1:1 SET S=A+B WRITE !,S SET A=B SET B=S QUIT:S>100 healthcare quality worldwide. In addition, less than 50% WRITE !,"Result= ",S of hospitals in the US are currently using EHR systems, while (Fibonacci Series computation in MUMPS) Airlines have been using computerized systems since 1946. set ^beatle("John","birth","date","1940-10-09")="" EHR systems are extremely complex, mainly because they set ^beatle("John","birth","place","Liverpool")="" reflect the natural complexity of a medical institution. Peter set ^beatle("John","sons","Julian")="" Drucker, the organizational guru whose writings contrib- set ^beatle("John","sons","Julian","birth","te","1963-04-08")="" uted to the philosophical and practical foundations of the set ^beatle("John","sons","Julian","birth","place","Liverpool")="" modern business corporation, once said that “the modern set ^beatle("John","wifes","Cynthia","birth","date","1939-09-10")="" hospital is the most complex form of human organization set ^beatle("John","wifes","Cynthia","birth","place","Liverpool")="" ever created.” set ^beatle("John","wifes","Yoko","birth","date","1933-02-18")="" Since much of the operational logic of the medical field is set ^beatle("John","wifes","Yoko","birth","place","Tokyo")="" built into EHR software, it is unrealistic to consider migrating (Using the Global “^beatle” to store John Lennon’s these existing systems to other software technologies with information in a hierarchical structure) the hope that a larger pool of professionals will be available

7 to maintain them. Therefore, under the leadership of the It is now possible for anyone with a Debian (or Debian- Open Source Electronic Health Records Alliance (OSEHRA), based) installation to install GT.M by setting up the package we have undertaken several educational initiatives to train a sources and then using the familiar command: new generation of young developers on essential EHR tech- nologies, such as MUMPS. sudo apt-get install fis-gtm For example, we have engaged in several activities, includ- ing online tutorials, intended to reduce the barrier of entry The Debian community uses a multi-tier distribution into the M/MUMPS community. We have also introduced M system through which new packages are first included in as a regular topic in database classes at the college level. the unstable distribution. They then move into the testing The classes cover both the M Language and the M Database. distribution before they graduate into the stable distribu- We introduce MUMPS in our databases class at the State tion. This mechanism provides Debian users with a balance University of New York at Albany as a follow-up of our study between stability and agility of adoption. of document databases. In this way, students are already in the proper state of mind to assimilate the principles and THE STORY advantages of storing data in denormalized form and in a The initiative for packaging fis-gtm was embraced and sup- structure that makes related data available nearby. ported by the maintainers of the Debian-med community, a that aggregates packages of interest Our effort to reduce the barrier of entry into the M/MUMPS for the medical and scientific communities. The response community will continue throughout the spring of 2014. was particularly enthusiastic from Andreas Tille, who is the Ironically, our effort is turning out to be quite easy thanks to initiator of debian-med and its most active developer, and two coincidental developments: 1. The emergent popularity Yaroslav Halchenko, who is very active in the NeuroDebian of the NoSQL movement, and 2. The current popularity of community. The effort was also enthusiastically supported the Javascript language. by FIS Global, in particular by K.S. Bhaskar and Amul Shah.

It also turns out that the MUMPS language shares a number The effort actually started back in 2009 with an “Intent to of characteristics with Javascript. Therefore, by teaching it Package” ITP report by Bhaskar. Brad King, Joe Snyder, Jason along with Node.js (Javascript server side), we can prepare Li, and Luis Ibáñez (members of the OSEHRA team) also the students’ mindsets to easily assimilate the MUMPS joined the effort in 2012. language. GT.M’S MANY LANGUAGES After two years of running this educational initiative, more The creation of a Debian package requires building the than 200 students have been exposed to the MUMPS lan- specific project from source code. Most of the source code guage and database. We are progressively increasing the of GT.M is written in C-Language, with some sections on depth of these topics in the curriculum and complementing Assembly and some sections written in M. Therefore, during the student training with internships with health IT com- the early attempts, the main challenge for building fis-gtm panies and clinical facilities. In doing so, we are preparing from source was that it required the availability of an exist- students to master open-source technologies for “Stuff ing M compiler in order to build itself. To circumvent this that Matters.” requirement, a bootstrapping process was devised and LOWERING THE BARRIERS implemented. An additional mechanism to reduce the barrier of entry is to The infrastructure for building fis-gtm was supplemented make it very easy for new developers to find and install the with CMake, which helped to restructure the build process open-source version of the M/MUMPS implementation: fis- so as to carefully craft the bootstrapping mechanism. The gtm. Also known as GT.M, fis-gtm is the M implementation new build process uses temporary files to get a first instance developed and maintained by FIS Global. of the compiler to build. It then uses this initial M compiler to To that end, back on January 18, 2012, we initiated an complete a normal build of a second compiler. Accordingly, effort for packaging fis-gtm for the Debian Linux distribu- it is now possible to build fis-gtm from source using only a tion. The choice of Debian as a target was reinforced by C compiler. the trickledown effect through which Debian packages THE MAIN HACKATHON become available for other popular Linux distributions such The large majority of the work was done through remote as Ubuntu and Mint. collaboration between a team at Kitware, the Debian-med SUCCESS maintainers, and the fis-gtm upstream developers at FIS Global. In the summer of 2012, however, the team hit a This effort of packaging GT.M recently came to fruition with major challenge in the process of converting the build infra- the publication of the distribution: structure to CMake and decided to convene a hackathon http://packages.debian.org/sid/fis-gtm to tackle the problem with an all-hands-on-deck meeting

8 at Kitware’s offices in Clifton Park, NY. Yaroslav Halchenko PACKAGING VISTA drove 300 miles from Dartmouth in order to help the team Now that fis-gtm is packaged for Debian, our next target is to with his Debian packaging expertise. Meanwhile, K.S. Bhaskar craft a VistA package for Debian, initially as an educational and Amul Shah made the train ride from Philadelphia to resource, to make strides forward in our effort of educating New York. a new generation of Open Source EHR developers.

The packaging of VistA closely follows the preparation of a VistA instance through the process of combining source code in the form of M routines with data and database schema in the form of M globals.

Currently, these two elements are stored in a Git repository hosted by OSEHRA. Following a process driven by CMake and Python scripts, the elements are integrated into a pristine VistA instance that is then bundled into a Debian package.

When a future Linux user installs this Debian package, a copy of the pristine VistA instance will be installed in the /usr/share directory, along with accompanying scripts, which will facilitate the creation of new VistA instances associated From left: Jason Li (Kitware/OSEHRA), K.S. Bhaskar (FIS with specific Linux users. Global), and Yaroslav Halchenko (Dartmouth College) These last stages of packaging are a work in progress. Due to the unusually large size of the VistA package intermediate files (over 2.9 Gb), the effort has encountered some hurdles with current limitations regarding certain elements of the packaging infrastructure that could not manage files larger than 2GB. We continue working closely with the Debian-med packaging community to address these hurdles and to make VistA available to the larger user community of Debian, Ubuntu, and Mint distributions.

ACKNOWLEDGMENTS Thank you to all of the developers who worked hard to make this possible. Special thanks to Amul Shah, Brad King, Andreas Tille, and Yaroslav Halchenko. From left: Joe Snyder (Kitware/OSHERA), Brad King (Kitware/OSEHRA), Amul Shah (FIS Global) Luis Ibáñez is a Technical Leader at Kitware, During these two very productive days, the team crafted a Inc. He is one of the main developers of the strategy to use a CMake scaffolding to bootstrap the build Insight Toolkit (ITK). Luis is a strong sup- process of fis-gtm. The strategy was implemented in the porter of Open Access publishing and the following months and included many remote conference verification of reproducibility in scientific sessions (we really like tmux!), as well as off-line work. publications. After almost two years of persistence and resolve, it is great to see the fruit of this effort. The fis-gtm package is now available in the “Testing” Debian distribution, code name “Jessie,” which will in turn become the Stable distribution.

The trickledown effect has already taken place in Ubuntu, and the fis-gtm package will be available in the upcom- ing release of Ubuntu 14.04, which is scheduled for April 17, 2014.

An effort has also been initiated to package fis-gtm for the Fedora Linux distribution, as it is possible for fis-gtm to flow into the Red Hat distribution from the Fedora Linux distribution.

9 CMAKE AND THE WOLFRAM LANGUAGE

By Steve Wilson (Wolfram)

For the past 25 years, Wolfram has “incu- major three platforms available today, Macintosh, Windows, bated,” so to speak, the burgeoning and Linux, we reached a point where we had to maintain Wolfram Language inside its flagship three separate build environments to build the Wolfram product, Mathematica, in the computa- Engine. This ternary build strategy caused no end of trouble tion module of the system called the for our developers. kernel. These technologies have evolved For example, the addition or deletion of source material into the Wolfram Language and the Wolfram Computation required updates in three separate systems. Developers Engine, respectively. wasted an inordinate amount of time just communicating The following text comes from the Wolfram Language changes to sources. product description: Furthermore, over time, each build environment had “The Wolfram Language is a highly developed knowledge- acquired certain development characteristics and facilities based language that unifies a broad range of programming that made it difficult for developers to leave one environ- paradigms and uses its unique concept of symbolic program- ment and work on problems on another platform. ming to add a new level of flexibility to the very concept of programming. ” Those same idiosyncrasies made it difficult for new developers to get started working on a particular platform. In this article, I will describe how the Wolfram team uses CMake to facilitate the development and deployment of In addition to overall problems in the development pipeline, new builds of the Wolfram Language and the Wolfram each platform’s build environment had its own set of build Computation Engine that executes it. curios that contributed to problems for developers. WOLFRAM LANGUAGE SOFTWARE LINUX ENGINEERING On Linux, we used a build environment based on make, but The Wolfram Language comprises a complex software configured using the X11 project’s Imake tool. The Imake- system made up of several million lines of C/C++, Wolfram derived build system suffered from various behaviors, which Language, and Java code. Wolfram uses a customized are listed below. enhancement of C (hereafter called Wolfram-C) that supports First, the system did not correctly handle source file object-oriented behavior and customized memory manage- dependencies, resulting in developers wasting time with ment operations of certain data structures. The source files unnecessary module rebuilds. written in Wolfram-C are processed by a tool called the precompiler prior to compilation with standard C compilers. Second, Imake configuration, as a combination of C pre- Our build environments can also build the Wolfram-C files as processor syntax and make syntax, eventually led to a system C++ sources. We do not use the C++ version for production that was too confusing for many developers to change. due to the speed enhancements and memory optimizations Third, the Imake-based system did not correctly run builds that are available in the C version. After compiling the base in parallel. portion of the Wolfram Engine from Wolfram-C, a large portion of the remainder of the system is processed and Fourth, the original designer of the Imake-based system implemented in the Wolfram Language itself. In addition to created a large monolithic build environment that built the primary Wolfram-C sources and the Wolfram Language every module for each build. Therefore, it was not easy sources, creating the Wolfram Engine also requires a set of for the developers of individual modules to only build the third-party libraries built specifically for each platform. modules they needed. DEVELOPMENT PIPELINE WINDOWS Along with developing features and functionality for the On Windows, we made use of a custom combination of Wolfram Language, Wolfram has also strived to develop make and Visual Studio. For each build, the system used a streamlined development pipeline, capable of building make to invoke the precompiler tool on each Wolfram-C and delivering versions of Mathematica (and the Wolfram source file to create the generic C source suitable for use Language) from stable sources in as little time as possible. In with the Visual Studio compiler. After that step, a Visual 2008, having narrowed our list of supported platforms to the Studio project drove the compilation of the C portion of

10 the system, and custom scripts drove the processing of the form. CMake provided three gigantic productivity gains: 1. Wolfram Language source files. This system suffered from The three build platforms all now use the same set of con- several problems. figuration files to enumerate sources and resources (no more communicating source changes), 2. CMake can configure all For one, the initial portion required a make environment for three build environments to have the same set of features pre-processing the Wolfram-C source files with the precom- (e.g., they can all easily acquire requisite third-party libraries piler tool. This requirement led most Windows developers before builds, they can all build the production version using to build the C++ version of the Wolfram Engine that did not the precompiler tool and generate file layouts, they can all require the use of the precompiler tool. Developing the C++ build the C++ version, etc.), and 3. CMake produces depen- version of the product meant that most Windows developers dency correct build systems that correctly build in parallel in never built or directly tested the production version of the all build environments (where the native build tool can build Wolfram Engine. in parallel), drastically reducing build times for production In addition, the varied stages of this system made it diffi- builds on our build servers. For example, Linux builds of the cult to modify configuration parameters. The project files Wolfram Engine went from build times of around an hour to contained the build settings and required spelunking build times on the order of five minutes thanks to the ability through projects in order to find the correct location to to leverage multiple processors on the build servers. change build settings. In addition to addressing the primary problems with our Furthermore, the Visual Studio projects did not assemble build environments, having standardized on CMake has the software into finished file layouts but, instead, relied on made transitioning to mobile platforms particularly easy. registry entries to point various components to pre-existing CMake’s build description language is flexible enough layouts constructed by the primary product installer. to allow us to easily extend our support for the Wolfram Engine on iOS and Android, as well as hobbyist systems such Finally, the system lacked cohesive documentation that most as Raspberry Pi and Intel’s new platform, Edison. often manifested problems in acquiring the correct set of third-party external libraries used to build the Wolfram CUSTOMIZING CMAKE Engine for Windows. While CMake solved the majority of our needs, we did find the need to customize CMake to handle some portions of MACINTOSH our build requirements that the standard CMake implemen- The Xcode build of the Wolfram Engine had numerous tation did not cover. For example, we found that we needed problems, which are listed below. to have add_custom_command() syntax that allowed custom The Xcode projects only built the C++ version of the Engine. commands to vary by build configuration. We changed As a result, Macintosh production builds did not use the the standard add_custom_command() signature to the Xcode projects. Instead, they used the Imake-configured following: make system. add_custom_command(OUTPUT output1 [output2 ...] In addition, Xcode does not provide a mechanism for COMMAND command1 [ARGS] [args1...] informing the Xcode build processor that it should compile [COMMAND command2 [ARGS] [args2...] ...] files with custom extensions as particular languages. For [MAIN_DEPENDENCY depend] example, you could not (from inside of Xcode on a global [DEPENDS [depends...]] basis) have Xcode compile all .wlc files as C or C++ source [IMPLICIT_DEPENDS depend1 files. In Xcode, you can change the source file type for each [ depend2] ...] file individually, but when you have thousands of source [WORKING_DIRECTORY dir] files with custom extensions, the Xcode environment quickly [COMMENT comment] [VERBATIM] [APPEND] becomes unwieldy, making the develop->compile->debug ——> [CONFIG Debug | MinSizeRel | Release | cycle difficult. RelWithDebInfo | ...] In order to avoid the first two problems, most Macintosh ) developers did not use the Xcode project. As a result, the Xcode project source lists were often out of date. add_custom_command(TARGET target PRE_BUILD | PRE_LINK | POST_BUILD ENTER CMAKE COMMAND command1 [ARGS] [args1...] I first encountered CMake while experimenting with [COMMAND command2 [ARGS] [args2...] ...] Kitware’s Insight, Segmentation, and Registration Toolkit for [WORKING_DIRECTORY dir] image processing. I quickly realized that CMake had all the [COMMENT comment] [VERBATIM] necessary features to solve our build environment problems. —-> [CONFIG Debug | MinSizeRel | Release | CMake allowed us to merge all three build systems into one RelWithDebInfo | ...] system, while still serving the needs of each individual plat- ) 11 The CONFIG option specifies that the custom command(s) CONCLUSION should run only when the given build configuration is active. Any organization doing non-trivial, cross-platform develop- This option allows custom commands to have configuration ment with C, C++, Fortran, Objective-C, or another similar specific behavior. language should seriously consider using CMake to minimize We also had to add changes to CMake to correct various the stress of cross-platform development on the develop- minor problems in the Visual Studio and Xcode genera- ment pipeline. CMake smoothed out the wrinkles in our tors that prevented the generators from correctly handling development processes and allowed for fast turnaround certain linker and compiler flags. Finally, we added support times on our build servers. In addition, CMake allowed for Objective-C as a fully supported language understood by us to fix platform specific build idiosyncrasies that caused CMake. Here is an example of a CMakeLists.txt file config- problems for unified development efforts. On behalf of our ured for building an Objective-C library: developers, I offer thanks to the CMake project and its devel- opers for providing such a useful and productive software development tool. cmake_minimum_required(VERSION 2.8) Steve Wilson is a Senior Technical Staff Member in the Core Mathematica project(ObjectiveKernel OBJC C CXX) Engineering group at Wolfram. He works on communication protocols for the set(OBJECTIVEKERNEL_HEADERS Wolfram Language, as well as software ObjectiveKernel.h engineering and software infrastructure for OKExprStackElement.h the Wolfram Engine. OKKernel.h OKKernelDelegate.h ) VTK / PARAVIEW COURSE set(OBJECTIVEKERNEL_SOURCES The course will take place from May 14 to May 15, 2014, in OKExprStackElement.m Santa Fe, NM. OKExprStackElement.h This VTK-ParaView training course is a hands-on experience OKKernel.m that will mix presentations with guided exercises in order to OKKernel.h reinforce both the theory and application of these powerful OKKernelDelegate.h tools. ) The first day of the course will provide a detailed overview set_source_files_properties( of VTK data models, the processing pipeline, and the render- OKExprStackElement.h ing pipeline. The course will also cover VTK readers, writers, OKKernel.h and filters, including information on writing your own filters OKKernelDelegate.h and readers for your specific data / processing needs. PROPERTIES HEADER_FILE_ONLY ON ) The second day of the course will provide an overview of ParaView. You will learn how to visualize and browse data- add_library(ObjectiveKernel sets, create and include a plugin, expose new filters and STATIC readers, add new features using macros and programmable ${OBJECTIVEKERNEL_SOURCES} filters, and post process datasets in an HPC environment. ) Reserve your spot today at http://training.kitware.fr/ browse/52. install(TARGETS ObjectiveKernel ARCHIVE DESTINATION lib ) install(FILES ${OBJECTIVEKERNEL_HEADERS} DESTINATION include )

I am working with the CMake developers to merge these customizations back into the main CMake product.

12 WRITING STL FILES FROM ITK FOR 3D PRINTING

By Luis Ibáñez (Kitware)

3D printers are quickly becoming a commodity technology. An STL file contains the description of a surface in the form One can easily find 3D printers at supply stores, and they of a collection of triangles. This description is typically passed are sold at what used to be the price of Laser printers. The to a “slicer” application (such as skeinforge or Slic3r, not to process of preparing 3D models as input for the 3D printer be confused with “www.slicer.org”) that will be aware of the has also been de-facto standardized with the wide adoption geometric parameters of a specific printer and the materials of STL files. Today, the STL file is to 3D printing as the PDF it uses. By combining this information, the slicer application file is to standard 2D ink printing. will generate GCode, which is a description of the paths and actions that the heads (extruders) in the printer must take in order to progressively deposit the material and compose the shape. Since GCode files are fine-tuned to the specific characteristics of the printer, they are not portable across different devices. IMPLEMENTATION The STL standard supports two modes: ASCII and Binary. In both cases, the file contains a list of triangles, each of which is defined by three points. The points are specified by their x,y,z coordinates.

The ASCII version of an STL file starts with the line: “solid ascii” and ends with the line “endsolid.” In between, it has a sequence of triangles. Each one is specified by the block of text with the form:

facet normal nx ny nz outer loop vertex v1x v1y v1z vertex v2x v2y v2z vertex v3x v3y v3z Due to this ubiquitous adoption, it is important for any soft- endloop ware that can potentially produce models for 3D printing to endfacet be able to export the models into STL files.

ITK currently provides data structures to represent meshes, The first line indicates the components of the normal to the in particular 2D manifolds in 3D space, which are probably triangle, and the three “vertex” lines inside the “outer loop” the most common type of structure printed. However, until provide the coordinates of every vertex of the triangle. In recently, ITK did not have a writer class capable of exporting principle, an STL file could represent polygons with more a surface model into an STL file. Therefore, we wrote one. than three edges. In practice, however, most STL files contain only triangles. A full description of this new C++ class is available in this article in the Insight Journal: The Binary version of an STL file starts with an 80-bytes header. The header should not have the characters “solid” “STL file format MeshIO class for ITK” in its first five bytes, since those are commonly used as an http://www.insight-journal.org/browse/publication/913 indication that the file format is ASCII and would, therefore, misguide readers of the file. The source code is available as an ITK remote module at: After the header, the total number of triangles in the shape https://github.com/luisibanez/ITKSTLMeshIO is encoded into a 32-bit little endian integer. This already The new itkSTLMeshIO class can write surfaces to STL files defines a limit to the total number of triangles that can be and can also read the content of an STL file into an ITK mesh, stored in an STL file. From then on, the file contains blocks of typically a QuadEdgeMesh. data per triangle, where every block has:

13 REAL32[3] – Normal vector UVIS: WEB-BASED ANALYSIS AND REAL32[3] – Vertex 1 REAL32[3] – Vertex 2 VISUALIZATION FOR LARGE CLIMATE REAL32[3] – Vertex 3 AND GEOSPATIAL DATASETS UINT16 – Attribute byte count

That is, vectors and points are represented as triplets of At present, the majority of the climate science community 32-bit integers (float types in C++). still relies heavily on primitive analysis and visualization HOW TO USE IT tools that are based on the thick (or fat) client application concept. This means that the user must download software The typical usage of this new ITK class will look like the to the appropriate machines or hardware where the data following code: resides (e.g., laptops, desktops, or HPC machines). In such cases, the user encounters multiple levels of installation const unsigned int Dimension = 3; challenges such as finding the right prerequisite software typedef float PixelType; packages, software versions, and currently supported hard- ware and operating systems. Analysis and visualization tools itk::STLMeshIOFactory::RegisterOneFactory(); have thus begun moving toward the thin client application concept, where the user installs very little software. In most typedef itk::QuadEdgeMesh cases, only a web browser is needed. In such cases, an analy- QEMeshType; sis and visualization software is deployed on a central server typedef itk::MeshFileWriter< QEMeshType > rather than on each individual system, which eliminates the WriterType; user’s installation and operating system requirement chal- lenges. This approach also provides the flexibility to install WriterType::Pointer writer = WriterType::New(); the software on the user’s system using VM (virtual operat- writer->SetFileName(“myfileto3Dprint.stl”); ing system) in case scientists need an installation.

writer->SetFileTypeAsASCII(); Thin clients are well suited for environments in which the writer->SetInput( reader->GetOutput() ); same information is going to be accessed by a general group writer->Update(); of users. The tradeoff, however, is that thick clients provide users with more features, analysis and visualization, and We hope you find this new ITK feature useful, and we will be interaction choices that make the software more customiz- happy to receive your feedback on how to improve it. able. Nevertheless, this trend is changing due to new web standards (HTML5) and more capable browsers that have been developed by leading web technology companies. REFERENCES [1] http://en.wikipedia.org/wiki/STL_(file_format)#ASCII_STL [2] http://www.insight-journal.org/browse/publication/913 UVIS BACKGROUND The need for highly scalable, collaborative, and easy to install and use software for large climate and geospatial data anal- Luis Ibáñez is a Technical Leader at Kitware, ysis and visualization led us to develop the UVis toolkit. UVis Inc. He is one of the main developers of the utilizes the latest in web-technologies such as RESTful API Insight Toolkit (ITK). Luis is a strong sup- and HTML5 to provide powerful visualization and analysis porter of Open Access publishing and the capabilities on modern web-browsers. Underneath, it is built verification of reproducibility in scientific on top of UV-CDAT [REF], ParaViewWeb, and DJango python publications. web-framework. A complete architecture of UVis is shown in Figure 1. The UVis backend python API is developed on top of UV-CDAT to utilize its analysis and visualization capabili- ties. The web API of UVis utilizes ParaViewWeb at its core. ParaViewWeb enables communication with a ParaView [REF] / UV-CDAT server running on a remote visualization node or cluster using a light-weight JavaScript API. By utiliz- ing UV-CDAT and ParaViewWeb, UVis provides capabilities including interactive 2D and 3D visualization, remote job submission and processing, and exploratory and batch-mode analysis for scientific models and observational datasets.

14 By Elo Leung (LLNL), Aashish Chaudhary (Kitware), Chris Harris (Kitware), Charles Doutriaux (LLNL), Thomas Maxwell (NASA), Dean Williams (LLNL), Gerald Potter (NASA)

Thin Client Web Server Server-side Processing Django Events & Requests UVis Server

Client UI Widgets Server

UVCDAT Local Process Instance UVis Core Python Web API

UVCDAT Core Process Instance

D3/WebGL REST/ REST/ UVCDAT WebSockets Extensions WebSockets

Web Service Tools Image/Geometry

Figure 1: UVis overall architecture

JAVASCRIPT API AND THIN CLIENTS Figure 2: UVis client interface showing comparison We consider our web-based analysis and visualization toolkit between model output and observation clients that use UVis to be neither thick nor thin clients. Instead, we consider them to be smart clients. That is, they Although the system is standalone, it is part of the large are based more on the traditional client-server architecture end-to-end climate science system that will enable users concept within the web-based model, as is shown in Figure to run models and collect workflow and provenance for 1. They are more similar to thick clients in that UVis smart sharing scientific results and reproducibility. The system is clients are Internet-connected devices that allow a user’s directly connected to the ESGF distributed archive, requiring local applications to interact with server-based applications all users to log in at ESGF. ESGF login accounts are required through the use of web services. As is the case with thick for authentication and authorization before any data is clients, this provides for increased analysis and visualization accessed. However, a login is not needed for local data or for interaction, as well as software customization. On the other ESGF data that is open to the public. hand, like thin clients, software downloads are minimal. In most cases, the only software application needed is the SERVER SIDE ANALYSIS AND VISUALIZATION appropriate web browser for a particular operating system. One of the important components of Uvis will be server- With UVis, a user will be able to work offline via the locally side analysis and visualization. Server-side computation is installed UVis backend (using VM) and access the appropriate necessary, as the increase in data size and complexity of algo- local data or connect to the Internet and access distributed rithms has led to data- and compute-intensive challenges for data from Earth System Grid Federation (ESGF). With this climate data analysis and visualization. In this architecture, a architecture in place, UVis has the ability to be deployed and web-server receives a request for data processing, analysis, or updated in real-time over the network from a centralized remote rendering from a thin client such as a web browser. A server, support multiple platforms and operating systems, prerequisite to this is user authentication, which involves the and run on almost any device including mobile phones, user providing a username/password to the server. If the pre- notebooks, tablet PCs, laptops, desktops, and HPC machines. requisite is satisfied, upon receiving the request, the server may create a process specific to the user’s session (per session The main goal of this design is to facilitate collaboration ID). A separate process per session strengthens security and among distributed users by connecting them through a offers solutions for scalability. Any subsequent requests for user-friendly, web-based system to conduct visualization and data processing are then forwarded to this process until the analysis on both real-time simulation and archived data sets session ends. At this time, the process is deleted on the server with intuitive visual output and online steering capability. side. Certain requests that do not require intensive com- Figure 2 depicts how users access the UVis client interface. puting are served directly by the web-server. For instance, It should be noted that the interface can be changed as per accessing pre-computed climatology for diagnostics is served the requirement and need of a particular organization or directly by the server. The server delivers most of the static project, as long as it uses the UVis javascript API. content to thin clients, as needed.

15 In the design of server-side analysis, we have adopted REFERENCES standard protocols and communication channels between [UVCDAT] D. Williams, A. Chaudhary, et. al. The ultra-scale visu- the client and the server. Most of the static content and alization climate data analysis tools (uv-cdat): Data analysis and visualization for geoscience data. Computer, vol. 46, some dynamic content for exploratory analysis are served no. 9, pp. 68-76, Sept. 2013 in a RESTful manner. The client can access this content by [ParaView] J. Ahrens, B. Geveci, C. Law, C. D. Johnson, C. R. invoking an AJAX call over the web. For interactive visual- Hansen, Eds. Energy 836, 717-732 (2005). ization and analysis, data is accessed via WebSockets, as it Elo Leung is a computer scientist at Lawrence provides the required flexibility and interactivity. The UVis Livermore National Laboratory. She received server-side analysis is built on top of an open-source parallel her Ph.D in bioinformatics from George remote data processing framework known as ParaViewWeb. Mason University in 2008. Her research ParaViewWeb enables communication with a ParaView interests include bioinformatics, machine server running on a remote visualization node or cluster learning, scientific visualization, and high- using a lightweight JavaScript API. Using this API, web appli- performance computing. cations can easily embed interactive 2D and 3D visualization components. Application developers can write simple Python Aashish Chaudhary is an R&D Engineer on scripts to extend the server capabilities, including to create the Scientific Computing team at Kitware. custom visualization pipelines. Essentially, we have utilized Prior to joining Kitware, he developed a this ability to extend ParaViewWeb to support the remote graphics engine and open-source tools for rendering of VCS and DV3D plots, as shown in Figure 3. In information and geo-visualization. Some of the UVis architecture, a plot on the frontend has its corre- his interests are software engineering, sponding instance on the backend. Based on the plot type rendering, and visualization requested by the frontend, UVis plot factory creates the cor- responding plot type on the backend with a specific ID for Chris Harris is an R&D Engineer at Kitware. that plot. Any subsequent calls to the newly created plot are His background includes middleware then mapped via its ID by the backend. development at IBM and working on highly- specialized, high performance, mission critical systems.

Charles Doutriaux is a senior Lawrence Livermore National Laboratory research computer scientist, where he is known for his work in climate analytics, informatics, and management systems supporting model intercomparison projects. He shares in the Figure 3: Remotely rendered VCS and DV3D plot in UVis recognition of the Intergovernmental Panel on Climate We chose Python as the binding language for the server-side Change 2007 Nobel Peace Prize. analysis. Python was the natural choice for the framework Thomas Maxwell is a lead scientist in analy- due to its support in the scientific computing community and sis and visualization at the NASA Center for widespread use in almost every field of computer science. In Climate Simulation, Goddard Space Flight addition, a Python-based platform enabled us to integrate Center. He is the developer of DV3D and a existing UV-CDAT source code on the backend with minimal collaborator in the UV-CDAT development effort. program.

CONCLUSION & REMARKS Dean N. Williams is the Analytical and In this article, we presented some of our initial work in creat- Informatics Management Systems project ing an open-source, web-based toolkit for the analysis and lead at LLNL. He is the principal investigator visualization of large climate datasets as part of the UV-CDAT for several large-scale international software project. Although we did not describe the integration of projects. UVis with the diagnostics framework in this article, it has been successfully demonstrated and deployed on a working system. The preliminary results are encouraging, as they Gerald Potter works for NASA GSFC and the have proven the usability of the toolkit in terms of its ease of University of Michigan. His current interests use and effectiveness in providing a sophisticated computing are testing software for use by the climate and visualization environment for climate scientists. We are modeling community and exploring new very thankful to the Department of Energy (DOE) and NASA ways to aid in analyzing and displaying for providing the support required for this effort. climate related data. 16 KITWARE NEWS

QUANTIFYING LUNG CANCER MARKERS The move follows the recent addition of two new employees Kitware has announced a $202,762 STTR award from the to Kitware's Santa Fe office and an increase in the number National Institutes of Health to develop a computational of meetings held with collaborators in the area. The new method for longitudinal image analysis. office location will allow Kitware to grow by an additional five employees in Santa Fe and to host larger collaborative The project is a collaboration between Kitware and three meetings. Having a larger presence in the area will improve world-class research institutions: Rochester Institute of Kitware's ability to offer local training courses on its most Technology (RIT), The University of North Carolina at Chapel popular open-source packages such as the recent CMake Hill (UNC), and University of Pittsburgh. It is co-led by Dr. course offered in March and the upcoming VTK / ParaView Nathan Cahill of RIT and Dr. Marc Niethammer of UNC course that will be offered in May. For more information Chapel Hill's Department of Computer Science. and to register for the upcoming course, visit http://training. kitware.fr/browse/56. Over this two-year project, Kitware's research will focus on the continued development of the geometric metamorpho- NEUROSURGERY SIMULATION TOOL FOR sis algorithm that it pioneered with Dr. Niethammer at UNC. AVMS This algorithm facilitates longitudinal image analysis by cap- Kitware has announced $1,932,231 in funding from the turing and quantifying pathology-specific changes regarding National Institutes of Health (NIH) to develop and vali- disease growth and infiltration, while also compensating for date its neurosurgery simulation tool for the treatment of background motion in patient scans taken over time. Most arteriovenour malformations (AVMs). This project is a col- current techniques do not distinguish diseases that spread laborative effort between Kitware, Rensselaer Polytechnic by displacing healthy tissue from diseases that spread by Institute (RPI), the Department of Computer Science and infiltrating healthy tissue; however, distinguishing those the Department of Neurosurgery at the University of North types of changes can be vital to disease diagnosis and treat- Carolina (UNC), Arizona State University (ASU), and Professor ment monitoring. Furthermore, most current techniques do Nikos Chrisochoides. not de-couple background motion (e.g., respiratory motion) from disease change. Therefore, they provide an imprecise Cerebral AVMs affect millions of people around the world. estimate of disease change. The surgical resectioning of AVMs is one of the most complex surgeries involving brain vasculature. Due to the risk and While geometric metamorphosis is applicable to the lon- complexity of AVM surgery, neurosurgeons need to be gitudinal study of nearly any type of focal pathology, this highly trained. The use of a realistic and approach-specific project will focus on one of the most challenging and impor- simulator will significantly improve the training process by tant clinical tasks: the detection and diagnosis of subtle lung allowing surgeons to have hands-on experiences without lesions that may be pre-cursor to the development of lung jeopardizing the health of patients. cancer. To pursue this clinical goal, the geometric meta- morphosis algorithm will be integrated with more accurate The project's team has extensive expertise in clinical neu- models of lung motion developed by Drs. Nathan Cahill rosurgical procedures, computational mechanics, computer and Maria Helguera at RIT. Additionally, Drs. Kyongtae Ty graphics, meshing algorithms, human factor studies, and Bae and David Fetzer, Radiology Faculty in the Department real-time simulation. Dr. Suvranu De from RPI, Dr. Dinesh of Radiology at the University of Pittsburgh, will provide Manocha from UNC, and Dr. Andinet Enquobahrie from clinical guidance and data throughout the development and Kitware are co-Principal Investigators for the project. evaluation of these techniques. For the project, the team of collaborators aims to build a KITWARE EXPANDS SANTA FE OFFICE clinically-realistic and well-validated neurosurgical simulator that can effectively model vascular structures and non-linear Kitware's Santa Fe, New Mexico, office has moved to 1800 deformations that occur during the surgical treatment Old Pecos Trail, Suite G, Santa Fe, NM 87505. The new office of AVMs. The project's technical development includes offers a larger work environment with 1600 square feet, anatomical modeling and volumetric meshing of vascular three offices, a conference room, a collaboration room, a structures. It also involves combining FEM biomechanical kitchen, and a real data closet to facilitate a high-speed modeling with fluid simulation, as well as integrating GPU- connection to Kitware's headquarters in New York. based implementations for real-time simulation.

17 VTK ACCEPTED IN GOOGLE SUMMER OF Phase I of the project, the team will develop and test a fully CODE 2014 functional, freely-distributable, open-source S/TEM package. Kitware is pleased to announce This package will incorporate a modern user interface that that the Visualization Toolkit enables the alignment and reconstruction of raw tomogra- (VTK) has been accepted to phy data. The S/TEM package will also provide advanced 3D participate in Google Summer visualization and analysis that is specifically optimized for of Code (GSoC) 2014. This is materials applications. VTK’s second acceptance to the Dr. Marcus D. Hanwell, a Technical Leader on Kitware's program, which fosters student Scientific Computing team, will serve as the Principal participation in open-source Investigator for the project. communities.

Out of 371 applications, 190 open-source projects were KITWARE HOSTS CMAKE TUTORIAL selected to be a part of GSoC 2014. The program not only Kitware hosted an on-site training course titled "Project gives students the opportunity to work on real-world soft- Lifecycle Management with the CMake Family of Tools" in ware projects with mentors in the field, but it introduces the Santa Fe, NM, on March 4, 2014. Through a set of tutorials mentoring organizations to talented new developers. and exercises, the course provided developers with an in- depth examination of how CMake works and how it can be Kitware looks forward to another productive and rewarding used to efficiently write scripts for small to larger projects. experience this summer after the success of GSoC 2011. For VTK’s participation in GSoC 2011, Tharindu De Silva’s pro- Objectives of the course included understanding the basics posal “Implement Select Algorithms from IEEE VisWeek 2010 of CMake, learning how to configure simple and complex in VTK” and David Lonie’s proposal “Chemistry Visualization” projects, becoming familiar with CMake's new advanced fea- were selected. De Silva focused on implementing a selection tures, and integrating CMake with CPack, CTest, and CDash. of the most popular algorithms from IEEE VisWeek 2010 in VTK. Lonie improved support for rendering standard mol- ecule representations. The following year, Lonie was hired as an R&D engineer on Kitware’s Scientific Computing team.

More information regarding VTK’s participation in the program can be found on http://www.google-melange.com/ gsoc/org2/google/gsoc2014/vtk, and example projects are located on the VTK GSoC 2014 Wiki page: http://www.vtk. org/Wiki/VTK/GSoC_2014.

KITWARE RECEIVES FUNDING TO DEVELOP AN OPEN-SOURCE APPLICATION USING S/TEM Kitware has announced a new Department of Energy SBIR Phase I award to develop an open-source platform for mate- rials reconstruction using scanning transmission electron microscopes (S/TEM). Scanning transmission electron microscopes have advanced NEW COMPUTER VISION WEBINARS the state-of-the-art in the field, facilitating the 3D char- Kitware hosted two live webinars in January. The first acterization of materials at the nano and mesoscale. The webinar, "A Minimum Error Vanishing Point Algorithm and importance of this type of 3D characterization has extended Its Applications," was based on the paper "A Minimum to a wide class of nanomaterials including hydrogen fuel cells, Error Vanishing Point Detection Approach for Uncalibrated solar cells, industrial catalysts, new battery materials, and Monocular Images of Man-made Environments" by Yiliang semiconductor devices. While there currently exists a large Xu, Sangmin Oh, and Anthony Hoogs. The webinar outlined quantity of capable instrumentation, the rapidly expanding the vanishing point algorithm, which was published in CVPR demand for high-resolution tomography is bottlenecked by 2013, as well as how it relates to camera calibration, surveil- software that is tailored to lower-dose, biological applica- lance, robot navigation, and scene understanding. tions rather than higher-resolution, materials applications. The second webinar, "Building Large-scale Multimedia To address this bottleneck, Kitware will collaborate with Search Engines," was based on the paper "Multimedia Event Cornell University on the SBIR project "Open-Source Detection with Multimodal Feature Fusion and Temporal Visualization and Analysis Platform for 3D Reconstructions Concept Localization" by Sangmin Oh, Scott McCloskey, Ilseo of Materials by Transmission Electron Microscopy." During Kim, Arash Vahdat, Kevin J. Cannons, Hossein Hajimirsadeghi,

18 Greg Mori, A.G. Amitha Perera, Megha Pandey, and Jason J. The team's research was recently published in the October Corso. It showcased work designed to help users find videos issue of Medical Image Analysis. In addition, the team has of queried events such as flash mobs. released the detection algorithm as part of the open-source software package TubeTK. PATHOLOGY VISIONS 2014 BEST POSTER At the 2013 Pathology Visions conference in San Antonio, Texas, Kitware's digital pathology work was recognized in Sharon E. Fox's poster "Remote Eye-Tracking for Quantitative Assessment of Whole Slide Image Viewing." Dr. Fox's poster, which was co-authored by Dr. Charles Law at Kitware Inc. and Dr. Beverly E. Faulkner-Jones at Beth Israel Deaconess Medical Center, won Best Poster by a Resident. Kitware's digital pathology work, led by Dr. Law, was leveraged for the client-server digital pathology system and supported fast web-based viewing over standard networks.

The poster details how advanced digital image software can be used to aid pathologists. For the research, Dr. Fox used a Tobii T-120 eye tracker and a client-server digital pathology system to analyze subconscious patterns of gaze and atten- tion as pathologists viewed digital whole slide images (WSI). The patterns help researchers understand how pathologists interact with WSI software, including various interface options, as part of the diagnostic decision making process. KITWARE ATTENDS INRIA INDUSTRY MEETING Members of Kitware SAS presented Kitware's expertise in visualization, data processing, and modeling at the February LOCATING ANATOMICAL STRUCTURES IN 11, 2014, Inria Industry Meeting. Inria (the French Institute ULTRASOUND IMAGES for Research in Computer Science and Automation) and In a research effort funded by the National Institutes of Lyonbiopôle held the meeting in partnership in Lyon, France. Health, Kitware teamed with InnerOptic to develop a new The meeting highlighted the relationships between data approach to help novice users analyze ultrasound images modeling, analysis, and management in the development of in order to locate specific anatomical structures. The team's health products. approach is based on developing a set of template video sequences that depict particular anatomical structures cap- KITWARE GIVES BACK TO RONALD tured by an expert user. During an examination, the video MCDONALD HOUSE CHARITIES sequence created by the novice operator is continually Kitware's Clifton Park, NY, and Carborro, NC, offices held a compared to these templates in order to identify the target fundraiser in February. The fundraiser continued Kitware's anatomical structures. tradition of supporting the needs of its communities, as all of the proceeds were donated to Ronald McDonald House One challenge faced by the research team during this effort Charities (RMHC). was access to sample clinical ultrasound video sequences. The fundraiser consisted of selling baked goods and HEARTS Although ultrasound images are readily available, the full to support the RMHC program "Help With All Your Heart." video sequences are rarely retained. Even if this data did RMHC helps seriously ill children and their families through exist, these video sequences would have been captured by programs, grants, and scholarships, as well as Ronald an expert operator and, therefore, would not accurately rep- McDonald Houses, Family Rooms, and Care Mobiles. In total, resent a video sequence captured by an inexperienced user. Kitware raised over $500 for the charity. Accordingly, the team created a new, annotated database of ultrasound videos, which were acquired on three differ- AWARDS AND PROMOTIONS ent phantom datasets. This ultrasound video database was Rusty Blue received an award for his 10 years of service at designed to mimic the challenges of clinical data without Kitware. Dr. Blue joined Kitware in January 2004 as an R&D having to request that clinicians alter their existing proto- Engineer with expertise in visualization and haptics. Dr. col in order to collect this data from patients. This video Blue has continued his contributions to the field of haptics database has been made publically available in order to at Kitware. His work has also involved 3D structured light help researchers evaluate and compare similar recognition systems for reconstructing 3D environments. In 2011, Dr. Blue approaches. became a Technical Leader on the Computer Vision team.

19 Utkarsh Ayachit has been promoted to the position of NEW EMPLOYEES Distinguished Engineer. Mr. Ayachit drives a number of Jonathan Beezley projects including SBIRs, grants, and commercial projects, Jonathan joined the Kitware team in the Clifton Park, NY, and he is the lead developer and caretaker of ParaView. Mr. office as a Scientific Computing R&D Engineer. He earned Ayachit is also the original developer of ParaViewWeb. his B.S. in Physics from the University of Nebraska at Lincoln in 2001. He later received his Ph.D. in Applied Mathematics Bob O'Bara has been promoted to Assistant Director. Mr. from the University of Colorado at Denver. Prior to joining O'Bara is leading one of the fastest growing areas at Kitware: Kitware, Jonathan worked as a Post-Doc at ERFACS and pre-processing, simulation preparation, and modeling. He is Météo-France, studying covariance modeling of deformed also well known for his customer interaction skills. stationary fields.

Aashish Chaudhary has been promoted to Technical Leader. Heather James Mr. Chaudhary has demonstrated great business develop- Heather James joined the Kitware team in the Clifton ment and project management skills. He leads Kitware's Park, NY, office as the Business Development Manager. climate data analysis and visualization efforts. She received her B.S. in Marine Science from Texas A&M University. Before becoming a part of the Kitware team, From the Business Development Team, Casey Goodlett moves Heather served as the Manager of Technology and Innovative into a Technical Leadership position. Dr. Goodlett has made Applications at UTC Aerospace Systems. She has also worked many valuable additions to Kitware over the last several for Shafer Corporation/Air Force Research Laboratory, as years including contributing to and, in many cases, leading well as Science and Technology International/BAE Systems important commercial customer relationships. Spectral Solutions.

Joachim Pouderoux, at Kitware SAS in Lyon, France, is now EMPLOYMENT OPPORTUNITIES a Technical Expert. Dr. Pouderoux has shown significant Kitware is seeking talented and motivated individuals to expertise in scientific visualization, specifically in meshing fill open positions. Interested applicants are encouraged to and rendering. He has also driven important customer visit our employment site at jobs.kitware.com and submit a relationships. resume and cover letter through our online portal.

In addition to providing readers with updates on Kitware Contributors: Lisa Avila, Jussi Pakkanen, Diego Rodriguez- product development and news pertinent to the open-source Losada, Steve Wilson, Elo Leung, Aashish Chaudhary, community, the Kitware Source delivers basic information Chris Harris, Charles Doutriaux, Thomas Maxwell, Dean N. on recent releases, upcoming changes, and technical articles Williams, Gerald Potter, and Luis Ibáñez. related to Kitware’s open-source projects. Graphic Design: Steve Jordan For an up-to-date list of Kitware's projects and to learn about areas into which the company is expanding, please Editor: Sandy McKenzie visit the open source pages on the website at http://www. kitware.com/opensource/provensolutions.html. This work is licensed under a Creative Commons Attribution 3.0 Unported License. A digital version of the Kitware Source is available in a blog format at http://www.kitware.com/source. Kitware, ParaView, CMake, KiwiViewer, and VolView are Kitware would like to encourage members of our active registered trademarks of Kitware, Inc. All other trademarks developer community to contribute to the Kitware Source. are property of their respective owners. Contributions may include a technical article that describes an enhancement made to a Kitware open-source project or successes/lessons learned via developing a product built on one or more of Kitware’s open-source projects. The Kitware Source is published by Kitware, Inc., Clifton Park, New York.

20