Isosurface View Dialog

This dialog allows you to display isosurfaces of the input volume or a subvolume of it. An isosurface is a surface generated at places where the intensity values cross a threshold value set by the user. The subvolume is specified by a bounding box whose position and size are set by sliders. Isosurfaces are displayed when this dialog is opened but will be removed when you close the dialog.

The isosurface mesh and the bounding box are stored in two "extra objects". Their display properties can be edited in the Model View Object Edit dialog. The extra objects that can be edited are listed after the last regular object in the model; just use the slider or spin box there to get to them.

If you click on a position in the isosurface with the right mouse button, that position becomes the current point within 3dmod, thus allowing you to find corresponding features in the image data.

The isosurfacing is always computed on a subvolume of byte values, even if data have been loaded into the program as 16-bit integers instead of bytes. In the latter case, the scaling to bytes is determined by the the Low and High sliders in the Information window. In order to have good dynamic range in the intensity values being analyzed, be sure that the Low and High sliders are set so that images have a good contrast with a fairly wide range between the Black and White sliders. Using the autocontrast function generally leaves the sliders in positions that will allow good scaling for display. Changing the Low and High sliders will change the effect of the threshold setting here.

If you have multiple volumes loaded, separate thresholds are maintained for each volume, so when you return to a volume, it will be shown at its own threshold. When you first step to a volume that has not had its threshold set yet, it will be given a threshold at the same percentile point in its intensity histogram as for the previously displayed volume.

The computations will be done with multiple threads running in parallel if the system has multiple processors. Doing so incurs some extra overhead and the computation time also does not reduce proportional to the number of processors used and may even increase with more than 4 threads on an 8-core system. Thus, the maximum number of threads used is 4, regardless of how many processors are available. Up to 4, the number of threads is set by the apparent number of processors on the system, or by the value of the environment variable IMOD_PROCESSORS if it is set. If your machine has hyperthreading enabled, the program will probably run better if you avoid using hyperthreads by setting IMOD_PROCESSORS to the actual number of cores on the system. You can experiment with your system by setting IMOD_PROCESSORS to various values and starting 3dmod with the -DU option in order to see some time outputs. Display a large portion of a volume so that processing takes hundreds of milliseconds.

The isosurface display is based on contouring and surface smoothing modules from Chimera, developed at the Resource for Biocomputing, Visualization, and Informatics at UCSF.

The controls in this window are in two columns. The left side has controls for setting the threshold and adjusting the volume being displayed; the right side presents a variety of options. Controls are as follows:

At the top left is the histogram of voxel values inside the bounding box. The histogram is based on the byte values stored in program memory, not the values in the image file.

The Threshold slider sets the constant intensity value at which the isosurfaces will be rendered. When you open this dialog, the threshold is automatically set to a certain percentile on the low side of the intensity distribution so as to show dark structures. There is an option in the Look/Limits tab of the 3dmod Preferences dialog to have the initial threshold set on the high side so as to show light structures instead. Also, you can use the hot key F11 to switch the threshold to an equivalent point on the other side of the median.<

The Outer limit slider sets a second threshold beyond which intensity values will be set to the median intensity, so that you can visualize just the intensities between two values. However, extreme intensities are usually surrounded by less extreme ones; thus, if the program removed only the extreme ones from consideration, you would usually see a shell around places with extreme intensities. To avoid this effect, the program searches up to 16 pixels away from extreme pixels for ones that are above the threshold and sets those to the median as well, as long as they are connected to an extreme one by a chain of adjacent pixels above the threshold. The outer limit is constrained to be on the same side of the median intensity as the threshold. No elimination is done when the outer limit is at the end of the intensity range.

The X, Y, and Z sliders will track the current point coordinate in 3dmod image display windows and can be used to adjust the center position of the bounding box. The bounding box will center on the coordinate unless that would result in the box size being smaller than the slider value.

The X size, Y size, and Z size sliders can be used to set the X, Y, and Z size of the bounding box. The maximum values of these sliders are set so as to prevent you from trying to render too large a total volume, which is especially time-consuming when the threshold is near the middle of the intensity distribution. The maximum number of voxels allowed, as well as the number of voxels when the display first opens, can be controlled in the Appearance tab of the 3dmod Preferences dialog. The spin boxes there set the size of a cube equivalent to whatever shape of volume is displayed. Thus, display time will increase with the cube of these numbers.

The Zap Band button can be used to set the size and center of the bounding box in X and Y from the position of the rubber band in the top Zap window. The size will be limited to the maximum size allowed for this display but the center position will be the same as that of the rubber band.

The Contour button in the "Set X/Y area from" box allows you to set the size and center of the bounding box to fit the current contour when you are masking the volume with the current contour (see below). When masking with the lasso in a Zap window, the button (now labeled Lasso) will fit the bounding box to the lasso. When masking with the current object, the button (now labeled Object) will set the X/Y area based on the extent of the current object over the selected Z range. This button is useful for recentering if you change the current contour or object or the center or size in Z.

View isosurfaces selects whether the isosurfaces will be computed and displayed.

View user model selects whether the regular model is displayed as well.

View bounding box selects whether a bounding box around the data will be displayed. When it is being displayed, it will also show up in the Zap window regardless of what section is being displayed.

Keep box centered controls whether the dialog will center the subvolume being rendered in the model view window whenever its size or position changes. The subvolume is also centered when this box is turned on, so you can use it to center the volume even if you do not want to leave it on.

Link to global X, Y, Z controls whether the coordinates selected in the sliders on the left will be linked to the current point coordinate in 3dmod image display windows. If it is on, then changing these sliders will change the current point in 3dmod and affect other displays; also, any change in current point within 3dmod will change the center position of the bounding box. If it is off, then the coordinates selected here become independent of the current point. Turning the option off allows you to right-click on the isosurface without having the isosurface display move to a new position. It is also useful when modeling scattered points directly in the Model View window in order to paint the isosurface (see below). Finally, if the button is off, a masked isosurface will change dynamically as the masking contour, object, or lasso or modified in a Zap window.

Binning selects the amount of binning of the data in 3D; e.g., with a binning of 2, each voxel used for computing the isosurface will be the average of 8 adjacent voxels. Binning will both increase the speed of the display and smooth the surface considerably.

Smoothing selects the number of iterations of a smoothing routine that moves each vertex of the isosurface toward the average of neighboring vertices. Some of the change in appearance when you turn on smoothing may reflect a change in the way the normals to the surface are computed. These normals control how light reflects from the surface. With no smoothing, they are computed from the image data by the Chimera code, but with smoothing, they are recomputed from the triangles in the usual way for IMOD meshes. Note that another way to get a smoother display is to restart 3dmod with the image loaded binned.

Delete small pieces can be turned on to eliminate small pieces not connected to the rest of the surface. The threshold size for eliminating pieces can be adjusted with the Min size spin box, which sets the minimum number of triangles required in order to retain a piece. There is significant computation involved in identifying the small pieces, so you may need to turn this option off while adjusting other features, then turn it back on.

Cap at box faces can be turned on to close off isosurfaces that go to the edge of the bounding box. Otherwise, you will see into the inside of any isosurface that is cut by the bounding box.

Masking: It is possible to restrict the region within the bounding box that is rendered with one of the selections in the Mask box.

Painting the Mesh: It is possible to set different parts of the isosurface to different colors or transparencies by enclosing them in the spheres of a scattered point object. To activate painting, turn on the Paint obj. check box and select the object number in the spin box.

Save Object is used to create two new objects containing copies of the isosurfaces and the bounding box. Until you do this, these items are kept in "extra objects" that are not saved with the model. This button and the next one are the only way to save the isosurfaces in a model file and reload them. When the bounding box is saved, it will stop being displayed on all sections in the Zap window. After you save the objects, the model view window will show both the isosurfaces in the extra object and the saved objects, unless you turn one or the other off. If you have painted the isosurfaces, the current painting is stored as part of the new object and cannot be modified.

Sort & Save is used to sort the triangles in the isosurfaces into different mesh components for each physically separate piece. These meshes are given different surface numbers and stored in one new object (the bounding box is stored in another object as well). Once a mesh with surface numbers has been saved, the following capabilities are available for working with such objects: