Dotted Line

Author: Kevin (Gali) Baler (gliblr(at)yahoo.com)
Date: 2003/11/10: First version: Uses all types of selections.
Requires:Java 1.2 or later
Bugs: No known bugs.
Source: Dotted_Line.java
Installation: Download Dotted_Line.java to the plugins folder, or subfolder, and compile and run using Plugins/Compile and Run. Restarting ImageJ will add a "Dotted Line" command to the Plugins menu or a submenu of the Plugins menu.
Macros: Download DottedLines.txt to the macros folder and install the macros using Plugins/Macros/Install. ImageJ will add "Small Dash", "Medium Dash", "Long Dash", "Thick Dash", and "Alternating Dash" to the Macros submenu of the Plugins menu.
Description: This plugin draws dashed lines with any selection tool. Users may alter the color, line width, and the pattern of the dashes. The color can be changed by double clicking on the color picker tool and selecting the desired color. The line width box sets the width of the line. The dash pattern box takes the list of numbers and turns them into dashes or spaces. The first number is the pixel length of the first dash and the second number is the pixel length of the space. The list will loop itself as many times as needed to draw the whole selection.

Dotted Line
Tool.jpg

The example below shows some of the variations that can be made to the dashed lines. The red dashes show examples of dashed lines with all the tools. The blue dashes are examples of the various line width options and the green dashes illustrate how the dash pattern works. The numbers next to the blue and green dashes are the values that were used to draw those dashes.

Dotted Line
Demo.jpg

Notes: When making dashed lines, ImageJ converts the image to an RGB image. So if a dotted line is drawn on an 8-bit image, the image turns into an RGB image. With the undo command, both, the dashed line and the RGB color will be undone. However, once more than a single line has been drawn, the undo command will undo only the last line that was drawn but the image will remain in RGB.

|Plugins | Home |