Class AlgorithmRiceWaveletTools

  • All Implemented Interfaces:
    java.awt.event.ActionListener, java.awt.event.WindowListener, java.lang.Runnable, java.util.EventListener

    public class AlgorithmRiceWaveletTools
    extends AlgorithmBase
    This "rice-wlet-tools", version 2.4 Released - CONDITIONS FOR USE: Copyright (c) 2000 RICE UNIVERSITY. All rights reserved. This software is distributed and licensed to you on a non-exclusive basis, free-of-charge. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistribution of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistribution in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. All advertising materials mentioning features or use of this software must display the following acknowledgment: This product includes software developed by Rice University, Houston, Texas and its contributors. 4. Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY WILLIAM MARSH RICE UNIVERSITY, HOUSTON, TEXAS, AND CONTRIBUTORS AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RICE UNIVERSITY OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTIONS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE), PRODUCT LIABILITY, OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. For information on commercial licenses, contact Rice University's Office of Technology Transfer at techtran@rice.edu or (713) 348-6173
    • Field Detail

      • filterLength

        private int filterLength
      • filterType

        private int filterType
      • scalingFilter

        private double[] scalingFilter
      • waveletFilter

        private double[] waveletFilter
      • nDims

        private int nDims
      • extents

        private int[] extents
      • xDim

        private int xDim
      • yDim

        private int yDim
      • sliceSize

        private int sliceSize
      • zDim

        private int zDim
      • aArray

        private double[] aArray
      • error

        private int error
      • numberOfLevels

        private int numberOfLevels
      • redundant

        private boolean redundant
      • doWaveletImages

        private boolean doWaveletImages
      • yl

        private double[] yl
      • llA

        private double[][] llA
      • lhA

        private double[][] lhA
      • hlA

        private double[][] hlA
      • hhA

        private double[][] hhA
      • y

        private double[] y
      • minimumLevel

        private int minimumLevel
      • maximumLevel

        private int maximumLevel
      • z

        private int z
      • doDenoise

        private boolean doDenoise
      • actualThreshold

        private double actualThreshold
      • varianceEstimator

        private int varianceEstimator
      • thresholdMultiplier

        private double thresholdMultiplier
      • thresholdingType

        private int thresholdingType
      • thresholdLowPass

        private boolean thresholdLowPass
      • noiseStandardDeviation

        private double[] noiseStandardDeviation
      • useNoiseStdConstructor

        private boolean useNoiseStdConstructor
      • doBayesShrinkThresholdComputation

        private boolean doBayesShrinkThresholdComputation
    • Constructor Detail

      • AlgorithmRiceWaveletTools

        public AlgorithmRiceWaveletTools()
      • AlgorithmRiceWaveletTools

        public AlgorithmRiceWaveletTools​(ModelImage destImg,
                                         ModelImage srcImg,
                                         int filterLength,
                                         boolean redundant,
                                         int numberOfLevels,
                                         boolean doWaveletImages,
                                         int minimumLevel,
                                         int maximumLevel,
                                         int filterType,
                                         boolean doDenoise,
                                         double actualThreshold,
                                         int varianceEstimator,
                                         double thresholdMultiplier,
                                         int thresholdingType,
                                         boolean thresholdLowPass,
                                         boolean doBayesShrinkThresholdComputation)
      • AlgorithmRiceWaveletTools

        public AlgorithmRiceWaveletTools​(ModelImage srcImg,
                                         int filterLength,
                                         boolean redundant,
                                         int numberOfLevels,
                                         boolean doWaveletImages,
                                         int minimumLevel,
                                         int maximumLevel,
                                         int filterType,
                                         boolean doDenoise,
                                         double actualThreshold,
                                         int varianceEstimator,
                                         double thresholdMultiplier,
                                         int thresholdingType,
                                         boolean thresholdLowPass,
                                         boolean doBayesShrinkThresholdComputation)
      • AlgorithmRiceWaveletTools

        public AlgorithmRiceWaveletTools​(ModelImage srcImg,
                                         double[] noiseStandardDeviation)
    • Method Detail

      • signalTest

        public void signalTest()
      • test_mrdwt_1

        public void test_mrdwt_1()
      • test_mrdwt_2

        public void test_mrdwt_2()
      • test_mrdwt_2L2

        public void test_mrdwt_2L2()
      • test_mirdwt_1

        public void test_mirdwt_1()
      • test_mirdwt_2D

        public void test_mirdwt_2D()
      • test_mdwt_1D

        public void test_mdwt_1D()
      • test_mdwt_2D

        public void test_mdwt_2D()
      • test_midwt_1D

        public void test_midwt_1D()
      • test_midwt_2D

        public void test_midwt_2D()
      • test_denoise_default

        public void test_denoise_default()
      • test_denoise_2D

        public void test_denoise_2D()
      • test_denoise_udwt

        public void test_denoise_udwt()
      • test_denoise_udwt_2d

        public void test_denoise_udwt_2d()
      • test_denoise_threshold_low

        public void test_denoise_threshold_low()
      • test_denoise_thresh_multiplier

        public void test_denoise_thresh_multiplier()
      • test_denoise_std

        public void test_denoise_std()
      • test_denoise_hard

        public void test_denoise_hard()
      • test_denoise_levels

        public void test_denoise_levels()
      • test_denoise_actual_thresh

        public void test_denoise_actual_thresh()
      • test_denoise_udwt_threshold_low

        public void test_denoise_udwt_threshold_low()
      • test_denoise_udwt_thresh_multiplier

        public void test_denoise_udwt_thresh_multiplier()
      • test_denoise_udwt_std

        public void test_denoise_udwt_std()
      • test_denoise_udwt_soft

        public void test_denoise_udwt_soft()
      • test_denoise_udwt_levels

        public void test_denoise_udwt_levels()
      • test_denoise_udwt_actual_thresh

        public void test_denoise_udwt_actual_thresh()
      • BayesShrinkThresholdComputation

        private double BayesShrinkThresholdComputation​(double[] data,
                                                       double noise_var)
      • runAlgorithm

        public void runAlgorithm()
        Description copied from class: AlgorithmBase
        Actually runs the algorithm. Implemented by inheriting algorithms.
        Specified by:
        runAlgorithm in class AlgorithmBase
      • makeSig

        private void makeSig​(java.lang.String sigName,
                             int signalLength)
      • mdwt

        private void mdwt()
      • mrdwt

        private void mrdwt()
      • fpconv

        private void fpconv​(double[] x_in,
                            int lx,
                            double[] h0,
                            double[] h1,
                            int lh,
                            double[] x_outl,
                            double[] x_outh)
      • fpsconv

        private void fpsconv​(double[] x_in,
                             int lx,
                             double[] h0,
                             double[] h1,
                             int lhm1,
                             double[] x_outl,
                             double[] x_outh)
      • midwt

        public void midwt()
      • mirdwt

        public void mirdwt()
      • bpsconv

        private void bpsconv​(double[] x_out,
                             int lx,
                             double[] g0,
                             double[] g1,
                             int lhm1,
                             int lhhm1,
                             double[] x_inl,
                             double[] x_inh)
      • bpconv

        private void bpconv​(double[] x_out,
                            int lx,
                            double[] g0,
                            double[] g1,
                            int lh,
                            double[] x_inl,
                            double[] x_inh)
      • daubcqf

        private void daubcqf()
        Function computes the Daubechies' scaling and wavelet filters (normalized to sqrt(2)). The user specifies an even number filter length and a minimum phase, mid phase, or maximum phase solution. Reference: "Orthonormal Bases of Compactly Supported Wavelets", CPAM, October, 1989. From the original source file: %File Name: daubcqf.m %Last Modification Date: 01/02/96 15:12:57 %Current Version: daubcqf.m 2.4 %File Creation Date: 10/10/88 %Author: Ramesh Gopinath % %Copyright (c) 2000 RICE UNIVERSITY. All rights reserved. %Created by Ramesh Gopinath, Department of ECE, Rice University. Correctly gives scaling and wavelet filters for filter length = 4 minimum phase: Calculated scaling filter: 0.48296291314453416 0.8365163037378078 0.2241438680420134 -0.12940952255126037 Calculated Wavelet filter: 0.12940952255126037 0.2241438680420134 -0.8365163037378078 0.48296291314453416 Correct scaling filter = [0.482962913144534 0.836516303737808 0.224143868042013 -0.129409522551260]; Correct wavelet filter = [0.129409522551260 0.224143868042013 -0.836516303737808 0.482962913144534]; Correctly gives scaling and wavelet filters for filter length = 4 mid phase Calculated scaling filter: 0.48296291314453416 0.8365163037378078 0.2241438680420134 -0.12940952255126037 Calculated wavelet filter: 0.12940952255126037 0.2241438680420134 -0.8365163037378078 0.48296291314453416 Correct scaling filter = [0.482962913144534 0.836516303737808 0.224143868042013 -0.129409522551260]; Corrct wavelet filter = [0.129409522551260 0.224143868042013 -0.836516303737808 0.482962913144534]; Correctly gives scaling and wavelet filters for filter length = 4 maximum phase Calculated scaling filter: -0.12940952255126037 0.2241438680420134 0.8365163037378078 0.48296291314453416 Calculated wavelet filter: -0.48296291314453416 0.8365163037378078 -0.2241438680420134 -0.12940952255126037 Correct scaling filter = [-0.129409522551260 0.224143868042013 0.836516303737808 0.482962913144534]; Correct wavelet filter = [-0.482962913144534 0.836516303737808 -0.224143868042013 -0.129409522551260]; Correctly gives scaling and wavelet filters for filter length = 6 minimum phase Scaling filter: 0.3326705529500828 0.8068915093110931 0.459877502118492 -0.1350110200102549 -0.08544127388202716 0.03522629188570937 Wavelet filter: -0.03522629188570937 -0.08544127388202716 0.1350110200102549 0.459877502118492 -0.8068915093110931 0.3326705529500828 Correctly gives scaling and wavelet filters for filter length = 6 mid phase Scaling filter: 0.3326705529500828 0.8068915093110931 0.459877502118492 -0.1350110200102549 -0.08544127388202716 0.03522629188570937 Wavelet filter: -0.03522629188570937 -0.08544127388202716 0.1350110200102549 0.459877502118492 -0.8068915093110931 0.3326705529500828 Correct scaling filter = [0.332670552950083 0.806891509311093 0.459877502118491 -0.135011020010255 -0.085441273882027 0.035226291885710]; Correct wavelet filter = [-0.035226291885710 -0.085441273882027 0.135011020010255 0.459877502118491 -0.806891509311093 0.332670552950083];
      • getWaveletImages

        public ModelImage[] getWaveletImages()
        Accessor that returns the image.
        Returns:
        the wavelet image