Calculating statistics on VOI groups

From MIPAV
Jump to: navigation, search

The Statistics Generator command on the VOI menu in the MIPAV window opens the Calculate Statistics on VOI Groups window, which allows you to obtain statistics on one VOI or on multiple grouped VOIs. You can save the statistics to a tab-delimited file, which can then be incorporated into a database.

Calculating Statistics on VOI Groups

The Calculate Statistics on VOI Groups dialog box includes three tabs:

  • VOI Selection page - on this page you can select the VOIs on which to calculate the statistics. It also allows you to name and save the logging file at the path you choose.
  • Statistics Options page - provides a choice of the types of statistics that may be calculated as well as the conditions under which they may be run.
  • Logging page - provides the results of the statistics in a tabular form. Depending on the number of VOIs included in the calculation, the results may include one or more lines of text.

VOI Selection page in Calculate Statistics on VOI groups window

VOI Selection
VOI Selection page in Calculate Statistics on VOI groups window
VOI groups list-left
Lists all of the VOIs found on the image.
VOI groups list-right
Lists the VOIs on which you plan to calculate statistics.
ButtonSendAllLeft.jpg Send all left
Moves all of the VOIs that appear in the VOI groups list on the right to the VOI groups list on the left.
ButtonSendSelectionLeft.jpg Send selection left
Moves the selected VOI that appears in the VOI groups list on the right to the VOI groups list on the left.
ButtonDeleteSelection.jpg Delete selection
Deletes the selected VOI in either the VOI groups list on the left or the VOI groups list on the right.
ButtonSendSelectionRight.jpg Send selection right
Moves the selected VOI in the VOI groups list on the left to the VOI groups list on the right on which you plan to calculate statistics.
ButtonSendAllRight.jpg Send all right
Moves all of the VOIs, whether they are selected or not, in the VOI groups list on the left to the VOI groups list on the right on which you plan to calculate statistics.
VOI statistics file destination
Specifies the file path, file name, and file extension to which you want to save the file.
Browse
Allows you to navigate to the directory on your workstation or attached disks where you want to store the file.
Tab-delimited
Saves the statistics in a comma-separated tab-delimited file. The extension for this file is.TABLE.
XML
In development.
Calculate
Runs all statistics that are selected on the Statistics Options page according to the options specified.
Close
Closes this window.
Help
Displays online help for this window.

To calculate statistics on VOIs

  1. Open an image.
  2. Delineate one or more VOIs on the image.
  3. Select one of the VOIs by clicking it.
  4. Hold down the Shift key and select the next VOI.
  5. Continue holding down the Shift key and selecting VOIs until all of the VOIs to be included in the calculation are selected.
  6. Select VOI > Group VOIs.
  7. Select VOI > Statistics Generator. The Calculate Statistics on VOI Groups window opens showing the VOI Selection page.
  8. Select the VOI group, which appears in the left VOI groups list.
  9. Click the Send selection right button. The group appears on the right VOI groups list.
  10. Do one of the following:
  • Accept the default path and file name for the logging file, where the statistics are stored, in VOI statistics file destination.
  • Update the path and file name for the logging file.
Specifying the output file
  • Select the format of the logging file in Output format.
  • Select Statistics Options. The Statistics Options page appears.
  • Select the statistics you want to include in the calculation in the Statistics to calculate list by doing one of the following:
    • Click on the individual check boxes for each specific statistic.
    • Click Select all to run all of the statistics.
  • Select one of the following options in the Statistics options group:
    • By contour & slice
    • By slice only
    • By total VOI
  • Select Show all totals if appropriate.
  • Click Calculate. The Logging page appears with the results of the statistics you selected.
  • Click Close when finished to close the Calculate Statistics on VOI Groups window.
  • Tip: If you, for example, clicked Select all and then decide that you don't want the software to calculate all of the statistics, it may be faster to click Clear to remove the check marks from all of the check boxes. You can then select only the statistics you want to calculate.

    Statistics Option page in Calculate Statistics on VOI Groups

    Statistics Option page in Calculate Statistics on VOI Groups
    Statistics to calculate
    No. of voxels-Indicates the number of voxels-including voxels that span frames in an image stack-enclosed in the VOI.
    Volume-Measures the amount of space occupied by a 3D VOI. To calculate the volume, the software multiplies the number of pixels by the resolution of each dimension.
    Area-Measures the surface of the VOI. To calculate the area, the software multiples the number of pixels by the resolutions of the x and y dimensions.
    Average voxel intensity-Calculates the average intensity of the voxels in the VOI by adding the intensity of all voxels in the VOI and dividing the result by the sum of the voxels.
    Std. dev. of voxel intensity-Calculates the standard deviation of the intensity of the voxels in the VOI.
    Center of mass-Indicates the point at which the whole mass of the VOI is concentrated. It is calculated as the sum of all x coordinates divided by the number of points and the sum of all y coordinates divided by the number of points.
    Principal axis (only 2D)-Calculates the principal axis for 2D images only.
    Eccentricity (only 2D)-Describes the geometric shape of the VOI as an ellipse, with 0 indicating a circle and 1 indicating a straight line.
    Statistics options
    By contour & slice-Runs the selected statistics on both the contour and slice.
    By slice only-Runs the selected statistics on only the slice.
    By total VOI-Runs the selected statistics on the entire VOI.
    Show all totals-Specifies to display all of the totals for __________.
    Pixel exclusion
    Exclude pixels from calculation-Indicates to exclude the pixels in the Pixel range boxes from the calculation. When you select this check box, the Exclude pixels button and the Pixel range boxes become available.
    Exclude pixels-Indicates to exclude the pixels between, above, below, or outside the range shown in the Pixel range boxes.
    Pixel range-Lists a specific range of pixels between, above, below, or outside that should be excluded in the calculations.
    Select all
    Selects all of the statistics listed in the Statistics to calculate group.
    Clear
    Clears all of the statistics listed in the Statistics to calculate group.
    Calculate
    Runs all statistics that are selected on the Statistics Options page according to the options specified.
    Close
    Closes this window.
    Help
    Displays online help for this window.

    To exclude a range of pixels from the calculations

    When you run statistics on VOIs in an image but want to exclude a specific range of pixels from the calculations, make sure that you do the following:

    1. Select Exclude pixels from calculation on the Statistics Options page in the Calculate Statistics on VOI Groups window. The Exclude pixels list and the Pixels range boxes become available.
    2. Select Between, Above, Below, or Outside in the Exclude pixels list.
    3. Type a range of pixels in the Pixel range boxes.
    4. Continue to select statistics and other options for the calculation.
    5. Click Calculate.

    Logging page in the Calculate Statistics on VOI Groups Window

    Logging page in the Calculate Statistics on VOI Groups Window
    Statistics table
    Lists all of the statistics that were calculated according to the selected statistics and the options specified on the Statistics Options page.
    Calculate
    Runs all statistics that are selected according to the options specified on the Statistics Options page.
    Close
    Closes the window.
    Help
    Displays online help for this window.

    However, you can easily change the file name by typing over the default file name in the VOI statistic file destination box on the VOI Selection page in the Calculate Statistics on VOI Groups window. To change the path, type over the current path, or click Browse to select another path.

    To use the calculations in a database application

    Saving the statistics in a tab-delimited file allows you to import them into a database application. </li>

    1. Make sure-before running the calculations-that you select the Tab-delimited check box on the VOI Selection page in the Calculate Statistics on VOI Groups window.
    2. Change the path and file name, if necessary, in the VOI Statistics File Destination box on the VOI Selection page.
    3. Click Calculate. The resulting statistics appear on the Logging page and in the file you specified.

    To rearrange the columns in the logging table

    You can adjust the order in which the columns in the logging table appear as well as their width. To change the order, simply click on the title of a column and drag the column to the new position. To make a column wider, click on the line between it and the next column and drag it to the desired width.

    To compare statistics

    If you calculate statistics on an image more than once in a MIPAV session, the Logging page shows the previously run calculations for the VOIs in that image. For example, suppose you calculate statistics on the VOIs in an image and then save the image and close it. Later, you reopen the image and decide to run additional statistics on the previous VOIs or on any new VOIs. As long as you did not exit MIPAV and are therefore in the same session, the Logging page in the Calculate Statistics on VOI Groups window still displays the results of the statistics you previously ran on the VOIs in the image.

    When you perform additional calculations on the same or new VOIs on that image or on VOIs in another image, the results of those calculations appear below the earlier run statistics. This allows you to compare the results of both.

    To clear, or delete, all of the statistics on the Logging page

    When you no longer need the statistics on the Logging page or after you saved them to a file, you can clear, or delete, all of the statistics on the Logging page. To do so, do one of the following:

    • Select Options > Clear logging page in the Calculate Statistics on VOI Groups window.
    • Press Alt C.
    • Select Clear on the Statistics Options page.

    The software deletes all of the statistics on the Logging page.

    To overwrite logging files automatically

    The File Exists message

    If you ran calculations previously in your current MIPAV session and then select Calculate in the Calculate Statistics on VOI Groups window, the File Exists message appears asking whether to overwrite the previously saved logging file or cancel the action. If you select Overwrite, the software replaces the previously saved file with the new statistics. Selecting Cancel means that MIPAV does not perform any calculations.

    Recommendation: It is recommended that you decide in advance on a standard procedure for handling statistics files. That is, do you need to keep them for historical purposes? Do you need to keep statistics on individual images in separate files? If so, you may want to assign unique names to the statistics file for each image. If not, you may want to simply overwrite the statistics file each time you calculate statistics of VOI groups.

    If you do not want to keep the statistics in separate files, it may become tiresome to always receive and need to respond to the File Exists message. To this end, the software offers an option for always overwriting the logging files. To use this option, simply select Options > Overwrite File Automatically in the Calculate Statistics on VOI Groups window.

    Tip: To turn the overwrite command on, press Alt O on the keyboard. To turn it off, press Alt O again.

    See also: