Image Processing with ImageJ - José María Mateos-Pérez - E-Book

Image Processing with ImageJ E-Book

José María Mateos-Pérez

0,0
23,99 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

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.

Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:

EPUB
MOBI

Seitenzahl: 172

Veröffentlichungsjahr: 2013

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Table of Contents

Image Processing with ImageJ
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Getting Started with ImageJ
ImageJ – history and motivation
What ImageJ is for (and what it is not for)
Installing ImageJ
Windows
Linux / Mac OS
First run
Updating the installation
Configuration options
Memory limit increase
Summary
2. Basic Image Processing with ImageJ
Image reading/writing
Opening images with a certain format
Reading raw data
Online sample images
Saving images
Zooming on the image and pixel values
Color and multichannel images
3D and 4D images – stacks and hyperstacks
Image adjust tools
Image histogram and window/level parameters
Thresholding
Image resizing
Summary
3. Advanced Image Processing with ImageJ
Selecting regions of your image
Basic selections – lines, length, and profiles
Drawing regions of interest over an area
The ROI manager and the image overlay
Filters
Image filtering in the spatial domain
Edge detection
The Fourier transform
Image filtering in the frequency domain
Particle analysis
Summary
4. ImageJ Macros
What is an ImageJ macro
The macro recorder
Running macros
Modifying a recorded macro
More about the macro language – basic syntax and operators
Variables
A brief note on debugging a macro
Control structures
The for loop
The while loop
The if (condition) and if (condition) … else statements
Defining functions
Some useful procedures
Opening an image from a macro
Finding out how many images are open
Obtaining the dimensions of an image
A note on slices, frames, and channels
Selecting a specific image
Speeding up a macro
Adding a GUI to your macro
The batch mode
Installing macros for easy access
Shared macros – the ImageJ macro directory
Summary
5. ImageJ Plugins for Users
ImageJ plugins
Installing a plugin
Some useful plugins
LOCI Bio-Formats
Image segmentation
Auto Threshold and Auto Local Threshold
The trainable Weka segmentation
SIOX (Simple Interactive Object Extraction)
Clustering
Image registration
Stackreg
3D volume rendering
Volume Viewer
Other utilities
MosaicJ
FigureJ
Study anonymization
FIJI (Fiji Is Not ImageJ)
Summary
6. ImageJ Plugins for Developers
A sample plugin
The PlugInFilter interface
Adding a GUI to your plugin
The ImageJ plugin API
Setting up ImageJ under the Eclipse IDE
Our first Eclipse ImageJ plugin
Sharing your plugin
Using external libraries
Summary
Index

Image Processing with ImageJ

Image Processing with ImageJ

Copyright © 2013 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

First published: September 2013

Production Reference: 1160913

Published by Packt Publishing Ltd.

Livery Place

35 Livery Street

Birmingham B3 2PB, UK..

ISBN 978-1-78328-395-8

www.packtpub.com

Cover Image by Aniket Sawant (<[email protected]>)

Credits

Authors

José María Mateos Pérez

Javier Pascau

Reviewers

Cristina Chavarrías

Ron DeSpain

Dr M Partridge

Acquisition Editor

Rubal Kaur

Commissioning Editor

Yogesh Dalvi

Technical Editor

Krishnaveni Haridas

Project Coordinator

Esha Thakker

Proofreader

Mario Cecere

Indexer

Monica Ajmera Mehta

Graphics

Abhinash Sahu

Production Coordinator

Shantanu Zagade

Cover Work

Shantanu Zagade

About the Authors

José María Mateos Pérez is a Spanish researcher and a Ph.D. student in the Medical Imaging Laboratory of the Hospital General Universitario Gregorio Marañón (http://image.hggm.es), in Madrid, where his main research lines deal with automatic segmentation and kinetic analysis modeling of dynamic nuclear imaging sequences. He has also been an experienced ImageJ user and has developed several macros and plugins. One of them, jClustering, has been published in PLOS ONE, a peer-reviewed journal. When he has enough time to procrastinate, he also likes to develop data analysis tools in Python and R.

I would like to thank María for her support during the writing of this book. Also, I feel the need to mention The Army of Small Animals that live or lived in our house. They are a force for good.

Javier Pascau received his Ph.D. from Polytechnic University in Madrid, in 2006, and is currently a visiting professor at Carlos III University in Madrid. He has been a part of the Biomedical Imaging and Instrumentation Group, a research laboratory with a multidisciplinary team of engineers, physicists, biologists, and physicians located both in the university and Hospital General Universitario Gregorio Marañón, (biig.uc3m.es). His research and teaching cover areas such as medical image processing, analysis, quantification, and multimodal registration, both in preclinical and clinical environments. He has been involved in the development of small animal PET and CT devices, and in the last few years he has led several projects on intraoperative radiation therapy and image guided surgery. He has authored more than 30 papers, published in peer-reviewed journals over the last 13 years.

I want to thank all my colleagues at the university and the hospital, since my knowledge on image processing is the result of multiple interactions in this multidisciplinary environment. Special thanks 
to my family and to my tireless coauthor, who has lead this 
common work.

About the Reviewers

Cristina Chavarrías is a telecommunications engineer specialized in medical imaging, in general, and magnetic resonance imaging (MRI), in particular. Her background reaches other imaging modalities and techniques such as nuclear imaging, computed tomography or spectroscopy, and ranges from data acquisition, preprocessing and correction to image processing. Despite being a junior researcher, she has been working for seven years in the Medical Imaging Laboratory at Hospital Gregorio Marañón, which offers a privileged view over the latest imaging challenges and allows direct contact with the clinical practice.

Ron DeSpain has been a physicist with over 45 years of experience working for major aerospace and defense companies. Ron has used ImageJ for advanced scientific algorithm development, since it was made available on Macintosh in the early 1990s. Since then it has been rewritten in Java and now runs on all major computers that support the Java virtual machine, making it his program of choice due to its powerful and versatile rapid development environment for signal imagery and video analysis applications. He has developed applications in intelligence analysis, missile guidance, target detection and recognition, 2D/3D imaging, automatic graph reading, remote sensing, sensor fusion, machine vision, image & video analysis, robotics, medical imaging, ultrasonic, x-ray, eddy current, and IR testing and manufacturing automation for more than 20 years.

Dr M Partridge did his BSc in biochemistry from Lancaster university before spending a number of years working for Mediwatch Biomedical, developing a range of point-of-care sensor systems. He then left Mediwatch to join the Cranfield University, where he obtained a Ph.D. in molecular coatings of fibre optic sensors and continued work as a researcher developing a number of optical sensors systems. Matthew's current research is focused on the development of optical sensors both biological applications such as point-of-care testing and industrial VOS sensor systems.

www.PacktPub.com

Support files, eBooks, discount offers and more

You might want to visit www.PacktPub.com for support files and downloads related to your book.

Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at <[email protected]> for more details.

At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.

http://PacktLib.PacktPub.com

Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can access, read and search across Packt's entire library of books. 

Why Subscribe?

Fully searchable across every book published by PacktCopy and paste, print and bookmark contentOn demand and accessible via web browser

Free Access for Packt account holders

If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books. Simply use your login credentials for immediate access.

Preface

Welcome to Image Processing with ImageJ. Whether you are new to the world of image processing or an advanced researcher, we hope you will enjoy reading this book and find it useful for your analytic tasks.

The ImageJ imaging analysis software is becoming increasingly used among a vast array of different disciplines. As its user interface is far from a spectacular’s view, a novel user may feel there are only a few things that this amazing program can add to its daily tasks. However, once the ImageJ basics are understood, it becomes a basic device in the toolbox of any scientist who needs to work with images on a daily basis.

This book covers briefly many basic image operations in ImageJ, and then proceeds to more complicated topics: advanced regions of interest delineation and management, filtering in spatial and frequency domains, or particle analysis.

One of the powers of ImageJ is the possibility of automating the different operations, so they can be replicated easily or applied to a large number of different images. This macro system is explained in detail through several exercises that help in showing the reader the potential of this system.

As ImageJ is a public domain software, many developers have contributed their own plugins in order to extend what ImageJ can do by itself. The last two chapters are dedicated to this topic from the perspective of the user who just wants to install new plugins, with a list consisting of our own selection, and also from the point of view of the developer who wants to use ImageJ as the platform to build powerful tools.

Independently of your background and objective, we hope this book has something for you.

What this book covers

Chapter 1, Getting Started with ImageJ, introduces the ImageJ image analysis platform and guides the reader through the installation process.

Chapter 2, Basic Image Processing with ImageJ, introduces the concept of digital image and the different types of data that ImageJ can handle, and then presents the intensity histogram and some basic image operations.

Chapter 3, Advanced Image Processing with ImageJ, describes more advanced imaging analysis techniques, such as modifying the pixel values of different images and performing local measurements. It also covers image filtering in the spatial and frequency domains.

Chapter 4, ImageJ Macros, presents one of the most powerful features of ImageJ: its macro system. Here we introduce this concept and show the reader how different operations can be automatized by giving several examples.

Chapter 5, ImageJ Plugins for Users, is used to explain how ImageJ can be extended very easily. There are literally hundreds of different plugins that extend its native features. In this chapter, we explain the ImageJ plugin system from the point of view of a user who does not necessarily need to know how to program. We perform a sample installation and list some plugins that we have found useful.

Chapter 6, ImageJ Plugins for Developers, is addressed for you if you are a developer. You might not just want to stop at using whatever plugins others have coded for you, but might want to try and implement your own algorithms. We explain briefly the ImageJ plugin architecture, the main classes that you will have to deal with, and how to integrate ImageJ with Eclipse, a very powerful Java IDE.

What you need for this book

There is not much material needed in order to follow this book. As ImageJ is a multi-platform public domain software package coded in Java, you just need a desktop computer or a laptop, optionally with the latest Java version installed. And if you don’t have it, don’t worry too much, as ImageJ can provide it for you.

In order to follow the last sections of the sixth chapter, you will also need the Eclipse IDE installed on your system. Please remember that this chapter is aimed at people with prior programming experience, so if that is not your case, you will not need it.

Also, you will probably need some images to keep practicing, apart from the ones we already provided, but that is up to you.

Who this book is for

This book is intended for everyone who does scientific work with images and is interested in knowing what can be achieved with ImageJ. The introductory part is a very broad introduction to the field of digital image processing, while the latter chapters are devoted to more complex analysis techniques in addition to an introduction to the macro and plugin system, that we hope will clarify these concepts to everyone interested in automating their analysis procedures or implementing their own image analysis algorithms. We have tried to accomplish a good balance between a step-by-step guide for non-advanced users and a nice introduction for developers who might want to use ImageJ as the development platform of their choice.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text are shown as follows:

You can also send the .class files that will be placed in your plugins directory.

A block of code is set as follows:

run(“Split Channels”); selectWindow(“tuberculosis_full.tif (blue)”); close(); selectWindow(“tuberculosis_full.tif (red)”); close(); selectWindow(“tuberculosis_full.tif (green)”); run(“Subtract Background...”, “rolling=30”);

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: “It can be done, as the error message states, by navigating to the Options | Memory & Threads command from the menu”.

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to <[email protected]>, and mention the book title through the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/support, selecting your book, clicking on the erratasubmissionform link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website, or added to any list of existing errata, under the Errata section of that title.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at <[email protected]> with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at <[email protected]> if you are having a problem with any aspect of the book, and we will do our best to address it.

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 purposeAn installation and upgrade guideHow 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