Book Image

Image Processing with ImageJ - Second Edition

Book Image

Image Processing with ImageJ - Second Edition

Overview of this book

Advances in image processing have been vital for the scientific and technological communities, making it possible to analyze images in greater detail than ever before. But as images become larger and more complex, advanced processing techniques are required. ImageJ is built for the modern challenges of image processing – it’s one of the key tools in its development, letting you automate basic tasks so you can focus on sophisticated, in depth analysis. This book demonstrates how to put ImageJ into practice. It outlines its key features and demonstrates how to create your own image processing applications using macros and ImageJ plugins. Once you’ve got to grips with the basics of ImageJ, you’ll then discover how to build a number of different image processing solutions. From simple tasks to advanced and automated image processing, you’ll gain confidence with this innovative and powerful tool – however and whatever you are using it for.
Table of Contents (17 chapters)
Image Processing with ImageJ Second Edition
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Preface
2
Basic Image Processing with ImageJ
Index

Configuring a fresh ImageJ installation


After installing ImageJ, it can be launched for the first time. When using ImageJ, a few settings need to be made to allow successful processing. One of the most important settings is the number of threads and memory available for ImageJ. By default, ImageJ has 512 MB of memory available. This allows for opening images up to 512 MB, which is fine for a large amount of use cases. However, with the current trends in image acquisition, files now tend to be in the range of 1 or more gigabytes. So, one of the first things is to set the memory for ImageJ to at least the size of the largest images you think you'll need to process. Fiji, on the other hand, automatically allocates 50 percent of the available system memory when installed, which can be changed if necessary.

To set the memory allocated to ImageJ, you can set find the setting for memory under Edit | Options | Memory and Threads…. You can set the maximum memory to any value that is less than the system memory. Keep in mind that on a 32-bit system, it is not possible to allocate more than 3 GB. If you wish to allocate more than 3 GB of memory, installing 64-bit ImageJ on a 64-bit operating system is required.

It is also possible to use a command-line argument to pass the memory size when starting ImageJ. To do so, run ImageJ from the command line using the following command:

javaw –Xmx1024m -cp ij.jar ij.ImageJ

This tells the computer to run ImageJ with 1024 MB (1024m) of memory. If you need more, then you can change the value of 1024m to whatever value is suitable. However, make sure that you do not use more memory than is available on your system.

Another setting that is important to verify is in the Appearance dialog. The Interpolate zoomed images option should be unchecked for image processing. This option can interfere or give misleading results when processing:

If you plan to work with images containing a lot of white pixels, it is also advisable that you change the selection color to a different value than the default Yellow. This can be done via the Colors setting in preferences. A good default value in many cases is Orange or Green.