Showing posts with label ImageJ. Show all posts
Showing posts with label ImageJ. Show all posts

Monday, March 23, 2009

Bone-ing Up on Allometry

ResearchBlogging.orgAllometric scaling - roughly defined, when different parts of an organism grow at different rates - is an important factor in biology. In part, allometry describes how babies have relatively larger heads than adults (we exhibit negative allometry in this trait, because our skulls don't grow as quickly as the rest of the body) or how some crabs have gigantic claws (an example of positive allometry, in which the claw grows much faster than the rest of the body). Allometry (and its counterpart isometry, in which proportions don't change at all) can be examined on an intraspecific level, such as the example in humans, or on an interspecific level.

It's not cute - it's allometric!
Toronja Azul, Chihuahua Puppy, 5 August 2007 via Wikimedia Commons, Creative Commons Attribution 2.0


For paleontologists and biologists, allometry and isometry are particularly interesting when it comes to understanding groups with large ranges in body size. When you grow a Tyrannosaurus from an Eoraptor-like ancestor, what has to change in order to support the body mass? Sometimes it's postural - big animals tend to have more "columnar" posture (with the supporting legs straight beneath the body) and small animals tend to have more "flexed" posture. In other cases, it's allometric - big animals might tend to have relatively thicker bones than small animals. Sometimes, it might even be both. And sometimes, none of these comfortable patterns seem to fit perfectly.

Looking at Cats
Regardless of the patterns (and often because of them), scaling studies of limb bones have attracted a lot of ink over the years. A recent contribution, authored by Michael Doube and colleagues, appeared the other week in the open access journal PLoS ONE. Their paper, entitled "Three-dimensional geometric analysis of felid limb bone allometry," takes a novel peek at how different limb bones scale within cats. Cats are a particularly interesting study subject, because they span a range of adult body masses - from as little as 3 kg in the domesticated cat to 306 kg in the largest tiger.

Domesticated cat (left) and lion skeletons, scaled to roughly the same height at the shoulders.

Limb bone allometry in its own right is an interesting, but rather conventional, topic. Most studies are content to take some linear measurements, or perhaps a cross-section or two, for a range of species. Doube and colleagues did something unique - they examined the three-dimensional properties of entire limb bones, as well as two-dimensional properties in series along the entire bone, using CT scans coupled with custom-written software macros.

The macros (which are one of the really cool things about this paper, and a big reason for why I'm highlighting it here) calculate a variety of cross-sectional properties automatically from CT scan data. Previous macros (such as the very useful MomentMacroJ) required a human operator to do things one slice at a time. Believe me, this can take forever for a limb bone data set of 200 CT slices. The authors of the paper in question were able to quickly and efficiently assemble data sets for a variety of measurements from a variety of limb bones for a variety of felid species - over 16,000 CT slices in total! So, this allowed compilation of a database for measurements throughout the bone - not just at the boring old mid-shaft. Furthermore, they calculated joint geometries (through a sphere-fitting routine, to approximate surface area of certain joints) as well as moments of inertia for entire bones.

This data set allowed the authors to get one of the the most complete pictures of limb bone properties ever assembled. In general, cross-sectional properties at mid-shaft (a standard location for measurement) did not differ significantly from isometry (i.e., big cat bones look the same as little cat bones). Of course, a larger sample might achieve statistical significance at P less than 0.05 (results are suggestive, but don't differ significantly from isometry). Interestingly, joint surfaces and moments of inertia tend to scale with positive allometry. In other words, big cats have relatively bigger joints and beefier bones (a more thorough and accurate explanation of moments of inertia is beyond the scope of this post) than do small cats.

So why are these results interesting? Well, it appears that cats "get big" differently from other animals. Whereas comparably sized mammals tend to change from flexed limb postures to more columnar limb postures as body size increases, cats apparently maintain a relatively flexed posture across their size range. Instead, cats compensate for the change in body mass by beefing up their bones. Skeletal and postural responses to increased body size are pretty darned diverse, and there is no "one size-fits-all" solution. It will be very interesting to see broader applications of this methodology.

Open Source Solutions
The authors used ImageJ, an open source image processing system (detailed in a previous post here) for much of their data collection. The macro they wrote and used is also freely available with their paper--so feel free to try it out with your own data. Their massive datafiles were collated with MySQL, and the statistical analysis was conducted within R, using the SMATR package for regression analysis. So, it was an open source project from start to finish! As the cherry on top of the cake, publication in PLoS ONE means that the paper is easily and freely accessible to all. I've already made a few notes on the paper, with quick and gracious responses from one of the authors. If you have anything to add to the discussion, don't be shy!

Further Reading
If you're interested in more open source solutions to these sorts of problems, check out lead author Michael Doube's web page. He's got lots of macros, pretty pictures, and other goodies for enjoyment and download.

The Citation
Doube, M., Wiktorowicz-Conroy, A., Christiansen, P., Hutchinson, J., & Shefelbine, S. (2009). Three-dimensional geometric analysis of felid limb bone allometry. PLoS ONE, 4 (3) DOI: 10.1371/journal.pone.0004742

Monday, March 31, 2008

Image Your World With ImageJ

ImageJ is probably one of the most universally-useful, open source programs available for scientists. This is a program designed for image analysis, whether you want to count points, generate an "x-ray" image from CT scan data, calculate moments of area, or measure the length and area of a feature on a photograph.

The "J" in ImageJ stands for "Java" - that platform-independent programming language. This means that you can run ImageJ on virtually any operating system. If you don't have a Java virtual machine installed (and most every system comes with one - if you don't have it, you'll find out when you can't run ImageJ!), the program's website allows you to download a copy with your installation of ImageJ. The only potential downside of running under Java is a small sacrifice in program performance in some situations.

Why Use ImageJ?
The real power of ImageJ lies in its extendability and its updatability. Updates are released for the program every week or two - these usually aren't just bug fixes, but real interface and functional improvements. Furthermore, there are scads of plug-ins and macros available. Want to import DICOM stacks more efficiently? Use a plug-in! Want to measure second moments of area? There's a macro for that! Can't find a macro to do what you want? Write one of your own!

I use two main features in ImageJ: the measurement tools and the stack tools. The measurement tools allow me to measure distances, areas, and other parameters, and I can calibrate these using a scale bar from within the photo. The stack tools are also quite handy for working with CT scan data. I use them to reslice my images in various orientations (say I have a coronal series, and want to look at another view) or to generate quick 3D volume renderings. Other programs (e.g., 3D Slicer) are better for dedicated CT work, but ImageJ is fantastic for quick-and-dirty CT data manipulation. Furthermore, the interface is simple and relatively easy to navigate.

Commercial Alternatives
Probably the closest commercial equivalent to ImageJ is SigmaScan. I used this program a few years back, so I can make at least a superficial comparison. As far as I can tell, the primary benefit of SigmaScan over ImageJ is that the former allows you to save the tracings you've made for area measurements (at least, this is a feature I found handy). A dedicated user would know other unique features, but then again ImageJ doesn't cost nearly $1,000 on academic discount.

Minor Drawbacks
There are a few limitations to ImageJ of which users should be aware. If you're going to deal with large stacks of images (such as a CT scan), you may bump up against problems in the default memory configuration for the program. Fortunately, this is usually resolved by a simple tweak of the initialization file. Also, it is important to remember that ImageJ is for image analysis, not image editing. A few tools within ImageJ (paintbrush, paint bucket, etc.) can help in this regard, but you're really better off going to GIMP for most image editing tasks. And, as mentioned above, you can't directly save and reload any selection boundaries that you might make for measuring area (if you want to remeasure the same area later).

The Bottom Line
All in all, if you measure images or work with CT slices, you want ImageJ on your computer.

Note: I forgot to mention in my initial post two other popular options - NIH Image and Scion Image, available for Mac and Windows, respectively. They have both largely been superseded by ImageJ (and were really precursors to it), but I just want to be complete.