Filters (Wavelet): Thresholding and Flipping images: Difference between pages

From MIPAV
(Difference between pages)
Jump to navigation Jump to search
m (1 revision imported)
 
MIPAV>Olga Vovk
mNo edit summary
 
Line 1: Line 1:
The wavelet transform or wavelet analysis is a solution to overcome the shortcomings of the Fourier transform. In wavelet analysis, the modulated window is shifted along the signal, and for every position, the spectrum is calculated. Then, this process is repeated many times with a slightly shorter (or longer) window for every new cycle. In the end, the result appears as a collection of time-frequency representations of the signal, all with different resolutions. Since the modulated window is fully scalable, this solves the signal-cutting problem which arises in the Fourier transform.
MIPAV allows you to flip images either horizontally, or vertically, or invert the order of slices in the image dataset. The last option is available via the Utilities&gt;Flip Image&gt; In Depth menu.<br />
'''To flip an image, '''<br />
# Call Utilities &gt; Flip &gt; Horizontal, Vertical of In Depth.
# Then, complete the dialog box that appears, and press OK.
# After a few moments, the flopped image replaces the original image in the same image window. For dialog box options, refer to Figure 21. <br />


Because the result appears as a collection of time-frequency representations of the signal, we can speak of a multi resolution analysis. However, in the case of wavelets, we normally do not speak about time-frequency representations, but about time-scale representations, scale being in a way the opposite of frequency, because the term frequency is reserved for the Fourier transform.
{| width="90%" border="1" frame="hsides" frame="hsides"
|-
| width="9%" valign="top" |
[[Image:noteicon.gif]]
| width="81%" bgcolor="#B0E0E6" |
[http://mipav.cit.nih.gov/documentation/HTML Algorithms/FiltersWaveletThresholding.html For more information about the algorithm, refer to MIPAV Volume 2 User Guide on the MIPAV web site:{http://mipav.cit.nih.gov/documentation/HTML Algorithms/FiltersWaveletThresholding.html} ]
|}
<br />
== Background ==
=== Outline of the algorithm ===
The image is expanded so that all dimensions are powers of 2 and there is zero padding going past each original boundary by the coefficient number equals 2.
# The image is transformed into wavelet coefficients using the threshold type selected by the user.
# The signal reconstructed from wavelet coefficients.
# Then, an inverse wavelet transform is performed.
# The image is stripped down to its original size. The data is clamped so as not to exceed the bounds of the data type of the image into which it is imported.
{| width="90%" border="1" frame="hsides" frame="hsides"
|-
| width="9%" valign="top" |
[[Image:noteicon.gif]]
| width="81%" bgcolor="#B0E0E6" | Note: the forward and inverse Daubechies wavelet transform routines are taken from Numerical Recipes in C, The Art of Scientific Computing 2nd edition by William H. Press, Saul A. Teukolsky, William T. Vetterling, and Brian P. Flannery, Cambridge University Press, 1997, Chapter 13.10, pp. 591 606.
|}
<br />
== Image types ==
2D and 3D black and white images.
== Applying the Wavelet Thresholding algorithm ==
To use this algorithm, do the following:
# To apply the algorithm, do the following:
# Open an image of interest.
# Navigate to Algorithms &gt; Filters Wavelet &gt; Thresholding.
# In the Wavelet Thresholding dialog box that appears, complete the following fields:
#* In the Number of Terms list box, select 4, 12 or 20. Numbers of Terms here means the number of wavelet vanishing moments or an approximation order;
#* In the Wavelet Threshold box, specify the threshold value;
#* To specify the threshold type, use the radio buttons: Hard, Soft, Nonnegative garrote, and SCAD;
#* To display the log magnitude wavelet image, check the corresponding box. Displaying this image will help you to adjust the algorithm settings;
#* Select the destination, use the New Image option to view the result image in a new frame, or use the Replace Image option o view the result image in the same frame.
# Press OK. The algorithm begins to run and the new image appears in the specified frame.
=== Wavelet Thresholding dialog box ===
<div>


{| border="1" cellpadding="5"
{| border="1" cellpadding="5"
|+ <div>'''Figure 1. Wavelet Thresholding dialog box ''' </div>
|+ ''' Figure 21. The Flip Image dialog box options '''
|-
|
<div>'''Number of terms''' </div>
|
<div>- this is the number of wavelet vanishing moments or an approximation order. Select 4, 12 or 20. </div>
| rowspan="8" colspan="1" |
<div><div align="left">[[Image:FiltersWaveletThresholdingaq.jpg]]</div> </div>
|-
|-
|
|
<div>'''Wavelet threshold''' </div>
<div class="CellBody"><span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: baseline">'''<font color="#000000">Options</font>'''</span></div>
|
|
<div>- use to specify the threshold value </div>
<div class="CellBody"><span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: baseline">'''<font color="#000000">Flip all VOIs </font>'''</span>- flips an image along with all VOIs.</div>
|-
| rowspan="2" colspan="1" |
| rowspan="4" colspan="1" |
[[Image:FillImage.jpg]]
<div>'''Hard''' </div><div>'''Soft''' </div><div>Nonnegative garrote </div><div>SCAD </div>
| rowspan="4" colspan="1" |
<div>- use these radio buttons specify the threshold type. </div>
|-
|-
|-
|-
|-
|
|
<div>'''Display log magnitude wavelet image''' </div>
<div class="CellBody"><span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: baseline">'''<font color="#000000">Flip Axis</font>'''</span></div>
|
|
<div>- check this box to display the log magnitude wavelet image. Displaying this image will help you to adjust the algorithm settings. </div>
<div class="CellBody">Vertical (X Axis) - flips the image vertically;</div> <div class="CellBody">Horizontal (Y Axis) - flips the image horizontally;</div> <div class="CellBody">Depth (Z Axis) - flips the image about the Z axis.</div>
|-
|-
|
|
<div>'''New image''' </div>
<div class="CellBody"><span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: baseline">'''<font color="#000000">OK</font>'''</span></div>
|
| rowspan="1" colspan="2" |
<div>use this to view the result image in a new frame. </div>
<div class="CellBody">Applies the parameters that you specified to flip the image.</div>
|-
|-
|
|
<div>'''Replace image''' </div>
<div class="CellBody"><span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: baseline">'''<font color="#000000">Cancel</font>'''</span></div>
| rowspan="1" colspan="2" |
| rowspan="1" colspan="2" |
<div>use this to view the result image in the same frame. </div>
<div class="CellBody">Disregards any changes you made in this dialog box, closes the dialog box, and does not flip the image.</div>
|-
|-
|
|
<div>'''OK''' </div>
<div class="CellBody"><span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: baseline">'''<font color="#000000">Help</font>'''</span></div>
| rowspan="1" colspan="2" |
| rowspan="1" colspan="2" |
<div>Applies the algorithm according to the specifications in this dialog box. </div>
<div class="CellBody">Displays online help for this dialog box.</div>
 
|}
 
 
{| border="1" cellpadding="5"
|+ '''Figure 22. An original image (A), image flipped horizontally (B), and then vertically (C)'''
|-
|-
|
|
<div>'''Cancel''' </div>
[[Image:Originala.jpg]]
| rowspan="1" colspan="2" |
A
<div>Disregards any changes that you made in the dialog box and closes this dialog box. </div>
|
|-
[[Image:Horizontal.jpg]]
B
|
|
<div>'''Help''' </div>
[[Image:Vertically.jpg]]
| rowspan="1" colspan="2" |
C
<div>Displays online help for this dialog box. </div>
|}
|}
'''To invert the order of images in datasets'''<br />
1 Open an image that contains slices.<br />
2 Select Utilities &gt; Flip&gt; Flip in Depth.<br />
A status message appears and indicates that the software is reordering the slices in the dataset. In a moment or two the MIPAV window refreshes, and the image window in which the original dataset appeared displays the reordered slices.<br />
==See also: ==
[[Changing Image Datasets Using MIPAV Utilities]]
[[Image Calculator]]


[[Category:Help]]
[[Category:Help]]
[[Category:Help:Algorithms]]

Revision as of 20:06, 21 September 2012

MIPAV allows you to flip images either horizontally, or vertically, or invert the order of slices in the image dataset. The last option is available via the Utilities>Flip Image> In Depth menu.
To flip an image,

  1. Call Utilities > Flip > Horizontal, Vertical of In Depth.
  2. Then, complete the dialog box that appears, and press OK.
  3. After a few moments, the flopped image replaces the original image in the same image window. For dialog box options, refer to Figure 21.


Figure 21. The Flip Image dialog box options
Options
Flip all VOIs - flips an image along with all VOIs.

FillImage.jpg

Flip Axis
Vertical (X Axis) - flips the image vertically;
Horizontal (Y Axis) - flips the image horizontally;
Depth (Z Axis) - flips the image about the Z axis.
OK
Applies the parameters that you specified to flip the image.
Cancel
Disregards any changes you made in this dialog box, closes the dialog box, and does not flip the image.
Help
Displays online help for this dialog box.


Figure 22. An original image (A), image flipped horizontally (B), and then vertically (C)

Originala.jpg A

Horizontal.jpg B

Vertically.jpg C

To invert the order of images in datasets
1 Open an image that contains slices.
2 Select Utilities > Flip> Flip in Depth.
A status message appears and indicates that the software is reordering the slices in the dataset. In a moment or two the MIPAV window refreshes, and the image window in which the original dataset appeared displays the reordered slices.

See also:

Changing Image Datasets Using MIPAV Utilities

Image Calculator