Overlays
The overlays transform provides a means for creating graphical
overlays--such as lines, ovals, boxes and text--atop another data object.
Overlay annotations are useful for many reasons: dividing a complex image into
scientifically relevant sections, measuring numerical characteristics, and
demonstrating biological phenomena for instructional purposes, for example.
Creating a set of overlays
To create a set of overlays, first import your dataset as described in the
Importing a dataset from disk topic. Select your
dataset from the list, then click the "Add >" button and choose "Overlays"
from the popup menu.
Choose a name for the overlays, and VisBio will create another data
object, a child of your original dataset, that represents the overlays. To
access the tools for drawing overlays, select the overlays and click the "Edit"
button. A window similar to this one will appear:
To begin drawing overlays, you must first display them in 2D atop the parent
dataset. First, add your dataset to a 2D display as described in the
Displaying a data object topic. Then add the
overlays to the same 2D display (not a new one). Doing so will overlay them
atop your image.
[Author's note: On some systems (in particular, if VisBio is using Java2D
because Java3D is not installed), the rendering order of the dataset and the
overlays may need to be reversed. If you see nothing when drawing overlays,
select the overlays from the display window's list of linked data objects and
click the "Up" button to move them up in the rendering order.]
Drawing new overlays
To draw an overlay, choose the appropriate tool from the "Tools" section of the
overlay controls. The tools shown above (from left to right) are: pointer,
line, freeform, marker, text, oval, box, arrow, and polyline. In many ways,
they behave like similar tools available in many image editing programs.
- The pointer tool is for selecting existing overlays. Click an
overlay to select it. Use Shift+click to add the clicked overlay to the
selection. Use Ctrl+click to add or remove the clicked overlay to or from
the selection. Selected overlays have a yellow glow surrounding them.
Information about the selected overlays is shown in the "Statistics" area
at the bottom of the overlay controls.
- The line tool draws lines from one point to another. Click and
drag across the display to draw a new line.
- The freeform tool draws freeform curves. Click and
drag across the display to draw a new line.
The freeform tool has several built-in editing features:
- To erase a portion of a freeform, Ctrl+drag backwards along the
freeform from one end.
- To split a freeform in two, Ctrl+click on a point along the
curve.
- To resume drawing an existing freeform, click near the end of an
existing freeform and drag.
- To splice two freeform curves together end-to-end, simply drag
near the end of an existing freeform while drawing. A freeform in the
process of being drawn will automatically connect to a nearby end of an
existing freeform. When drawing freeforms close together, hold the shift
key to suppress automatic reconnection.
- To redraw a portion of a freeform curve, click on the
curve and drag the mouse. Dragging produces a tendril-like extension of
the curve. When the tendril approaches the original curve, it
automatically reconnects, replacing the subtended segment of the original
curve. To prevent the tendril from reconnecting to the original curve,
hold Shift. Release Shift to allow the tendril to reconnect to
the curve. If the mouse is released before the tendril reconnects, the
original curve is restored.
- The marker tool draws markers at a given point. Click a point in
the display to place a crosshairs there.
- The text tool draws text at a given point. Click a point in the
display to place a new text object there, then type letters for them to
appear at that location.
- The oval tool draws an ellipse. Click and drag across the display
to draw a new ellipse whose diagonal matches the path you draw.
- The box tool draws a rectangle. Click and drag across the display
to draw a new rectangle whose diagonal matches the path you draw.
- The arrow tool draws an arrow. Click and drag across the display
to draw a new arrow which stretches across the path you draw, with the
arrow's tip corresponding to the point at which you press the mouse
button.
- The polyline tool draws a segmented curve, point-to-point. Click
on the display to begin a new polyline. Move the mouse and click to add
new nodes to the line. To complete a polyline, double-click on the
display.
Like the freeform tool, the polyline tool has several built-in editing
features:
- To reposition a node of a completed polyline, move the mouse
over the node until a green circle appears. With the green circle
visible, click and drag the node to the desired postion, then release the
mouse.
- To delete a node of an existing polyline, position the mouse
over a node until a green circle appears around it. Then Ctrl+click to
delete the node. The polyline splits in two around the deleted node;
however, any one-node polylines created as a result are automatically
deleted.
- To resume drawing an existing polyline, move the mouse over an
end node so that a green circle appears. Then click to resume drawing
the line at that end.
To use a tool, click the associated tool button.
Altering existing overlays
You can use the overlays controls to alter the characteristics of selected
overlays. First use the pointer tool to select the overlays you wish to change,
or select them from the overlay list on the left side of the "Overlays" section
of controls. Note that the overlay list only shows overlays for the current
dimensional position.
To remove an overlay, click the "Remove" button or press the Delete key.
To copy overlays to the clipboard, first select them, then click the "Copy"
button or press the Ctrl+C key combination.
To paste overlays from the clipboard onto the current image plane, click the
"Paste" button or press the Ctrl+V key combination.
To change an overlay's position, click and drag it using the pointer tool,
or type in new values directly for the (X1, Y1) or (X2, Y2) coordinate values.
To change the text shown for a Text overlay, click the text object to select
it, then type new text, or type new text directly into the "Text" box.
To change the color of the selected overlays, click the button labeled
"Color" to bring up a dialog box for choosing a new color.
Some overlays--ovals, boxes and arrows--can be filled in (solid) or
outlined (hollow). To toggle which for the selected overlays, use the "Filled"
checkbox.
Each overlay allows you to store one line of miscellaneous notes. To make a
note for the selected overlays, type your note into the "Notes" text box.
Grouping overlays
Each overlay has an associated group. This feature is useful if one collection
of overlays tracks a particular phenomenon, while another collection of
overlays tracks another phenomenon. In this case, each collection can be
assigned to a different group to differentiate between the collections.
To choose the group to which the selected overlays belong, choose a group
from the "Group" dropdown box. New groups can be created by clicking the
"New..." button next to the "Group" box.
Distributing overlays
VisBio's distribution feature allows for linear distribution of an overlay
across many consecutive image planes. By identifying starting and ending
overlays, you can instruct the software to create a series of intermediate
overlays between the starting and ending image planes.
First, decide on a series of image planes across which you wish to
distribute an overlay. For example, you could decide you want an oval overlay
on slice #5, from timepoints #3 through #57.
Navigate to the first image plane and draw the overlay. In our example,
create the oval at slice #5, timepoint #3.
Copy the overlay to the clipboard by clicking the "Copy" button (or by
pressing the Ctrl+C key combination).
Navigate to the last image plane and draw the same type of overlay (or paste
the copied overlay onto the exact same coordinates using the "Paste" button, or
by pressing the Ctrl+V key combination). In our example, create or paste the
oval at slice #5, timepoint #57.
Finally, click the "Distribute" button. To see what VisBio has done,
navigate through the intermediate frames. In our example, move the Time slider
between #3 and #57 to see how VisBio has distributed oval overlays.
Changing the font
Each set of overlays uses a particular font to display text overlays. The font
being used is shown in the "Font" text box. To change it, click the nearby
"Change..." button. A dialog box will pop up allowing you to select a new font.
Please note that this setting affects all text overlays in the set, not just
the selected ones.
Saving your work
You can save your overlays to a tab-delineated text file on disk (readable by
spreadsheet applications for further analysis). Click the "Save overlays..."
button to do so, and a file browser will appear.
The tabs on the right side of the file browser allow you select which overlay statistics you would like saved in the spreadsheet file. Note: the statistics which appear in these files are for your convenience only--VisBio will recalculate all statistics, saved or not, when the overlays are loaded.
You can restore saved overlays by using the "Load overlays..." button and
choosing a text file saved earlier. Please note that loading an overlay set
will clear out any current overlays, overwriting them with those saved in the
text file.
You can export your overlays to .xls spreadsheet format using the "Export Overlays..." button. As when saving overlays, you may select the statistics you wish to save in the file. VisBio uses the Apache POI HSSF library to write .xls spreadsheets.
See also: