Medical Image Viewer

Here's my latest team project: a system for displaying x-rays, CT scans, MRI scans... whatever! Just point it to a directory with folders of images, and it's ready to go.

I was part of a team of four for this, and it was all written in Java. The goal was to create a clean, solid design.  As far as implementation goes, I created the foundation for a Command pattern (with "undo" functionality") and the system for saving/restoring display preferences (serialization isn't too bad at all!).

Also, if I'm now best friends with Draw.io. Free and functional diagram creating, and in "the cloud"? Mmmm.

Here's a big ol' class diagram:

We played with a bunch of classic design patterns. To the informed, these are not innovative by any means, but I feel their implementation is clean and effective.

Commands for changing display mode (showing one image at a time, or four, or showing the reconstruction view) and our window manipulations (more on that later).

Memento pattern for separating out the data that needs to be stored, the display preferences (DisplayState).

Composite (sort of) for the option of nesting Studies (collections of images) within other Studies. I say "sort of" because Images and Studies don't share an interface/abstract class.

 

One of the program's most basic features is to just present images like a slideshow. So we have a two main modes for that: mono and quad.

 

And it gets more interesting with the Reconstruction view. Given a collection of sequential scans - "slices" of a brain, in this case - it can generate images from different angles. The top left image is the original, while the other two are the reconstructions. Lines on the original images also serve as reference to where the reconstructions are being made.

Lastly, the windowing feature is for some basic image manipulation: setting limits for the darkest and lightest color. So, here's a "before" image:

And then "Window Manipulation" brings up these settings:

And then you get this:

Notice how the lungs are whited out, but those wiggly things above the lung are more defined. That's the idea: to modify the image to more clearly see some details.

Anyway, I was very happy with how this project turned out! Thanks for reading!

CodeBrian Martone