# Basic Concepts

> Windows
> The "ImageJ" window contains a menu bar (at the top of the screen on the Mac), tool bar, status bar, and a progress bar. Images, histograms, line profile, etc. are displayed in additional windows. Measurement results are displayed in the "Results" window. Windows can be dragged around the screen and resized. Histograms and plots are ordinary image windows that can be copied (to the internal clipboard), edited, printed and saved.

> Tool Bar
> The tool bar contains tools for making selections, for zooming and scrolling images, and for changing the drawing color. Click on a tool and a description of that tool is displayed in the status bar.

> Status Bar
> The status bar, when the cursor is over an image, displays pixel coordinates and values. After running a filter, it displays the elapsed time and processing rate in pixels/second.

> Progress Bar
> The progress bar, located to the right of the status bar, shows the progress of time-consuming operations. It will not appear if the operation requires less then approximately one second.

> Images
> ImageJ allows multiple images to be displayed on the screen at one time. The active window has its title bar highlighted. All operations will be performed on the active image. ImageJ supports 8-bit, 16-bit and 32-bit (real) grayscale images and 8-bit and 32-bit color images. 8-bit images are represented using unsigned integers in the range 0 to 255. 16-bit images use unsigned integers (0 to 65,535) and 32-bit grayscale images use floating-point numbers.

> 16-bit and 32-bit grayscale images are not directly displayable on computer monitors, which typically can show only 256 shades of gray. Therefore, the data are mapped to 8-bits by windowing. The window defines the range of gray values that are displayed: values below the window are made black, while values above the window are white. The window is defined by minimum and maximum values that can be modified using Image/Adjust/Brightness/Contrast.

> Stacks
> ImageJ can display multiple spatially or temporally related images in a single window. These image sets are called stacks. The images that make up a stack are called slices. All the slices in a stack must be the same size and bit depth. A scroll bar provides the ability to move through the slices. Must ImageJ filters will process all the slices in a stack.

> ImageJ opens multi-image TIFF files as a stack, and saves stacks as multi-image TIFFs. The File/Acquire/Raw command opens other multi-image, uncompressed files. File/Import/Image Sequence opens a folder of images as a stack. To create a new stack, simply choose File/New and set the "Slices" field to a value greater than one. The Image/Stacks submenu contains commands for common stack operations.

> Selections
> Selections are user defined areas or lines within an image. Only one selection can be active at a time. Area selections are created using the rectangular, oval, polygonal and freehand selection tools. Area selections can be measured (Analyze/Measure), filtered, filled (Edit/Fill) or drawn (Edit/Draw). Line selections are created using the straight, segmented and freehand line selection tools. Use Edit/Draw to draw the line in the current color. The length of line selections can be measured using Analyze/Measure.

> Selections can be moved by clicking and dragging. The status bar displays the coordinates of the upper left corner of the selection (or the bounding rectangle for non-rectangular selections) as it is being moved. Notice that the cursor changes to an arrow when it is within the selection. To move the contents of a rectangular selection, rather than the selection itself, Edit/Copy (c), Edit/Paste (v), and then click within the selection and drag. Use the arrow keys to nudge selections one pixel at a time in any direction.

> Rectangular selections can be resized using the handle (small box) in the lower right corner. As the selection is stretched, the width and height are displayed in the status bar. Use the arrow keys with the alt key down to stretch rectangular or oval selections one pixel at a time.

> To delete a selection, choose any of the selection tools and click outside the selection, or use Edit/Select None (shift-a). Use Edit/Restore Selection (shift-e) to bring a selection back after having deleted it.

> A selection can be transferred from one image window to another by activating the destination window and using Edit/Restore Selection. Press the tab key to activate a series of windows in sequence.

> Selections can be saved to disk using File/Save As/ROI and restored using File/Open. Multiple selections can be saved by transferring them to a blank window, drawing each one using Edit/Draw, and saving the resulting image. To restore one of the selections, open the image and click to the left of one of the drawn outlines with the wand tool.

> File Formats
> The File/Open command opens TIFF (uncompressed), GIF, JPEG, DICOM, BMP and FITS images. It also opens lookup tables and selections (ROIs). In addition, the File/Import submenu provides access to plugins for reading "raw" files, images in ASCII format, and for loading images over the network using a URL. To import a raw file, you must know certain information about the layout, including the image size and the offset to the image data. Add support for additional formats by downloading or writing plugins. Files can be saved in TIFF, GIF, JPEG, tab-delimited text, and raw formats.

> Plugins
> ImageJ's functionality can be expanded through the use of plugins written in Java. Plugins can add support for new file formats or they can filter or analyze images. Plugins located in ImageJ's "plugins" folder are automatically installed in the Plugins menu or they can be installed in other menus using Plugins/Hot Keys/Install Plugin. Plugins can be created or modified using Plugins/Edit. More than 150 example plugins are available for download from the ImageJ website.

> Lookup Tables
> Grayscale images are displayed using a color lookup table which describes the color to be used for each of 256 possible displayed pixel values. Select alternative color palettes from the Image/Lookup Tables submenu. Use Image/Adjust/Brightness/Contrast to enhance images by dynamically changing the lookup table mapping and Analyze/Show LUT to display the lookup table of the active image.