Count Image Objects Help

This widget counts regions in the image. It is applied to the image after the brightness sliders from the Edit Volume widget and after any colocalization culling from the Colocalization widget. A region is a connected (even if only by their corners touching) group of voxels all of which have nonzero intensity and are at least somewhat opaque. Note: there is a separate program "countobjs" which does the same thing in a noninteractive manner. This can be useful if you just need statistics or if you want to analyze the data several times with different parameter settings.

NOTE: only 253 objects can be counted and displayed in this DAVE widget.

However, if you write the statistics out to a file, all the objects (even

if greater than 253) will be written out. See "Open Stats File" below.

NOTE: I don't think this widget works with triple labelled data sets yet.

Smallest Region

Only regions which have at least this many voxels in them will be considered valid regions. Thus, isolated voxels due to "noise" can be eliminated from consideration by setting this number to something greater than one.

Largest Region

Regions which have more than this many voxels are not considered valid regions. Thus large objects such as a nucleus can be excluded from consideration by setting the largest region size to be larger than the regions of interest but smaller than the size of the nucleus.

Lower Threshold 1

This is usually set automatically based upon the position of the left brightness slider. However you may want to set this manually when you are working with 16 bit data (DAVE -t command line option), since the slider only gives 8 bit accuracy. Type the desired threshold into the box (in the original range of your data). Note: the displayed view will still be based upon an 8 bit approximation, but the actual analysis will be done on the 16 bit data.

Lower Threshold 2

The plan is for this threshold to apply to image 2 (if two images have been read in). Currently threshold 1 is applied to both images.

COUNT

Once the sliders are set to pick out the regions ofinterest, pressing COUNT will count the regions and display the results in the widget. Each region is displayed on a line and highlighted (selected) in yellow. Summary statistics are displayed above this listing. Statistics are based upon the original voxel values (i.e., they will not vary with a change in the brightness sliders unless that causes different voxels to be included in a region). The coordinate of the brightest voxel in each region is also printed. Coordinates are zero indexed (i.e., the first voxel has coordinates 0,0,0). All region analysis is done at the initial (highest) level of resolution, regardless of the resolution at which the data is displayed. In addition, this analysis works regardless of which display mode (e.g., planes or cubes) is currently being used. Since DAVE only stores values scaled to 1 byte (0-255), it approximates the original value of each voxel by rescaling the one byte number based upon the scale and black level which was originally used to convert voxel values into one byte. Therefore the numbers may not be exactly the same as the original ones, and are also floating point numbers (since the scale factor can be noninteger). You can use the 16 values by specifying -t on the command line. NOTE: any time the selected regions changes, or the left brightness slider or colocalization widget are changed, the displayed statistics will be out of date. COUNT or RECALC must be pressed to update the statistics. If the colocalization widget is active ("Show Colocalized Voxels" is pressed on that widget) then the regions that the Count Widget counts are based upon the Colocalization settings (but you should set the Colocalization widget to only display the colocalized regions and not the image1 or image2 voxels since count will count whatever is displayed).

RECALC

A region can be deselected by picking on its line (it may also be reselected in this way). Once only the desired subset of regions is chosen, pressing RECALC will cause the summary statistics above the region listing to change to only reflect the currently selected regions. NOTE: any time the selected regions changes, or the left brightness slider or colocalization widget are changed, the displayed statistics will be out of date. COUNT or RECALC must be pressed to update the statistics.

Deselect All Lines

Rather than picking each line separately, all lines (and hence all regions) can be deselected at once by pushing this button. Then only those regions which are desired can be reselected (by picking on the appropriate line) one at a time.

Select All Lines

Rather than picking each line separately, all lines (and hence all regions) can be selected at once by pushing this button. Then only those regions which are not desired can be deselected (by picking on the appropriate line) one at a time.

Inspecting Individual Regions

Select One Line

It is often useful to visually inspect individual regions. Activating this button causes all regions to be deselected and set into a mode so that only one region at a time can be selected (by default the first region in the object list is selected). Selecting a second region automatically deselects the previous region. It also causes the viewing window crosshairs to be positioned at the brightest voxel in the selected region (Show Crosshair in the menu must be picked for the crosshair to actually be visible). This region can be visually highlighted by the use of the following buttons. You can also select one region by picking near the region with an intelligent cursor. You should first activate the Select One Line button, and then go to the Edit Crosshair widget and pick "Intelligent Cursor - Object" from the menu (see the help there for more details). Once this is done, picking near a region will cause the crosshair to jump to the brightest voxel in that region and the associated line in the object list to be highlighted.

Show Region

Pushing this button causes the region that the crosshair is positioned on (i.e., the region specified by the currently selected line) to be filled with a Floodfill color (default is yellow). This makes the region visually distinct from the surrounding data volume. The color of these voxels can be changed by choosing "Floodfill Color" from the Menu. Visualizing the extent of the region is often useful since the region may be larger than expected due to dim, mostly transparent voxels connecting the region. See the note below. Note: this option does not always work well when your data is very opaque (the Floodfill color is quickly overwritten by the data values sometimes).

Hide Region

Turns Show Region off.

The Region of Interest (ROI) Analysis widget may also aid in examining individual regions (this widget is gotten from the Goodies menu in the DAVE Master widget).

Menu Options

Floodfill Color

This determines the color the region will be displayed in when the Show Region button is pressed. Note: sometimes, when data is very bright or opaque, it is difficult to see this (the data values overwrite the floodfill values).

Defining a Region of Interest

By default, the nonclipped data volume (at original resolution) is examined for regions. If the data volume is clipped (using the Volume Clipping widget gotten from the Edit Volume menu), then only the region which is not clipped (i.e., the displayed region) is examined. Sections of the data which are not visible because the data volume has been scaled up or translated (using the Scale and Translate controls on the DAVE Master widget) will still be included in the region count. By picking "ROI Box" from the menu, the region to be examined can be changed to be the region specified by a Region Of Interest (ROI) box. This box is easy to move around to different areas in the image. See the HELP for the ROI Analysis widget (gotten from the Goodies menu in the DAVE Master widget) for more information on how to specify this box.

Using the Region of Interest

There are several ways the the Region of Interest can be employed to restrict which data should be analyzed (in addition to just its size and position). If "Discard objects extending outside region" is picked, then any object which extends outside the region is not counted at all - even the part of it which is inside the region. If "Keep objects extending outside region" is picked then any region which has any part inside the region of interest will be counted in its entirety. Thus voxels outside the "examined region" are counted if they are connected to voxels inside the region. If "Eliminate points outside region" is picked, all voxels outside of the region are conceptually zeroed out. Thus the part of the object inside the region is counted and the part outside the region is not counted (it may also create 2 objects where only one existed since the two objects inside the region of interest may have been connected by voxels outside the region of interest). This is useful for eliminating entire out of focus z-planes for instance. Note: sometimes when there are too many voxels in one region, DAVE dies (at least I think that is what causes it to die). This typically shows up when "Keep Objects Extending Outside Region" is selected since this allows objects to get very large.

Show Crosshair

Pick this if you want to see the crosshair. You probably want to do this when using the "Select One Line" button to examine individual regions. The "Edit Crosshair" widget has more stuff on using the crosshair (but you don't need to use that widget).

Center on Crosshair

Whenever you pick this entry the image will be translated in the DAVE viewing window so that the voxel which the crosshair is positioned on will be moved to the center of the window.

Erase Nonselected Regions

The point beind this option is to use the deselection process in the Count Widget to delete from the display (and from statistics) regions which are not of interest. DAVE keeps 2 views around. The default "complete" view of the data and an "edited version". Each time this item is chosen, any nonselected objects will be deleted from the edited version. If you want to view the edited version instead of the complete version you must pick "display selected regions" (see below). Note: Once a region has been erased you cannot see it in the edited version (even if you reselect it) until you create a new edited version by doing a new COUNT of the objects.

Display selected regions

This item should be selected if you want to view the "edited version" of the data set (see "erase nonselected regions" above). You must be in cubes visualization mode in order for this to work (Edit->Volume->(menu)->cubes).

Open Stats file

This cause all subsequently calculated statistics to be appended to the specified file (which will be created if necessary). This also will count all objects, even if more than 253 objects exist.

Close Stats file

Use this to close the statistics file (not necessary) or to change the name of the file (e.g., by closing the current file and then opening a different file).

Additional Notes

Count 3D objects

The analysis is done in 3D.

Count 2D objects

The analysis is done one z plane at a time; so connectedness in the z direction does not count.

Rendering Speedups

If your image is fairly sparse after you have set the opacity and brightness sliders, you may want to change display modes to render in "Cubes" mode. Cubes mode has an internal speedup option for looking at large sparse images quickly (assuming you are just rotating it around and not changing its brightness or opacity values, that will still take a normal amount of time). This can be gotten from the menu in the Edit Volume widget. See the help there for more details.

Visually unnoticed voxels still may count

Visually you may not notice voxels which are almost totally transparent, yet they count towards region definition as long as they are not totally transparent. You can make these voxels more visually apparent (if you desire) by making all voxels whose brightness has not been mapped to zero (i.e., whose values are greater than the left brightness slider setting) to be totally opaque. This is done by choosing the "Edit Volume Options" from the menu in the Edit Volume widget. The choose "Opaque Data" from its menu. You might also want to change your background color (Edit Bkgd Color from the DAVE Master Widget) to be something other than black - since it is difficult to see nearly black voxels against a black background. The only slider that affects the actual definition of regions is the left brightness slider (since voxels with a value less than this are set to zero). The HELP button in the Edit Volume widget explains the function of its sliders and menu options in more detail.


Copyright 1995 by Lawrence M. Lifshitz and the University of Massachusetts Medical School. All rights reserved.