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 First Toolbar
The Second Toolbar
The Time Toolbar
The Angle Saving Toolbar
Mouse Actions and Movies
Hot Keys
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 First Toolbar
- The Up and Down Arrows step the zoom factor up or down.
- The zoom text box shows the current zoom and allows you to type in
intermediate zoom factors.
- The checkerboard button toggles between fast rendering
(nearest neighbor interpolation) and
slower but higher quality image rendering (cubic interpolation).
- The lock button will keep the image on the same slice even when
the current Z value is changed in another window; and conversely, a locked
slicer can be moved perpendicular to the slice without affecting the current Z
value for other windows. In classic mode, the image is also
locked to the current
position, even when drawing model points.
In addition, a locked slicer in classic mode responds to the image movement
keys (arrows and PageUp/PageDown) by moving the current point by one pixel in
directions parallel or perpendicular to the plane of the slice - the same
behavior as in the new mode.
- The centering button toggles between the new mode of window
behavior and having the image always
centered on the current model point unless locked (classic mode).
- The Shift lock button (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 IM/FT button toggles between displaying the image slice or
its Fourier transform. The entire image in the whole window, including any
gray borders, is padded into a square array, then the boundaries of the
actual image are tapered down to match any gray borders. This image is
Fourier transformed, then the portion that fits is drawn in the window.
Thus a non-square window will give a transform that is isotropic in X
and Y, but portions will be not be visible in one of the dimensions, so use a
window that is near square to see all of the transform. Zooming down below 1
changes the scale of the transform: low frequencies show up farther from the
origin and high frequencies disappear as a result of subsampling the image.
Zooming up does not change the scale of the transform for
zooms above 1; it just decreases the number of pixels that the
transform is based on. To see the transform at a higher zoom,
increase the zoom and increase the window size by the same amount.
High-resolution mode will sample pixels with accurate interpolation
without changing the number of pixels that the transform is based on.
- The show slice button will cause lines to be drawn in the
XYZ and ZaP windows to show the intersection of the current
slice.
- The Contour button (C) will find the plane that best fits
the current contour and set the X and Y angles and center position to show
that plane.
- The Z-Scale box lets you
control whether the volume will be displayed with Z-
scaling. If you choose Z-Scale Before then the volume will be
scaled before it is rotated and sliced, and thus the rotation
angles will not select the same slice as with no Z-scaling. These
angles will be correct in a Z-scaled volume, but would not be correct
for using Rotatevol to achieve the same rotation of the original volume.
If you choose Z-Scale After the volume is scaled after being
rotated, and the same slice is selected as with no Z-scaling. If you
plan to use angles in Rotatevol, use Z-Scale After or no Z-scaling.
When images are loaded in with a different binning in Z versus X and
Y, the angles are correct for the original, unbinned volume. This is
accomplished by applying an implicit Z scaling before rotation. In
this case, you can select Z-Scale Before to apply an additional
Z-scaling, but Z-Scale After will be unavailable.
The Second 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.
In the middle is a representation of the slice that is being cut
from the data volume.
On the 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
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 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.)
- 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
-/=
Decrease/Increase zoom (also, Keypad + increases zoom)
_/+
Decrease/Increase displayed image thickness
9/0
Decrease/Increase displayed model thickness
l
(Letter L) Show slice in ZaP and XYZ windows
k
Toggle keeping slice centered on current point (classic mode)
s
Save model to file
Ctrl-S
Snapshot to TIFF file
Shift-S
Snapshot to primary type of non-TIFF file
Ctrl-Shift-S
Snapshot to second type of non-TIFF file
x/y/z
Align current and previous model points along X, Y or Z axis
X/Y/Z
Align first and last points of contour along X, Y or Z axis
W
Change X and Y angles so that the current contour is flat in the slice.
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, or 10 degrees and it starts at 1 degree. With Sh on,
,/. also change the increment.
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.
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.
- 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.
- To model another area at a different orientation, be sure to start a new
surface (use the 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 W hot key or the C button in the first
toolbar to reorient to the contour, then step to the desired slice.
Using 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.
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:
- By default, the slicer uses 4 threads executing simultaneously to compute
the image. With one processor, this will make no difference, with 2
processors the time will be
cut in half; with 4 or more processors the time will be one quarter.
If the environment variable
IMOD_PROCESSORS is set, it will set the number of threads to the value of this
variable.
Thus, if you
have more than 4 processors, you can set IMOD_PROCESSORS to make
the slicer work even faster.
- 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 Appearances 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 Appearances tab of the 3dmod Preferences dialog.
- The evaluation of computation time assumes a single processor unless
IMOD_PROCESSORS is set, in which case it divides by the number of processors,
with the result that it reduces the quality at a higher number of voxels.
If you work on several computers with radically different capabilities on a
single home filesystem, you could set IMOD_PROCESSORS appropriately on each to
make a single voxel limit work more comparably on all of them.
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