Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Image Processing with ImageJ
Image Processing with ImageJ

Image Processing with ImageJ: Get familiar with one of the world's most highly regarded Digital Image processors, ImageJ. This tutorial takes you through every aspect of viewing, processing, and analysing 2D, 3D, and 4D images, clearly and comprehensively.

eBook
€13.98 €19.99
Paperback
€24.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Table of content icon View table of contents Preview book icon Preview Book

Image Processing with ImageJ

Chapter 1. Getting Started with ImageJ

Welcome to the first chapter of Image Processing with ImageJ. ImageJ is public domain multi-platform software for image analysis written in the Java programming language. It includes predefined functions for a great variety of common tasks and can be extended easily using macros, scripting in several programming languages (including JavaScript and Python), and Java plugins.

In this brief introduction, you will read what ImageJ is, and how to install it, along with some minor configuration tricks. By the end of this chapter, you will have a working ImageJ installation in your system. Contents of this chapter include:

  • A brief description of ImageJ and its main purpose

  • An installation and upgrade guide

  • How to tweak the amount of memory used by ImageJ, in case you are working with big images

ImageJ – history and motivation


Tip

Readers who wish to read a more in-depth text about ImageJ's history should obtain the paper "NIH Image to ImageJ: 25 years of image analysis", published in Nature Methods, 2012, 9:7, pages 671-675.

ImageJ's development started as long ago as 1987, when it was not even named ImageJ and Java was yet to be born. That year, Wayne Rasband started coding a piece of software named "NIH Image" (after the National Institute of Health (USA), which funded his efforts) in order to provide a way to perform image analysis on the old Apple Macintosh II, which lacked an image analysis platform, and was starting to be the desktop system of choice for many scientists. He started distributing his software for free to anyone who requested it.

This imaging software became increasingly popular, but at the time the market for Apple computers was being surpassed by the PC. NIH Image was developed specifically for Apple systems and didn't work on the Windows platform. In 1995, the Java programming language was created by Sun Microsystems. This allowed Wayne to start porting his software so it would work on PCs, and at the same time maintain a single, multi-platform version of the source code. ImageJ was born.

During the development process, a great deal of care was taken to allow users to extend ImageJ's native capabilities with the help of macros that can be developed even by users with no prior programming experience; and an open API allowed experienced programmers to code their own plugins. This is one of the reasons for ImageJ's success among scientists that work with images regularly, along with the huge amount of macros and plugins available from the web page. At the time of this writing, the ImageJ's user mailing list had more than 2000 subscribers and is a very active discussion meeting point for everything related to this software and related projects.

What ImageJ is for (and what it is not for)


If you perform a search for "imagej" on some popular academic databases (such as PubMed (http://www.ncbi.nlm.nih.gov/pubmed), IEEE Xplore (http://ieeexplore.ieee.org/), or Google Scholar (http://scholar.google.com), you will find that this software has been successfully used in a huge number of scientific papers in fields that span several disciplines, from confocal microscopy to X-ray analysis, vehicle license plate detection, ultrasound diagnosis of breast cancer, development of automatic 4D segmentation algorithms or tomographic image reconstruction, to cite just a small sample.

ImageJ is not intended to serve as a replacement for Adobe Photoshop, GIMP, or any other graphics editing program. It is less centered on layers, transparencies, cloning, or blurring, and more on quantification, filtering, measuring, and mathematical processing. This does not mean that an image cannot be modified using ImageJ, but the type of modification that ImageJ is intended to do is of a different nature than that of the programs mentioned previously.

Installing ImageJ


ImageJ is software written in the Java programming language. In order to run it, Java Runtime Environment (from now on, just Java) should be installed in your system (go to http://java.com for more information). If you do not have it installed and cannot do it for any reason, you can download several ImageJ packages that include it, but the download size will be considerably larger. The current stable version of ImageJ (1.46r at the time of this writing, though the development is fast and new versions are released almost on a weekly basis) can be downloaded from: http://imagej.nih.gov/ij/download.html. The exact package to be downloaded depends on your particular situation (what operating system are you using, whether you have administrator privileges to perform a system-wide installation, and so on).

Depending on your particular needs, you may want to download the platform-specific installer package, or simply the platform-independent version that consists of a ZIP file, that can be uncompressed and run from your user directory, or even from a USB stick. The platform-specific packages are straightforward to use and behave just like a regular application for the operating systems they are built for; there is extensive documentation regarding the particular details of the installation process for each system in the main ImageJ webpage (Windows: http://imagej.nih.gov/ij/docs/install/windows.html; Linux: http://imagej.nih.gov/ij/docs/install/linux.html; Mac OS: http://imagej.nih.gov/ij/docs/install/osx.html). In the next subsections, we will talk a bit about performing a local installation with the platform-independent file. Depending on your particular configuration, you might want to use these files, as they do not require you to have administrative privileges, and allow you to install ImageJ in any folder in your user directory.

Windows

Download the file ij146.zip (or the one currently being offered) from the download page and unzip it to the folder where ImageJ will be installed. Inside the ImageJ/ folder, double-click on ImageJ.exe. The following dialog will pop up:

The auto-configuration process is pretty straightforward, and consists basically of detecting the path to your Java installation. If the path cannot be automatically found, you will be asked to provide the location of the javaw.exe file. Once this has been done, a new ImageJ.cfg file will be created in the directory where you have unzipped the file, and ImageJ will start. This file is created only in Windows. From that point on, double clicking on ImageJ.exe runs ImageJ, and a direct shortcut can be created on the desktop or where it is useful for your purposes.

Linux / Mac OS

Just like with the Windows version, download the ij146.zip (or the most current) file. Unzip it to the desired folder and execute the run script (on Mac systems, you can also double-click on the application icon). This file just contains a call to the Java virtual machine with the necessary parameters, so the java command needs to be in the system path; in this case, there is no Java autodetection or ImageJ.cfg generation. You can safely delete ImageJ.exe, as it is a Windows-only file.

First run


If everything has gone smoothly, you will see the main ImageJ window.

The main ImageJ window shown right after the first execution. Notice both the ImageJ version and the Java version on the status line at the bottom.

The status line shows that we are running ImageJ 1.46r using Java 1.7.0 update 10 in a 64-bit system. Everything is ready for you to start processing images, but there are a couple of aspects that can be improved.

Updating the installation


As you can see on the ImageJ News webpage, new versions appear quite regularly. For this book, we installed version 1.46r, but we wanted to catch up with version 1.47q. This latest ImageJ version has new functionalities and bug fixes that may be interesting for the user. Fortunately, ImageJ has an internal update command that will allow you to perform the update process easily, and without any user intervention. Simply run the Help | Update ImageJ... command and you will get the following dialog:

As you can see, it allows us to upgrade to the latest release and to other older versions, and bleeding-edge daily builds that are of no interest here. If you click on OK, your ImageJ installation will be upgraded and then automatically closed. The new version will be used the next time you run it.

Note

When you do it at home, the version number will surely be different. Do not worry! If there is a more recent version, just update to it. It may happen that you already have the most up-to-date version. In that case, you do not need to do anything.

Configuration options


Once you have a working ImageJ installation, you might want to tweak some configuration options, such as the appearance, font size, and proxy settings. These options are easily modified using the menus Edit | Options | Fonts…, Edit | Options | Appearance…, and Edit | Options | Proxy Settings….

The next section is dedicated to explain how to tweak the one configuration parameter that might be vital during your analysis tasks: the amount of system memory available to ImageJ.

Memory limit increase

If you run Help | About ImageJ... you will get this nice image:

Along with the version (note the upgrade!), the information of ImageJ's main author, and some other data that resembles those previously commented, you can see that 4095 KB of RAM memory is used, from a total of 640 MB (less than 1 percent). Every time you open a new image, the amount of memory being used increases, until the limit is reached. Once you get to this point, an error will pop up, as ImageJ will not have the necessary resources. The error will be something like this:

If you are going to work with big images, or you need to keep open a great number of them, it is wise to increase the memory limit for your system. It can be done, as the error message states, by navigating to the Options | Memory & Threads command from the menu. This will open the following dialog:

Here, you can select the total amount of memory you want ImageJ to use. For example, we change the Maximum memory field to a value of 2048, and click on OK. A new window will inform us that ImageJ will use the new limit upon restart.

In Windows systems, this value is stored in the Image.cfg file. Another option is to edit that file before running ImageJ. These are the contents of that file in a regular installation, though the exact path may vary:

C:\Program Files\Java\jre7\bin\javaw.exe
-Xmx640m -cp ij.jar ij.ImageJ

As you can see, this is just a call to the Java Runtime Environment with the appropriate parameters to run ImageJ. -Xmx640m defines the amount of memory available for the Java virtual machine. If we change that value to -Xmx2048m, we will accomplish the same result as before. This way of changing the total amount of memory can also be used in Linux; in this case, the value is stored in the run script as another argument for the Java virtual machine. These are the typical contents of the run script upon installation:

java –Xmx512m –jar ij.jar

This script just calls the java executable with the configured memory limits, and launches the application inside the ij.jar file. This memory limit can be changed directly in the script file.

Bear in mind that, for memory amounts bigger than 2 GB, a 64-bit system and appropriate Java version is needed.

Note

It is not a good idea to give ImageJ all the available memory. Your operating system and other programs need their share too.

Summary


In this chapter, you have learned what ImageJ is, and how it can be downloaded and installed. Now, you are ready for basic image processing concepts and examples detailed in the next chapter. For further reference, you are encouraged to visit the ImageJ Information and Documentation portal at http://imagejdocu.tudor.lu/, which complements the information provided in the official webpage.

Left arrow icon Right arrow icon

Key benefits

  • Learn how to process digital images using ImageJ and deal with a variety of formats and dimensions, including 4D images
  • Understand what histograms, region of interest, or filtering means and how to analyze images easily with these tools
  • Packed with practical examples and real images, with step-by-step instructions and sample code

Description

Digital image processing is an increasingly important field across a vast array of scientific disciplines. ImageJ's long history and ever-growing user base makes it a perfect candidate for solving daily tasks involving all kinds of image analysis processes. Image Processing with ImageJ is a practical book that will guide you from the most basic analysis techniques to the fine details of implementing new functionalities through the ImageJ plugin system, all of it through the use of examples and practical cases. ImageJ is an excellent public domain imaging analysis platform that can be very easily used for almost all your image processing needs. Image Processing with ImageJ will start by showing you how to open a number of different images, become familiar with the different options, and perform simple analysis operations using the provided image samples. You will also learn how to make modifications through ImageJ filters and how to make local measurements using the selections system. You will also find the instructions necessary to record all the steps you perform so they can be saved and re-run on the same image to ensure analysis reproducibility. Finally, you will get to know some different ImageJ plugins and will learn how to implement your own.

Who is this book for?

This book is targeted at scientists, engineers, technicians, and managers, and anyone who wishes to master ImageJ for image viewing, processing, and analysis. If you are a developer, you will be able to code your own routines after you have finished reading this book. No prior knowledge of ImageJ is expected.

What you will learn

  • Install and configure ImageJ and its plugins
  • Open different image formats
  • Move around the image, zoom in and out, and obtain pixel values
  • Master the different selection tools
  • Plot the image profile and understand the histograms
  • Handle 3D and 4D images
  • Use the macro recording system
  • Create your own macros beyond the recorder
  • Build your own plugins using the ImageJ editor
  • Integrate ImageJ with the Eclipse IDE to improve the plugin development process
Estimated delivery fee Deliver to Spain

Premium delivery 7 - 10 business days

€17.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Sep 23, 2013
Length: 140 pages
Edition : 1st
Language : English
ISBN-13 : 9781783283958
Concepts :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Estimated delivery fee Deliver to Spain

Premium delivery 7 - 10 business days

€17.95
(Includes tracking information)

Product Details

Publication date : Sep 23, 2013
Length: 140 pages
Edition : 1st
Language : English
ISBN-13 : 9781783283958
Concepts :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 86.97
Android Application Programming with OpenCV
€28.99
Image Processing with ImageJ
€24.99
Image Processing with ImageJ - Second Edition
€32.99
Total 86.97 Stars icon

Table of Contents

6 Chapters
Getting Started with ImageJ Chevron down icon Chevron up icon
Basic Image Processing with ImageJ Chevron down icon Chevron up icon
Advanced Image Processing with ImageJ Chevron down icon Chevron up icon
ImageJ Macros Chevron down icon Chevron up icon
ImageJ Plugins for Users Chevron down icon Chevron up icon
ImageJ Plugins for Developers Chevron down icon Chevron up icon

Customer reviews

Most Recent
Rating distribution
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.3
(7 Ratings)
5 star 14.3%
4 star 42.9%
3 star 0%
2 star 42.9%
1 star 0%
Filter icon Filter
Most Recent

Filter reviews by




Robin Cole Feb 18, 2016
Full star icon Full star icon Empty star icon Empty star icon Empty star icon 2
A very basic introduction, pretty much what you will find on the introductory website.
Amazon Verified review Amazon
年寄りの冷や水 Jan 02, 2015
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
この本に従ってマクロの使い方などを習得することができました。
Amazon Verified review Amazon
Michael W. Konrad Jun 04, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
ImageJ is a Goodsend for a scientist who need to analyze images. This book is a clear and comprehensive introduction to ImageJ and all the plugins that you can down load for it. Worth 10X the price.
Amazon Verified review Amazon
Kindle Customer Mar 07, 2014
Full star icon Full star icon Empty star icon Empty star icon Empty star icon 2
I am somewhat disappointed. The book does not go (much) beyond what is already available in the online documentation for imageJ. I was looking for more examples, tricks and tips illustrated by examples. The book might be a convinient way to find basic information otherwise scattered online, but doesn't really add to it. Considering the low cost of the Kindle version it may still be worth it for those who don't like to hunt and pick through online resources.
Amazon Verified review Amazon
Michelle Cronin Dec 30, 2013
Full star icon Full star icon Empty star icon Empty star icon Empty star icon 2
not enough detailed info on how to really quantitate fluorescent images which is what i was hoping for. Good for someone who has never even opened image J before.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela