Software - Slice Visualization and Cleanup Tools
This page describes two related tools: sv ("slice viewer") and svcleanup ("slice viewer cleanup"). They are each built on the same GUI chassis but with different functionalities. Read below for further details.
Slice ViewerSlice Viewer is a versatile tool that is used for 2D viewing of images. It can view images in any desired orientation (axial, sagittal or coronal) regardless of the native orientation of the image. And it can view multiple images scroll-locked to the same slice. It can also place red reference points which will appear at the same location in each open window. Slice Viewer was developed by Dan Sullivan, Baljeet Singh, Chris Davies and Evan Fletcher.
Figure 1. Mapping function.
sv -map -hotcold MDT_008w.hdr PosJac.hdr NegJac.hdr
Mapping functionsAfter the mapping options the first image argument is the underlying grayscale image. The next two images are mapped in hot and cold palettes respectively. The voxels in a mapping image must be all non-negative or all non-positive for accurate representation. In this example, they show the positive and negative jacobians (volume change factors) of an average of warps.
Gray-scale images can be overlaid with one or two images that are rendered in colored palettes. The
-mapoption with no other flags renders one mapping image in the hot palette by default. Additional mapping options
-hotcoldspecify respectively a cold palette or two images, in hot and cold. When mapping options are selected, then color bars can be displayed to identify the range of colors with numerical labels. This is an option in the image drop-down menu on the toolbar. In addition, the MapType menu allows selection of alternative ways to label the colors: as volume expansion factors corresponding to log-jacobian images (example shown in Figure 1), or as p-values corresponding to significance images.
Other viewing functionssv supports a range of other viewing utilities. Here is a brief summary:
See the "scalpel" icon on the toolbar and the "removal"or "paint" icons to its right. Clicking the "scalpel" icon once enables the cutting tool to draw a green contour on the current slice. Clicking a second time closes the contour. Then click on the remove or paint icons, followed by a click inside or outside the contour in the slice. This will remove the designated region or color it a desired gray-scale shade.
When no mapping function is selected, the ImageAdjust menu on the toolbar has an option for image thresholding (use slider bars to adjust upper and lower thresholds) and the thresholded images can be saved as binary mask images (see File --> SaveMask).
- Rotations etc
Standard image rotations and flips can be accessed from the View menu on the toolbar. A FullView option of multiple slice display can also be selected here. The icon with arrow and wire cube containing the brain can be used to cycle through sagittal, axial and coronal orientation views.
- Image statistics
The Image menu on the toolbar has options for viewing the image intensity histogram and also various properties of the image as specified in the header file.
sv Call syntax
Usage: sv [options] filename.hdr [auxiliary image files] Accepts analyze or interfile format files. Specify complete file headername including extension You can invoke sv with any number of image files. In that case the result will be N control-locked windows, one for each image If options are used, then the syntax is to specify the option, followed by specified number of images. Options ------- -map [-cold] base_image aux-image -map -hotcold base_image aux_image_1 aux_image_2 color-coded maps (default: warm) of aux images over grayscale first image * if "-cold" specified in addition to "-map" then color scheme will be cold * if "-hotcold" specified, then you must also provide a third volume (i.e. second auxiliary volume) the first auxiliary volume is rendered in hot, overwrites the second auxiliary rendered in cold One useful application is to use an image with positive values as the "hot" and a second image with negative values as the "cold" NB for the mapping options, you can also invoke multiple images as long as the correct numbers are supplied. e.g. sv -map base_image1 aux_image1 base_image2 aux_image2 gives 2 control-locked windows with the specified color mappings -diff base_image aux_image difference of first image minus second (one auxiliary image) -interp image ... do intensity interpolation to render image in accurate aspect ratio Rendering methods ----------------- Default rendering is to associate screen pixels with voxel slice lattice, so aspect ratios may be inaccurate for non-square slices. This is overcome using the "-interp" option which interpolates pixel intensities using trilinear interpolation for accurate aspect ratios at the cost of some image sharpness. Also, "-interp" option is not as accurate for float images Selected GUI-based features --------------------------- From the slice viewer window numerous features can be selected -Icons have help balloons so these will not be explained here -Menu items: --View Adjust image by flipping and rotating; also select rendering palettes --Image Shows selection of auxiliary windows to depict image characteristics these include histogram and mapping color bars --MapType Allows selection of labels for color bars in case of map options --ImageAdjust Brightness and contrast adjustments image thresholding when color mapping is not present
svcleanupWhen performing automated skullstrip operations it is often necessary to manually add or remove pieces overlooked by the algorithm. svcleanup displays the stripped brain in orange overlaid on the gray-scale whole head image. Two cutting modalities (brush or scalpel) allow the user to remove or add pieces to the desired brain mask.
Figure 2. Manual cleanup after automated skull removal.
svcleanup 1998_3DT1_COR_092601.hdr 1998_3DT1_COR_092601_stripped.hdr
Image cutting and restoringFor this function, varying square "brush" sizes can be selected (shown: 32 voxels square). A left-click fills in the area to be kept (turns it orange) and a right click removes the area (turns it gray). In the example of the figure, the brush modality has been selected (green outlined in the toolbar). The square brush has removed an area (right click) and then been moved slightly.
There is also a cutting function (scalpel icon) which can be used instead of the brushes. The orange area may be saved as the cleaned stripped image.
svcleanup Call syntax
Usage: svcleanup unstripped_image stripped_image Manual cleanup of image produced from automatic skullstrip Input two images (specify their header names): --Original unstripped image (i.e. with skull in place) --Stripped image (from automatic skullstrip) After cleanup, the cleaned version will overwrite the input stripped image or else you can save the cleaned version as a mask Key press options: ----------------- with cursor in image window, press designated keys to paint multiple slices 0 paint all slices (forward and back) from current slice 1 to 9 paint that many slices forward a paint 20 slices forward, or to end of image b paint 40 slices forward, or to end of image c paint 60 slices forward, or to end of image Paint options: -------------- Pointing hand cursor: no image adjustment. To adjust image: Toggle between brush and scalpel modes on toolbar *Square brush with selected size 2-32 from toolbar: -click "Brush" button --> square cursor in window, green outline of button -left mouse press --> fill region of square cursor -right mouse press -> erase region of square cursor *Scalpel: -click scalpel icon --> arrow cursor in window, green outline of icon -draw contour -right mouse button click to close -click inside or outside of contour to select region
6552 unique visits since Feb 6, 2008