Standard Deviation Threshold

From MIPAV
Revision as of 13:44, 7 February 2012 by Angelfish100 (Talk)

(diff) <previousrevision> | Latest revision (diff) | <nextrevision> (diff)
Jump to: navigation, search

Mipavfinallogo.gif


Standard Deviation Threshold

Background

Standard Deviation Threshold works by, first, examining an active VOI for which the standard deviation (st.dev) of pixel intensities and other statistics are calculated. The algorithm, then, thresholds an image using the user defined parameters, such as a number of standard deviations and/or values outside the range. The thresholding can be done on the whole image or, alternatively, on other not active VOI(s) that might be on the image.

Figure 1. (a): an original image with delineated single VOI, (b): the image thresholded using the default parameters opened in a new image frame, (c) the thresholded image painted over the original image, (d) VOI statistics for the original image

StDev1.jpg

Image types

You can apply this algorithm to all 2D, 3D, and 4D color (RGB) and grayscale images.

Applying the algorithm to grayscale images

Noteicon.gif

Note that in order to run Standard Deviation Threshold you should have at least one active VOI on your image.


To use this algorithm, do the following:

  1. Select at least one VOI on your image.
  2. Launch the tool from Algorithms > Segmentation > Threshold > Threshold Using Standard Deviation.
  3. The top of the Threshold Using Standard Deviation dialog box will show the statistics for the active VOI(s).
  4. In the middle Threshold Parameters box enter the user input parameters, such as
    • Number of standard deviations, which is used to create the threshold range. Once you've defined the standard deviation for the normal tissue, the range is calculated using the Number of standard deviations parameter.
    • Values outside threshold are the values that will be assigned to pixels which are outside of the threshold range. The default value is set to zero. This parameter is later used to for calculating an inverse threshold.
    • Inverse threshold - this option is checked by default. When the Inverse threshold option is active, the image intensity values outside the threshold range are kept, and the ones in the threshold are set to the values outside.
    • Set min threshold value to image min - once the intensity range is calculated, you might want to stretch out the range to image min. This eliminates the background noise.
    • Set max threshold to image max - use this option to stretch out the range to image max.
  5. In the Destination Box, specify where you want the thresholded image to appear. You might choose between opening the thresholded image in a new image frame or paint it on the existing image.
  6. You can apply the tool to the whole image or only to other VOI(s) that might be delineated in the image.
  7. Press OK to run the algorithm.

Results get displayed in the Output window. See also [StandardDeviationThreshold.html#wp1027269 Figure 1] and [StandardDeviationThreshold.html#wp1027525 Figure 2].

The Threshold Using Standard Deviation dialog box options for grayscale images:


Figure 2. Threshold Using Standard Deviation dialog box options for grayscale imagesÂ

Active VOI statistics
This box shows statistics for the selected VOI(s) which were used to calculate a standard deviation.
Number of pixels - a total number of pixels in selected VOI(s);
Sum pixel intensities - a sum of intensities over all pixels in VOI(S);
Average pixel intensity equals Sum pixel intensities divided to Number of pixels;
Standard deviation of pixel intensity is a standard deviation calculated based on the following values Number of pixels, Sum pixel intensities, and Average pixel intensity.
ThresholdUsingStDevDBGray.jpg
Threshold parameters
Number of standard deviations
is used to create the threshold range. Once you've defined the standard deviation for the normal tissue, the range is calculated using that parameter.
Values outside threshold
are the values that will be assigned to pixels which are outside of the threshold range. The default value is set to zero.
Inverse threshold
- this option is checked by default. When the Inverse threshold option is active, the image intensity values outside the threshold range are kept, and the ones in the threshold are set to the values outside.
Set min threshold value to image min
- once the intensity range is calculated, use this parameter to stretch out the intensity range to image min. This helps to eliminate the background noise.
Set max threshold to image max
- use this option to stretch out the range to image max.
Destination
In that box, specify where you want the thresholded image to appear. You might choose between opening the thresholded image in a new image frame or paint it on the existing image.
Threshold
Select Whole Image to apply the tool to the whole image;
Select VOI(S) regions to apply the tool only to other VOI(s) that might be delineated in the image.
OK
Applies the algorithm according to the specifications made in the dialog box.
Cancel
Disregards any changes that you made in the dialog box and closes this dialog box.
Help
Displays online help for this dialog box.

Applying the algorithm to RGB images

Noteicon.gif

Note that in order to run Standard Deviation Threshold you should have at least one active VOI on your image.


To use this algorithm, do the following:

  1. Select at least one VOI on your image.
  2. Launch the tool from Algorithms > Segmentation > Threshold > Threshold Using Standard Deviation.
  3. The top of the Threshold Using Standard Deviation dialog box will show the statistics (per channel) for the active VOI(s).
  4. In the middle Threshold Parameters box enter the user input parameters, such as
    • Number of standard deviations, which is used to create the threshold range. Enter the number of st.dev for each channel - R, G, and B channels.
    • Values outside threshold are the values that will be assigned to pixels which are outside of the threshold range. The default values for each channel are set to zero. These values are later used to for calculating an inverse threshold.
    • Inverse threshold - this option is checked by default. When the Inverse threshold option is active, the image intensity values outside the threshold range are kept, and the ones in the threshold are set to the values outside.
    • Set min threshold value for R, G, and B to image min - once the intensity range is calculated, you might want to stretch out the intensity range for each channel to image min. This eliminates the background noise.
    • Set max threshold value for R, G, and B to image max - use this option to stretch out the intensity range for each channel to image max.
  5. In the Destination Box, specify where you want the thresholded image to appear. You might choose between opening the thresholded image in a new image frame or paint it over the existing image.
  6. You can apply the tool to the whole image or only to other VOI(s) that might be delineated in the image.
  7. Press OK to run the algorithm.

Results get displayed in the Output window. See also [StandardDeviationThreshold.html#wp1028253 Figure 3] and [StandardDeviationThreshold.html#wp1028709 Figure 4].

Figure 3. (a): an original RGB image with delineated single VOI, (b): the same image thresholded using the default parameters opened in a new image frame, (c) statistics for the original image appears in the Output MIPAV window, (d) the Threshold Using Standard Deviation dialog box for RGB images with the default settings

StDevRGB.jpg

sm

The Threshold Using Standard Deviation dialog box options for RGB images:

Figure 4. Threshold Using Standard Deviation dialog box options for RGB imagesÂ

Active VOI statistics
This box shows statistics for the selected VOI(s) which were used to calculate a standard deviation.
Number of pixels - a total number of pixels in selected VOI(s);
Sum pixel intensities - a sum of intensities over all channels for all pixels in VOI(s);
Average pixel intensity equals Sum pixel intensities divided to Number of pixels;
Standard deviation of pixel intensity is a standard deviation calculated based on the following values Number of pixels, Sum pixel intensities, and Average pixel intensity.
ThresholdUsingStDevDBRGBjpg.jpg
Threshold parameters
Number of standard deviations per channel (R, G, and B)
is used to create the threshold range. Once you've defined the standard deviation for each channel R, G, and B for the normal tissue, the range is calculated using that parameter.
Values outside range (0 to 255)
are the values that will be assigned to pixels which are outside of the threshold range. The default value is set to zero.
Inverse threshold
- this option is checked by default. When the Inverse threshold option is active, the image intensity values outside the threshold range are kept, and the ones in the threshold are set to the values outside.
Set min threshold value to image min
for each channel R, G, and B.
- once the intensity range is calculated, use this parameter to stretch out the intensity range for each channel R, G, and B to image min. This helps to eliminate the background noise
Set max threshold to image max
for each channel R, G, and B
- use this option to stretch out the intensity range for each channel to image max.
Destination
In that box, specify where you want the thresholded image to appear. You might choose between opening the thresholded image in a new image frame or paint it on the existing image.
Threshold
Select Whole Image to apply the tool to the whole image;
Select VOI(S) regions to apply the tool only to other VOI(s) that might be delineated in the image.
OK
Applies the algorithm according to the specifications made in the dialog box.
Cancel
Disregards any changes that you made in the dialog box and closes this dialog box.
Help
Displays online help for this dialog box.

Imaging Sciences Laboratory, CIT, NIH
Matthew McAullife, Ph.D.
mcmatt@exchange.nih.gov
301-594-2432
Building 12A, Room 2041,
9000 Rockville Pike, Bethesda, MD 20892