Run SliceViewer

Read a thorough analysis of the User Interface

Learn how to use SliceViewer on your own data

See technical details of the code

Download a zip of the SliceViewer class files, Java code, and sample data


SliceViewer displays a 2D slice though a 3D block of data. This is useful medically for examining MRI data, CAT-scan data, or any time you want to carefully analyze 3D data. The program is quite interactive, allowing the user to rotate, translate, and zoom in on the block. Written completely in Java, it is portable to any platform.

Orion Lawlor originally wrote this program as part of the UMAP Journal's Mathematical Competition in Modelling. The extensive and excessively technical documentation is a result of my efforts there. If you have further questions or suggestions, feel free to write me at


In medicine, to better diagnose disease it is often useful to examine the inside of the body. While conventional x-rays have provided a two-dimensional (2D) means of viewing the inner workings of the body for more than 50 years, in recent decades more sophisticated three-dimensional (3D) imaging techniques have come upon the scene.

One method for producing 3D images of the human anatomy is a technique known as Magnetic Resonance Imaging (MRI). This powerful tool has allowed physicians the capability to diagnose disease and plan courses of treatments in ways previously unimagined.

Capturing 3D medical data is only one step in the diagnosis procedure, however. Since our eyes can only directly perceive two dimensions at once, this 3D data must be mapped into 2D for medical technicians to interpret it. One common technique for reducing 3D to 2D is to view a planar "slice" of the 3D data.

Orthogonal image planes parallel to any of the three Cartesian coordinate system axes are easy to slice. However, not every medical problem lies along one of the Cartesian axes, so in medicine it is often necessary to cut an oblique slice through the 3D block of data.

The program presented here cuts a 2D slice, at any orientation, out of a 3D block of data. This process is performed at interactive speed using the mouse, and the resulting slice is interactivly displayed. It is hoped that this technique will allow for easier diagnosis of disease.