The Slicer Window
The Slicer allows you to display a slice at an arbitrary angle through the
volume, centered around a selected point. This center of rotation is always
displayed in the center of the window. Multiple slices can be averaged.
Modeling can be done.
Slicer has two to four dockable toolbars that may be floated as separate
windows so that the image will fill the entire window area. When they
are floated, they will still pass hot keys on to the Slicer window.
Angles, Window Behavior and Classic Centering Mode
The General Toolbar
The Slice Control Toolbar
The Time Toolbar and Linked Slicers
The Angle Saving Toolbar
Mouse Actions and Movies
Hot Keys
Using the Rubber Band
Modeling Tilted Contours to be Meshed
Managing Slicer Performance
Angles, Window Behavior and Classic Centering Mode
The orientation of the slice is governed by the Z, Y, and X rotation angles,
which are applied in that order to rotate the volume before slicing. These
angles can be set directly with sliders, or by using the numeric keypad to
change the angle last adjusted by a slider by small or large increments. Once
angles become large, however, the overall effects of changes in the Z or Y
angles become unintuitive. An alternative way to control the slice
orientation is to rotate the volume relative the axes in which it is currently
viewed. With the Shift key held down, mouse buttons and keypad keys can be
used to rotate the volume just as a model can be rotated in
the Model View window. The X, Y, and Z angles will change to accomplish the
desired rotation. There is also a toolbar button that works as a "Shift lock"
so that the Shift key does not need to be held down.
The behavior of the Slicer was changed in IMOD 3.10.10 so that it works more
like the Zap window. The old behavior of the window is called "Classic mode",
and there is a toolbar button as well as a hot key to switch to this mode.
The principal differences are:
- In the new mode, the image can be panned with the first mouse button,
and clicking in the window changes the current image or model
point without changing the center of rotation, or shifting the image.
In classic mode, the image cannot be panned, and clicking in the window or
changing the current point in another window recenters the image on the
selected point unless the Slicer window is locked.
- In the new mode, arrow keys pan in the plane of the slice, while the
PageUp and PageDown keys move the center of rotation perpendicular to the
plane of the slice. The Page keys will also move the current
point in Z by an amount that will keep a Zap window in sync with the Slicer.
In classic mode, the arrow
keys and PageUp and PageDown move the current point in X, Y, and Z regardless
of the orientation of the slice, unless the Slicer is locked.
- In the new
mode, the Slicer will respond to some but not all changes in the current point
by moving its center point. Specifically, it will change the Z of its center
point when only the Z of the current
point changes, as would be produced by changing Z in another window. It will
change the X or Y of its center point by 1 when X or Y of the current point
changes by 1, as would be produced with arrow keys in other windows. Again,
in classic mode, the center point is kept the same as the current point unless
a Slicer is locked.
Although the new mode should be more convenient in general, classic mode is
still useful, such as for keeping the Slicer synchronized with the current
point being displayed in other windows, or for keeping the current model point
visible while stepping through a contour. In addition, if one wants to see
the current point and it is not visible in the Slicer, one can simply toggle
the mode on and off again to center the current point.
The General Toolbar
The Slice Control Toolbar
On the left are three sliders
with which you can adjust the rotations about the
X, Y, and Z axes. The rotation angles are applied to the volume,
not to the slicing plane, and they are applied in the order Z, Y,
X; thus these same angles can be used directly in other programs
that rotate the volume. Clicking a slider with the left mouse
button will change the angle by 1 degree; clicking with the
middle button moves the slider immediately to the position of
mouse. If you drag the slider, the representation of the slice
in the data volume will change continuously, and the image will
also be updated if the slider is continuously active. If the slider is
not continuously active, the image
will not be updated until you release the slider. Typically the
sliders will be continuously active unless you press the Ctrl
key, although you can change this default behavior in the 3dmod
Preferences dialog, accessed through the Edit-Options menu entry.
A fourth slider at the bottom, View axis position shows the
position of the slice along the axis perpendicular to the current plane, and
allows you to riffle through the planes along that axis.
In the middle is a cluster of buttons for rotating the volume around the
viewer's X, Y, and Z axes. The arrow buttons provide a substitute for using
the numeric keypad with the Shift key held down. If one of these buttons is
held down, repeated steps are taken.
The Shift lock button in the middle of the arrows (Sh) toggles a
mode in which the second and third mouse buttons and numeric keypad keys
operate as if the Shift key were held down. The + and - buttons
increase and decrease the angular step when using the rotation buttons here or
the numeric keypad in shifted mode.
In the upper right is a representation of the slice that is being cut
from the data volume.
In the bottom right are controls for adjusting the thickness of
the image slice and the thickness of model that is shown on the slice.
The Time Toolbar and Linked Slicers
If multiple image files have been loaded into 3dmod, an
additional toolbar appears, with the same controls as the toolbar in the Zap
window.
The Time lock button will prevent
changes in other windows from changing the time (image file)
displayed in this Slicer; and conversely this Slicer's time can be changed
without affecting other windows. The left and right arrows will
step backward and forward in time.
In addition, the time toolbar has a Link checkbox that will make all
the Slicers with this option checked have the same angles, zoom, and image
thickness. They will also have the same position unless one of their position
Lock buttons is on. This option can be used together with the
Time lock button to get synchronized displays of several volumes in
separate Slicers.
The Image - Linked Slicers menu entry will open an array of
linked Slicers, one per image file and each one already locked to a time. The
slice control toolbar will be detached and moved to the top or left side for the
first window and hidden for the other windows. (It is placed in the middle of
the top or left to keep it from being lost if there are two side-by-side
monitors of unequal size.) The windows will be arranged
in rows and shrunk by up to 50%, if necessary, to fit as many as possible, up
to about 20 by default. This limit can be set in the Look & Limits panel of
the 3dmod preferences dialog. If
the Link box is turned off for a Slicer, its toolbar will be restored.
If the first window is closed or its Link is turned off, another
window's toolbar will be moved to the top or left. You can press the close
button on the detached toolbar window to close all of the linked Slicers. If
there are more image files than windows opened, the first window will be set
to the current time rather than time 1. In this case, stepping time in one of
the linked Slicers will make all of them step in tandem so as to display the
next set of times. For example, if there are 20 Slicers displaying times 1 to
20, stepping up will make them show 21 to 40.
The Angle Saving Toolbar
Slicer angles and center positions can be saved in the IMOD model by opening
the Slicer Angles dialog box, using the Edit-Angles menu entry. When this
dialog box is opened, all Slicers will acquire an additional toolbar with the
following controls:
- Save saves the angles and position in the current row of the table,
or into a new row if there are no rows in a table.
- New saves the angles and position into a new row in the table.
- Set sets the angles and position from the current row of the table.
- Auto selects an automatic (continuous) update of the current row of
the table from changes in this Slicer. When this option is off, angles are
saved only when Save is pressed. The Slicer is set to an angle only
when either the Set toolbar button or the Set Angles button in
this window is pressed. When the option is on, angle or position changes in a
Slicer automatically modify the stored values that are shown in the current
row. Changing the current row of the table will set the angles in the active
Slicer. When the time is changed, the Slicer is automatically set to the
current
values for the new time (which can be in a different row of the table). In
addition, if you edit one of the cells, the values in that row are sent to the
Slicer. When this option is turned on, neither the Slicer position nor the
angles in the table are changed because it is not known which action you
desire - it is up to you to sychronize the angles in the table with the Slicer
window one way or the other.
Mouse Actions and Movies
The actions of the mouse buttons are similar but not identical to those
in the Zap and XYZ windows.
In classic mode, unless the image position is locked by the lock button,
the first mouse button in movie mode, and all mouse buttons in model
mode, will change the current viewing point in the data volume.
In either movie or model mode, moving the mouse with a button held down does
the following:
- First Button Drag: Pan the slice image relative to the center point
(but not in Classic mode).
- Shift-Second Button Drag or Second Button Drag with Sh ("Shift
lock") on: Rotate the volume around an axis in the
plane of the slice and perpendicular to the direction of mouse movement, as in
the model view window.
- Shift-Third Button Drag or Third Button Drag with Sh
on: Rotate the currently displayed slice about
its center by rotating the volume around an axis perpendicular to the slice.
In movie mode, the buttons do the following:
- First Button Click: Set the current image point, which affects the
display in other windows. (Classic mode: set the current viewing point of the
Slicer as well.)
- Ctrl-Second Button: Start movie forward, perpendicular to viewed
slice
- Ctrl-Third Button: Start movie backward, perpendicular to viewed
slice
In model mode, the buttons do the following:
- First Button: Attach to the nearest model point, or detach from the
current contour. For open and closed contours, only points within 0.5 pixel
of the current plane will be considered, even if more of the model shows up
because the thickness for model display is set higher than 1. Spherical
points can be selected from nearly any plane on which they are visible.
To attach to points in any object, including ones that are turned
off, there is an option in the Behavior panel of the 3dmod Preferences
dialog.
- Second Button Click: (if Sh not on) Insert a point after the
current point. This button can be held down to insert points continuously.
(Classic mode: continuous tracing only works with the window position locked.)
A new contour will be started automatically after a change in the slice angle
or the position perpendicular to the slice, if you are
modeling either closed contours or open contours in an object with the option
set to start new
contours automatically at new Z values.
- Third Button Click: (if Sh not on) Move the current model
point to the selected location
By default, these buttons correspond to the left, middle, and right
buttons, but you can change these assignments in the 3dmod Preferences
dialog.
When a movie is started with an obliquely oriented slice, the range
of the movie is determined by two sets of limits. One set of limits is
imposed to keep the central displayed point within the data volume.
The other limits are based on the starting and ending movie limits for
the axis that is closest to perpendicular to the slice. These limits
are set in the 3dmod Movie Controller (opened with Edit - Movies...).
The slice angles can be changed while movieing and these limits will
be adjusted dynamically.
Hot Keys
Most of these hot keys, and many others, are available in a menu that pops up
when you right-click over any of the Slicer toolbars.
- -/=
Decrease/Increase zoom (Keypad - and + also decrease/increase zoom)
- _/+ or Keypad -
Decrease/Increase displayed image thickness
- 9/0 (Keypad Shift - and Shift +
also do this
Decrease/Increase displayed model thickness
- L
Show slice in ZaP and XYZ windows
- K
Toggle keeping slice centered on current point (classic mode)
- Shift+B
Toggle the rubber band on or off
- Shift+F
Toggle between showing the image and showing the FFT of the image
- Shift+R
Resize the window to the area enclosed in the rubber band and turn off the band
- Ctrl+Shift+R
Resize and center the area enclosed in the rubber band to fill the window in
one dimension.
- S
Save model to file
- Ctrl+S, Shift+S or Ctrl+Shift+S saves the Slicer window,
or the area inside the rubber band, into a TIFF file, a file in the primary
non-TIFF format, or a file in the second non-TIFF format
- X/Y/Z
Align current and previous model points along X, Y or Z axis
- Shift+X/Shift+Y/Shift+Z
Align first and last points of contour along X, Y or Z axis
- Shift+W
Change X and Y angles so that the current contour is flat in the slice.
- Q
Report distance in 3D between the current model or image point and the point under
the mouse cursor. The current image point is used in Movie Mode or if there
is no current model point. If the current point appears in a
bright color, it is on the plane being displayed, and the distance corresponds
to a line length in the plane of the image. If pixel size varies among the
sections or among multiple image
files, the measurement will be based on the pixel size of the program's current
section and time. See
Variable Pixel Sizes for details.
Arrow Keys When not in Classic Mode, the arrow keys shift the image
in the direction of the key by one pixel. Ctrl and an arrow key will
shift the image in 0.2 pixel steps, which is useful for setting the center
of rotation more precisely. In Classic Mode, the arrow keys shift the
current image point in the direction of the arrow, and since the current
point stays centered, the image shifts in the opposite direction.
Numeric Keypad:
With no Shift key and with Sh ("Shift lock") not on, manipulate the
X, Y, or Z angles:
- 4/6 (Left/Right)
Decrease/Increase last adjusted angle by 0.1 degree
- 2/8 (Down/Up)
Decrease/Increase last adjusted angle by 0.5 degree
- 1/3 (End/PgDn)
Decrease/Increase last adjusted angle by 15 degrees
- 0 (Insert)
Set last adjusted angle to 0
With Shift key down or Sh on, rotate volume:
- 4/6 (Left/Right)
Rotate volume around Y axis in plane of viewed slice
- 2/8 (Down/Up)
Rotate volume around X axis in plane of viewed slice
- 9/3 (PgUp/PgDn)
Rotate in plane of displayed slice
- </>
Decrease/Increase increment for these rotations; the increment can be 0.1,
0.3, 1, 3, 10, 30 or 90 degrees and it starts at 1 degree. With Sh on,
,/. also change the increment.
Using the Rubber Band
The rubber band is used to enclose a rectangular area just as in the Zap
window, although it has fewer uses in the Slicer.
- To start the rubber band, press the toggle button or use the Shift+B hot
key. Press the first mouse button at any corner of the desired box and hold
the mouse down while dragging to the opposite corner.
- After you draw it initially, you can resize or move the rubber band by
bringing the mouse near an edge or corner. The cursor will change to a
horizontal or vertical double arrow to indicate that you can move one side,
or to a diagonal double arrow to indicate that you can move one corner.
Press the first mouse button and drag to adjust the size, or press the
second mouse button and drag to shift the band without changing its size.
- Whenever you are resizing the band, its dimensions in window pixels are
shown in the general toolbar, in place of the Lo and Hi
buttons. To see the size temporarily without changing the band, position
the cursor over any edge and press the first mouse button without moving the
mouse.
- A non-montaged snapshot will capture the area inside the rubber band.
- The hot key Shift+R will resize the window to show the area enclosed by
the rubber band, and turn off the band. The hot key Ctrl+Shift+R
will zoom the area in the rubber band and shift it so that it fills the
window in one dimension.
- "Extract File" in the Edit menu will run
Rotatevol to extract the region
defined by the rubber band, after limits in the third dimension have been
set with the Lo and Hi buttons in the General toolbar.
Go to one end of the desired range with PageUp/PageDown or
the View axis position slider, and press one of the buttons. Go to
the other end of the range and press the other button. These
buttons initially appear as red to indicate that no limits have been set and
turn green when a limit is set. However, it is possible to adjustthe band
size or position after setting limits. A button turns yellow if a set
limit can no longer be reached, in which case extracting will include fewer
slices. If you hold down the Shift key and click on a button, it will
return to the limiting slice or go to the last slice that can be reached.
If there are multiple Slicers with rubber bands, the volume is extracted
based on the area defined in the most recently active window. If
there is both a Zap and a Slicer with rubber bands, File - Extract File runs
an operation as specified by the band in the most recently active window.
Modeling Tilted Contours to be Meshed
It is possible to mesh contours that have been modeled at an oblique
orientation in the Slicer, provided that all of the contours in a Surface are
at the same orientation, and that the contours are properly spaced apart.
By default, the Slicer will automatically start a new Surface at the same
time as it starts a new contour when it detects that the Slicer
angles have changed enough from the angles at which the current contour was
drawn. This behavior can be turned off with an option in the 3dmod
Preferences dialog (menu entry Edit - Options). If you are going to model at
multiple angles, it is advisable to open the Surface-Contour-Point dialog to
monitor the Surface number (menu entry Edit - Surface - Go to).
To model tilted slices, follow these procedures:
- Select an area to model and center it in the window. You may wish to lock
the Slicer to keep other windows from affecting its position.
- If there are already contours in this object, start a new Surface with
N or allow the Slicer to start the new Surface for you.
- Model a contour by clicking or dragging with the second mouse button.
- Step between slices with the PageUp and PageDown keys in
this Slicer. Start new contours in the same Surface with
n, or rely on new contours starting automatically.
- If you start modeling another area at a different orientation, the
Slicer should start a new Surface automatically. Otherwise, you can start a
new Surface manually (use the Shift+N hot key instead of N).
- To return to modeling a Surface after changing the angles, or after the
plane of the data has been changed by stepping in Z in another window,
select one of the existing contours with the first
mouse button. Press the Shift+W hot key or the C button in the first
toolbar to reorient to the contour, then step to the desired slice.
Using Shift+W is very important, not just for getting the same angles, but
also for getting back to the exact coordinates to preserve the spacing between
slices. An alternative is to store the angles and position of one slice
with the Slicer Angles dialog.
- If you go back to modeling in a Zap or XYZ window after modeling tilted
slices, be sure to select an existing planar contour in that window before
making a new contour or starting to draw. This will keep you from appending
to a tilted contour or from getting an inappropriate Surface number for the
new contour.
Note that if you model at intervals of more than one pixel, it is not so
important to preserve the spacing between slices as just described.
Managing Slicer Performance
The time that the Slicer takes to compute a new image depends on three
factors: the size of the image window, the number of slices being averaged,
and whether high quality interpolation is selected. For large windows and
many slices, the computation time could take hundreds of milliseconds. The
Slicer uses several methods to manage the computation time, and you can affect
them, as follows:
- If there are multiple processors in your system, the Slicer uses
multiple threads executing simultaneously to compute
the image. By default, the number of threads is the number of processors
detected in the system, and the speedup will be nearly linear with the number
of processors.
If the environment variable
IMOD_PROCESSORS is set, it will set the number of threads to the value of this
variable instead.
- When you pan or rotate the image with the mouse, the Slicer will evaluate
the number of voxels that needs to be computed and, if necessary, turn off the
high quality interpolation and reduce the number of slices to keep the
computation time reasonable. This behavior is controlled by a limiting number
of voxels that can be adjusted in the Look/Limits tab of the 3dmod Preferences
dialog. If you find the Slicer too sluggish when using the mouse with
averaged slices, reduce the value; if you want to keep it from reducing the
quality as much as it does, increase the value.
- This dynamic reduction in quality will not occur when dragging the angle
sliders, unless you check the box to apply the voxel limit to this operation
as well in the Look/Limits tab of the 3dmod Preferences dialog.
- The evaluation of computation time is
divided by the number of processors,
with the result that it reduces the quality at a higher number of voxels when
there are more processors.
In general, whenever performance is an issue, it is advisable to keep the
size of the Slicer window to just what is needed to examine the area of
interest.
Help Index