You are viewing a read-only archive of the Blogs.Harvard network. Learn more.

Starting on the Measurement Protocol

ø

Started the day by thinking about how my new RadData database would interact with the rest of my measurement protocol. Drew myself a little sketch to show what it’ll look like, roughly. There are two major components I need to produce in the next couple of days:

1) The interface between the user and the RadData database. Clearly, the user (in other words, me) is not going to input measurements via SQL “INSERT” statements in the command line. I need to write an R program that will allow me to tell the program when I’m starting to work on a new slide, a new individual, and then write all of the relevant measurements for each individual to the database.

2) The interfaces among the camera/camera software, the image measurement software (ImageJ), and the database interface. How will data go from the camera to ImageJ, and from ImageJ to the database interface?

The Canon-to-ImageJ interface turns out to be easy; the Canon software features a “linked software” option which automatically opens the image file in a designated application upon saving the image to file. Once set up, this works beautifully—shoot an image, and it automagically opens in ImageJ.

As for getting measurements out of ImageJ and into R, it seems there’s a menu item in ImageJ for saving measurements to a tab-delimited text file, which should be readable by R. And ImageJ supports macros that could automate the save-under-filename to a simple keystroke.

Save As>Measurements…

Exports the contents of the ImageJ window as a tab-delimited text file.

Spent a little more time learning about how ImageJ macros work, and figured out how to retrieve the image filename, and save it to a text file. So that part is just about figured out. When I started trying to figure out how I would pipe the measurement values from ImageJ into R I realized I needed to plan out in much more detail what the measurement protocol would look like—how many values would be coming from ImageJ to R? Which measurements would they be? I did a good couple of hours of head-scratching, but eventually came up with a satisfying schematic sketch of what the whole process would look like.

Not a real flowchart, I know, but it gives the idea of how the thing will work—a simple text-interface R menu with a couple of options which execute a function and return to the menu after doing so. Well, now that I have this framework as a guide, I suppose I can start implementing this from the top!

previous:
RadData: Hello, World
next:
The Interface Begins to Form

Comments are closed.