Apple Developer Connection
Advanced Search
Member Login Log In | Not a Member? Contact ADC

Making Medical Imaging Collaborative: OsiriX Combines Open Source with Key Apple Technologies

Medical imaging research is complex, time-consuming and often very expensive, with a wide range of standards, equipment and software available. Worse, medical researchers can find themselves unable to share data easily with colleagues—something that they need to do constantly in order to improve understanding for diagnosis and treatment.

Two enterprising medical doctors addressed this problem and came up with a Macintosh-only solution called OsiriX that is changing how many in the field examine and share scanned images, medical image data and visualizations. It’s powerful, fully integrated with many Apple applications and hardware, and it’s open source, so others can contribute to the expansion and refinement of the tool. And, it’s freely available for download and use.



Over the last 20 years, medical imaging has moved from analog to digital, a transition that has provided many benefits but has also presented new challenges. With MRI, CT, and PET scanners producing gigabyte-size images—often in sets consisting of hundreds or even thousands of images—only those doctors with access to expensive imaging workstations could make use of the scanners’ data.

In late 2003, these thoughts were foremost in the mind of Dr. Osman Ratib, professor and vice chair of information systems for the Department of Radiological Sciences at UCLA. Dr. Antoine Rosset, a radiologist from the University of Geneva and former student of Dr. Ratib, had arrived at UCLA on a one-year research fellowship, and the two of them were exploring what direction Dr. Rosset’s research should take.

According to Dr. Ratib, “We knew we had these huge data sets from CT, PET, and MRI scanners, all of which create very large volumes of data representing the whole body. Many doctors were forced to look at them in slices, but it was becoming the trend to look at these data sets in volume, to navigate through them in 3-D.

“The problem was that the tools for doing that were not available to the average person. They were available only on very high-end workstations that you purchased along with the high-end scanners. On the other hand, in the research community, there are some very good 3-D tools—VTK and ITK, for example—in open-source, but they weren’t available on a convenient, powerful, easy-to-use computing platform.”

Dr. Ratib had previously worked on Osiris, an open-source cross-platform viewer for such images, which conform to the DICOM medical imaging standard. However, Osiris was limited to viewing single images, and the medical community needed a more sophisticated tool that would enable doctors to navigate through these large data sets interactively. Drs. Ratib and Rosset decided that it was time to rewrite Osiris from scratch, this time incorporating existing open-source imaging toolkits to make an application that was comparable to the software on the high-end imaging workstations—only this application would work on commonly available personal computers and would be released as open source. Dr. Rosset, in addition to being a radiologist, also had considerable programming experience, so the two of them decided that Dr. Rosset would spend his year at UCLA writing this next-generation DICOM application.

Dr. Ratib says that there were plenty of reasons for developing this application, which they named OsiriX, on the Macintosh: “The hardware integration of the Macintosh machines is excellent, the G5 has such high-end power compared to the rest of the market, the support for OpenGL is fantastic, and the development environment is just what we need. Antoine focused on this project the entire year, taking advantage of all the latest and greatest tools and technologies that Apple provides.”

He adds that the Xcode development environment and Cocoa framework provided “the missing link” that enabled them to coordinate a variety of software technologies within a simple but powerful graphical user interface.

In less than a year, Dr. Rosset delivered the first version of OsiriX, and—since it has been released as open source—additional programmers from institutions around the world continue to add features to it; the application already has over 3000 users. OsiriX is a great success because it delivers powerful visualization tools into the hands of surgeons, referring physicians, and other care providers who would otherwise not be able to access a patient’s medical images and benefit from viewing them.

Unique Macintosh Platform Benefits

According to Dr. Ratib, “Technology coming from the market is changing the way we do things in the radiology department,” and nowhere is this more apparent than in his team’s choice of the Macintosh platform for this new version of DICOM image-viewing software. The Macintosh platform provides a rich set of resources, including both products and technologies, that enable his team to provide a far more useful application than they would otherwise be able to do on any other platform.

Because these resources are integrated into the Macintosh itself, developers can use them quicker and with much less effort than would be necessary if they attempted to use third-party products or technologies. In addition, the use of such integrated resources also results in a much better experience for users, including such advantages as increased software stability, a more coherent user interface, and fewer problems with installing and configuring the product.

iPod: Liberating Medical Images from the Computer

The first example of how OsiriX benefits from the Macintosh platform is one of its most popular features, its innovative use of the iPod.

“Our involvement with the iPod,” Dr. Ratib says, “started simply because we needed disk space. We’re routinely dealing with images that are several gigabytes in size—bigger than what you can put on a CD, flash drive, or even a DVD. I have a 40 GB iPod with a lot of free space on it, and I started manually moving these large images onto my iPod.

“Then we got the idea, ‘Why not make it like iTunes?’ So we modified OsiriX so that whenever we dock our iPod with the Mac, OsiriX searches it for DICOM images and imports them automatically. We also made it so that you can export images to an iPod directly from within the OsiriX program with just a single mouse click.”

The introduction of the iPod photo gave Dr. Ratib an idea that made OsiriX into a tool for facilitating collaboration. “We modified OsiriX a little bit, so now you can push the images through iPhoto to the iPod and display them on the iPod Photo screen or on a television. We even have a way to make movies from your data so you can show rotating 3-D visualizations straight from the iPod, without even having a Macintosh present. This has a major impact on clinical use, and in particular, on the academic environment, because it gives you the ability to share and communicate very large data sets by just putting them on a device that you can carry in your pocket.”

iChat AV: Teleconferencing Made Easy

Dr. Ratib explains how iChat AV led to the creation of an OsiriX feature that gives users an important collaborative benefit they can’t get anywhere else. “I’ve been in IT for years and have spent a lot of time trying to set up teleconferencing for remote consultations. It’s difficult—you have to manage specialized hardware and software. Then there’s working with ISDN or DSL, dealing with service providers, setting up a session, and all that.

“With iChat AV, it’s simple. And all we had to do to OsiriX was reuse some code from an open-source project that feeds the output from OsiriX into the iChat video stream. The person you’re talking to sees the image from OsiriX just like it had come from the iChat camera. With iChat and OsiriX , it’s very easy to create a remote consultation with anyone in the world.”

iDisk: Making It Easy for OsiriX Users to Share

Another way in which OsiriX became a tool for facilitating collaboration is its use of Apple’s online data storage service, iDisk (included with the .Mac service). Because iDisk was designed to be an integral part of every Macintosh computer, Dr. Ratib’s team had no trouble adding a toolbar icon to OsiriX that enables users to send image data sets to or receive them from a given iDisk with a single mouse click. Because iDisk is built into the Macintosh architecture, adding this feature was much easier than it would have been had the team tried to interface with some Internet-based storage system. Also, the link with iDisk is much less likely to malfunction, and it provides a much better experience for users.

By making filesharing easy for both the sender and receiver, OsiriX makes it possible for any doctor, radiologist, or other care provider to collaborate over the telephone while viewing the same images, thereby increasing the quality of patient care. (Windows users can download iDisk images using FTP.)

Dr. Ratib says that even improves the doctors’ quality of life: “Doctors love this because they can push their images to iDisk and then retrieve them from the Macs they have at home.”

OsiriX also provides the important function of data anonymization—stripping patient demographic information from an image data set to facilitate data sharing without compromising patient confidentiality. So you can see the data, without knowing who the patient is.

QuickTime VR: Sharing the Fruits of Visualization

One of the most important features of OsiriX is its ability to transform the many two-dimensional image “slices” that are output from an MRI or other imaging scanner into a virtual three-dimensional representation of the data set that can be viewed from multiple angles. The high-end workstations were, until OsiriX, the only way that care providers could view these 3-D renditions of the scanner’s data. Unfortunately, when the care providers wanted to share such interactive visualizations, their only choice was to export the image data in AVI format. An AVI file stores its data as a linear sequence of two-dimensional images. Such a file plays back as a non-interactive animation showing a fixed “flight path” around or through the virtual 3-D representation.

Because OsiriX is implemented on the Macintosh platform, the OsiriX team was able to add the ability to export the 3-D visualizations it creates as QuickTime VR files. These files, viewable using either the Macintosh or Windows versions of the QuickTime Player, enable users to rotate the stored 3-D objects interactively along any combination of axes.

Interactive 3-D visualizations stored as QuickTime VR files give users a richer, more intuitive experience of three-dimensional data. Care providers can use OsiriX to explore multiple interpretations of the same data set, then export as many of them as they wish to QuickTime VR files, which can be shared in meetings or sent to colleagues via e-mail.

Dr. Ratib says that OsiriX’s QuickTime VR feature was easy to implement and that doing so provided OsiriX with a feature that has been very popular in the medical community. OsiriX visualizations that are shared using QuickTime VR increase the usefulness of existing data, as well as make it available to more people.

Furthermore, it is a feature that the medical community has never had before: “None of the high-end vendors have features that allow you to do virtual reality, in such an easy and inexpensive way, but OsiriX does.”

Xcode and Cocoa: Allowing Small Teams to Do the Impossible

Dr. Ratib credits Apple’s development environment for making it possible to create powerful applications quickly, even with small development teams. “Xcode and Cocoa are amazing. It’s obvious that we couldn’t have created anything close to OsiriX if we had used a traditional programming environment. They allowed us to move very, very quickly during development, in a way that we couldn’t have envisioned doing otherwise.”

Dr. Ratib says that the Apple development environment helped Dr. Rosset finish OsiriX faster. “Every day, Antoine was raving about how Xcode made development simple for him. Antoine has done development projects on other platforms, and he knows what’s different between a conventional C++ development environment and Xcode. Everything on the platform is integrated with Xcode, you get to work with a graphical user interface, and the entire debugging environment is just amazing.”

Multiprocessor Support and Xgrid: Higher Performance, Automatically

When Drs. Ratib and Rosset were designing OsiriX, they knew that it was important that the application be coded so that it could execute multiple image-processing threads simultaneously. By doing this, OsiriX could automatically take advantage of today’s two-processor Macintosh computers, as well as all future Macintosh models with multiple processors.

By following Apple’s guidelines for creating multithreaded applications, Dr. Ratib says, OsiriX will be able to leverage Apple’s vision for multiprocessor and grid computing.

“That’s the beauty of using the Macintosh platform—we don’t have to do specialized programming, because Apple has done that for us. All we had to do was make sure that OsiriX was compatible with Apple multithreading and multitasking. Because we did that, OsiriX will work on a two-processor G5 Macintosh, or a 10-processor cluster, or a 20-processor grid.”

He adds that the development team plans to integrate OsiriX with Apple’s Xgrid technology. This will enable users who work at sites with multiple Macintosh computers to harness the other computers’ idle time, thus enabling OsiriX to run faster. This is particularly useful for the creation of high-resolution QuickTime VR movies, which can take several hours to render on a single Macintosh computer.

For more information on OsiriX, see the OsiriX website.