This little project was developed by Rein Ytterberg (Project Manager) and Emma Söderberg (SW Developer) in 2003, for the Wallenberg Laboratory in Lund, Sweden. View Rein Ytterberg's profile
The objective was to track changes in blood vessels, seen through a microscope with a top mounted Axis 200+ net camera. The vessels were dipped into a bath, and various substances added during the experiments. The researchers wanted to know if, and when, the vessel started to contract. The problem was the long time, sometimes hours, that could pass before anything happened, and when the contraction started, it went very quick. This kept the staff occupied, wasting lot of time, as new tests were started several times every week.
We decided to use Linux as operating system and Java as programming language. This gave both stability and portability. We could easily utilize lots of free and open source tools, and connect to them via shell scripts. Thus we didn't have to write our own code for peripheral tasks such as e-mail notifications, backups etc. And we could also schedule processes via the cron feature. The Linux distro we used was Mandrake. Emma also did the graphical design.
So what about the project name, Mary? Well, as it had to do with blood, and Rein's favorite drinks is Bloody Mary, the name Mary came up quite natural!
A short summary of how to use the application:
First, the vessel is lowered into the bath and the microscope focused on it. Then, in the program, a new project is opened and given a name. Here it is also possible to tell what to do at end, and when a change is detected. This is typically done by calling a shell script.
Second step is to set markers in the image. The user draws lines between points between each side of the vessel. The program tracks the image of the vessel and adjusts the lines as the vessel moves. The user also has to tell how much a line can change until an action is triggered.
Once the program is started, not much needs to be done, until the program calls the user's attention (or until the deadline is reached). The user typically adds substances into the liquid and might have to adjust the focus sometimes. It is also possible to add comments at any time (these will be connected to the captured images and also go into the log).
Mary takes new images with a set interval, which us usually about one second to catch the vessel contraction event. This means the disk soon gets full. But Mary is smart enough to discard images of no interest as it runs.
Finally, here are a few screenshots from the program, and some of the blood vessel pictures.
The logos. The orange one was the first, designed by Rein. It was replaced by the blue one later, designed by Emma. | |
The banners. The initial one to the left. The new (Emma's design) to the right. | |
Screen dump during startup | |
Calibration dialog | |
Here, the user can select scripts to be run in given situation. | |
Each test is first given a unique ID, and a directory is selected for storage of images and the log file. The time frames, image capture interval and a few other parameters may also be set. | |
At any point, the user would add substances to the bath, and can also add a comment about it which goes into the log. | |
Any comment can be added at any time. | |
During the run, tha status, last image, log and other facts are shown. The two greens lines are the markers that was set initially by the user. Their lengths are adjusted automatically and logged as the blood vessel flexes. | |
This image shows how to set the markers (no vessel shown in this picture). The blue marker is already set, the new, green, marker is about to be set. | |
A blood vessel captured at three different intervals. |
© Rein Ytterberg and the Wallenberg Laoratories