OS/2 eZine - http://www.os2ezine.com
Spacer
October 16, 2004
 
Isaac Leung (P.Eng.) got a degree in Engineering Physics followed by a Master's in Electrical Engineering after which he promptly got a job as a product engineer at a company which makes high speed datacom chips. He is old enough to have cut his computer teeth on Commodore 64's and first played with OS/2 1.3 EE while at a summer job with IBM. The first PC he ever owned came with Windows 95, but he soon slapped on OS/2 Warp 3 and has been Warping ever since. He has agreed to work for Transmeta while he continues plotting to take over the world.
If you have a comment about the content of this article, please feel free to vent in the OS/2 e-Zine discussion forums.

There is also a Printer Friendly version of this page.



Spacer
Previous Article
Home
Next Article


Advertise with OS/2 e-Zine


ImageJ

ImageJ Splash Screen
Here's a graphic related program that is a little bit different from what you're used to. It is not primarily intended to be an application to create original artwork, though in a pinch you could use it to create simple drawings. Nor is it an image viewer along the lines of PMView. Probably the best way to describe this thing is that it is an all-purpose image processing program. It is easily extensible via various plugins.


Download and Installation

ImageJ is free, period. (As you might expect since it seems to come from a US National Institute of Health (NIH) website, a publicly funded institution). The base application comes in at less than 1MB and is a Java program. Java 1.1.8 will do just fine. You can download ImageJ from the ImageJ website. The latest version (as of the time of writing) is 1.32, but if you want, you can try and early beta. I'm using 1.33h without any problems so far.

While you're at it, you can also grab the ImageJ documentation (6MB) and also some sample images (4.7MB). The last isn't really necessary since if you're on-line, ImageJ is capable of grabbing these itself when you ask for them.

There really is not much of an installation to speak of. Just put ImageJ in some directory that you choose. You can then start up ImageJ via the command-line each time or make a .CMD file to do so. I used this in my .CMD file:

jre -cp ij.jar ij.ImageJ
Yes, that's it. Very straightforward and simple.

Performance

One feature that is boasted about is it's speed. Even on startup, this thing is fast, Including starting up the Java 1.1.8 JVM, it's at least as fast, if not faster, than any native application.

On the web site, it even boasts that it will filter 40 million operations per second. And that's with Microsoft's lousy 1.1.4 JVM! The reason for this boast will become clearer as you see what this application is meant to do.

Using ImageJ

Starting up ImageJ will get you a very simple main screen.
ImageJ Main Screen

You'll notice there is no canvas to start with. That's not its purpose in life. If you feel like drawing, simply go to "File->New" and you'll be presented with a dialog to setup a blank canvas with which you can start drawing (but be sure to set the drawing colour first, or you'll get nothing. By default it seems to be white, the same as background colour). The drawing tools are sort of like vector-based applications. You can re-size, re-shape and move your objects all you want. But as soon as you use the left-click pop-up menu and select "Draw", the object is painted on like any bitmap paint program.
Drawing Sample

Not the greatest, but as I mentioned, that's not the main purpose of ImageJ. What you typically will want to do is start with an existing image. ImageJ will handle a variety of formats, including TIFF, JPG, GIF, DICOM (a medical imaging format) and many others. After you load it up, you can perform various manipulations to it, such as smoothing, sharpening, edge-enhancement, etc. Many of these you will already find in image viewing utilities such as PMView. However, ImageJ goes many steps further and provides ability to perform FFT (Fast Fourier Transform), de-speckling, histogram analysis, particle analysis and many other obscure (okay, perhaps obscure to your average computer user, these are all very common to image processing) functions. Nevertheless, many of these can become very useful to your average user, especially for digital photos, once you learn not to be scared of them. ImageJ makes it easier, because you don't have to know how or why a particular function works, just that it does.

To give a simple example of what ImageJ can do (though one that most people won't do), you can start with a gel image (you know, those DNA sample images you see on TV?). It typically looks something like this:
Gel image

I've used the rectangular selection tool (funny tool, you can use it to draw rectangles, or a selection tool) to highlight a particular region. Using the appropriate functions under "Analyze->Gels", you can then obtain a cross-section of the lane of interest.
Gel lane

This is a plot of the relative darkness of each region. From this, you can then procede to do some quantitative analysis. That's one of the primary differences between ImageJ and some other application such as Colorworks or Photoshop. The latter is designed to make nice looking images. On the other hand, image analysis can often require that you make specific, objective measurements on images. (Though that's not to say it cannot make your pictures look better).
Fluorescent Cell

As you can see, scientists sometimes work with very nice images. The above snap is one of the included samples, and is a picture of some cells taken with fluorescent imaging which can help to highlight specific structures within a cell.

ImageJ is also capable of animation (look under "Plugins->Demos->Plasma for a simple example) and "stacks" of images.
ImageJ MRI Stack

This one is more interesting if you view it using ImageJ, for it is not a single image, but a cross-section of a head (don't worry, it's MRI and harmless, as far as we know. I've a few MRI's of my own head). By scrolling through the stack, you can view progressive slices of the head from top to bottom.

Plugins and more...

However, ImageJ is not used soley for biological applications (the samples are likely just a by-product of where it was original developed). You can also use it as a plotting application.
ImageJ PlotPlot Data

As you can see, if given a list of data, it is quite capable of making plots, even with error bars. (This is a little trick that 1-2-3 or Mesa cannot handle, you'll need to resort to gnuplot, possibly OpenOffice or XACT). And if you need to figure our what your data is doing? No problem. There is already some facilities built in for curve fitting.
ImageJ Plot FitFit Stats

You can have simple 2nd order polynomial fits, up to 4th order, logarithmic, exponential, gamma and others. You even get simple statistics about the goodness of fit.

You can also perform operations on several images (e.g. add, subtract and logical operationgs). You can obtain an image histogram (this can be useful in determining if your digital photos are saturated or not, and you can then take action to attempt to correct this). There are many others, too numerous to mention. You really need to play with it yourself and see what tools are useful for your particular application.

If you still can't find what you need in the base application, ImageJ is extensible using plugins. You can make your own, or head over to the on-line list of plugins. You'll see a vast list. There is a simple plugin to enable "paintbrush" type painting, to Quicktime Movie Players, TWAIN, camera acquisition to particle remover, cell outliner, image morphing, EXIF readers and much, much more. As you can see, some of the plugins can be useful for your own digital images, even if you're not a scientist.

Conclusion

It's quite difficult to do a thorough review of ImageJ, simply because depending on which plugins are used and for which application, everything could be completely different. The "core" application of ImageJ seems to be solid. It's fast and easy to use, and completely free.

While at first it seems like something that "hard core" scientists or engineers, it doesn't mean that there isn't anything here for the average computer user. If you wanted to put some text annotation on you digital photographs, ImageJ can easily handle that. If you have some old photographs that you have scanned in and need some touching up, there is perhaps no more powerful tool for the job! ImageJ will perform objective corrections, most of which are generally reversible.

Since it's free and it takes such a small amount of disk space (you could probably just put it on a single 1.44MB floppy disk!), it's hard to imagine why you would not want this in your arsenal of tools, just in case.

As always, it probably never hurt to thank the author for his contribution and let him know that you're using OS/2 or eCS!


Related Links



Previous Article
Home
Next Article

Copyright (C) 2004. All Rights Reserved.