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

You're reading from   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.

Arrow left icon
Product type Paperback
Published in Sep 2013
Publisher Packt
ISBN-13 9781783283958
Length 140 pages
Edition 1st Edition
Tools
Arrow right icon
Toc

More about the macro language – basic syntax and operators


Until now, you have learned how to keep track of the menu options you select in order to create a program that executes all of them in a sequential way.

The ImageJ macro language is much richer than just the options output by the macro recorder. This section explains a bit more about the macro programming language.

Variables

You can define your own variables inside the macro language. A very simple example is as follows:

message = "Hello, World!";
print(message);

This macro simply causes the message, Hello, World! to appear on the ImageJ log window. The print(message) command outputs its messages there. In this case, the text is contained in the message variable. Variables in ImageJmacros may contain any type of data (numeric, strings, arrays) and they need not be declared, they are created when their values are assigned. Another example is as follows:

message1 = "Hello, World!";
message2 = 40 + 2;
print(message1, message2);
print(message1...
lock icon The rest of the chapter is locked
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 €18.99/month. Cancel anytime