Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Image Processing with ImageJ - Second Edition

You're reading from   Image Processing with ImageJ - Second Edition Extract and analyze data from complex images with ImageJ, the world's leading image processing tool

Arrow left icon
Product type Paperback
Published in Nov 2015
Publisher
ISBN-13 9781785889837
Length 256 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

Table of Contents (12) Chapters Close

Preface 1. Getting Started with ImageJ FREE CHAPTER 2. Basic Image Processing with ImageJ 3. Advanced Image Processing with ImageJ 4. Image Segmentation and Feature Extraction with ImageJ 5. Basic Measurements with ImageJ 6. Developing Macros in ImageJ 7. Explanation of ImageJ Constructs 8. Anatomy of ImageJ Plugins 9. Creating ImageJ Plugins for Analysis 10. Where to Go from Here? Index

The ImageJ folder structure

After installing ImageJ, a folder structure is placed at a location designated during the installation process. This folder's structure consists of a few key folders that are essential to the regular functioning of ImageJ. If you installed ImageJ in a folder to which you have no write privileges, there are two important folders that need read and write permissions in order for ImageJ to function: the plugins and macros folders. Also, the configuration file on Windows platforms (pref.cfg) needs write permissions for the user. Without the write permission, settings cannot be changed. The next section briefly explains the properties for the plugins and macros folders, and how ImageJ uses them.

Plugins folder

The two most important folders are the macros and plugins folders. These folders will be searched for available macros and plugins when ImageJ loads. When you download a plugin and place it in the plugins folder, the plugin will be found the next time ImageJ starts. When downloading plugins, there are three different options of files that can be downloaded: a Java source file (.java), a compiled file (.class), or a Java archive (.jar). In order for plugins to be displayed in the plugins menu, the .java and .class files need to contain at least one underscore character in the filename. For .jar files, the archive needs to contain a plugins.config file that defines the location within the menu system. This has an additional advantage that plugins within a .jar archive can also be installed outside the plugins menu.Underscores are replaced by spaces in the plugins menu or removed completely if the last character is an underscore. If you place your plugins in a folder within the plugins folder, this folder name will also show up in the Plugins menu, but only if it contains at least one valid plugin. If you download the source file of a plugin, you can create an executable plugin by choosing Compile and Run from the Plugins menu and selecting the Java file. The next time ImageJ is run, the new plugin will be automatically detected.

JAR files are slightly special. They can be placed within the plugins folder, but they do not have to show up in the Plugins menu. The JAR file contains a manifest that specifies the location where the plugins within it are placed. This specification allows the developer to place the plugin in a specific submenu of the Plugins menu, regardless of the folder where the JAR file is placed. This would be especially handy if you create a group of linked or associated plugins that you wish to group within the Plugins menu.

Macros folder

The macros folder contains a collection of macros that come with ImageJ and is also the default location to store user-defined macros. ImageJ macros are flat text files with the .ijm extension, although this extension is not essential. Any flat text file with valid macro code can be run in ImageJ. Macros in ImageJ have their own language, which is similar to Java, but with a few minor differences. Chapter 5, Basic Measurements with ImageJ will investigate how to create macros and will explain the language constructs in ImageJ macros.

You have been reading a chapter from
Image Processing with ImageJ - Second Edition
Published in: Nov 2015
Publisher:
ISBN-13: 9781785889837
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image