Class DiscreteSineTransform

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

    public class DiscreteSineTransform
    extends AlgorithmBase
    • Field Detail

      • CDFT_THREADS_BEGIN_N

        private static final int CDFT_THREADS_BEGIN_N
        -------- DST (Discrete Sine Transform) / Inverse of DST -------- [definition] IDST (excluding scale) S[k] = sum_j=1^n A[j]*sin(pi*j*(k+1/2)/n), 0<=k DST S[k] = sum_j=0^n-1 a[j]*sin(pi*(j+1/2)*k/n), 0 ip[0] = 0; // first time only ddst(n, 1, a, ip, w); ip[0] = 0; // first time only ddst(n, -1, a, ip, w); [parameters] n :data length (int) n >= 2, n = power of 2 a[0...n-1] :input/output data (double *) input data a[j] = A[j], 0 output data a[k] = S[k], 0= 2+sqrt(n/2) strictly, length of ip >= 2+(1<<(int)(log(n/2+0.5)/log(2))/2). ip[0],ip[1] are pointers of the cos/sin table. w[0...n*5/4-1] :cos/sin table (double *) w[],ip[] are initialized if ip[0] == 0. [remark] Inverse of ddst(n, -1, a, ip, w); is a[0] *= 0.5; ddst(n, 1, a, ip, w); for (j = 0; j <= n - 1; j++) { a[j] *= 2.0 / n; }
        See Also:
        Constant Field Values
      • seed

        private int seed
      • multiProcessor

        private boolean multiProcessor
      • transformImage

        private ModelImage transformImage
      • xDim

        private int xDim
      • yDim

        private int yDim
      • constructionMethod

        private int constructionMethod
      • filterType

        private int filterType
      • f1

        private double f1
      • f2

        private double f2
      • filterOrder

        private int filterOrder
      • epsilon

        private double epsilon
      • rs

        private double rs
    • Constructor Detail

      • DiscreteSineTransform

        public DiscreteSineTransform()
      • DiscreteSineTransform

        public DiscreteSineTransform​(boolean multiProcessor)
      • DiscreteSineTransform

        public DiscreteSineTransform​(ModelImage transformImage,
                                     ModelImage inverseImage,
                                     ModelImage srcImg,
                                     boolean multiProcessor,
                                     int constructionMethod,
                                     int filterType,
                                     double f1,
                                     double f2,
                                     int filterOrder,
                                     double epsilon,
                                     double rs)
    • Method Detail

      • testddst

        public void testddst​(int n)
      • putdata

        private void putdata​(int nini,
                             int nend,
                             double[] a)
      • errorcheck

        private double errorcheck​(int nini,
                                  int nend,
                                  double scale,
                                  double[] a)
      • RND

        private double RND()
      • testRND

        public void testRND​(int n)
      • ddst2D

        public void ddst2D​(int yDim,
                           int xDim,
                           double[][] src,
                           double[][] dst,
                           int isgn)
      • runAlgorithm

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

        public void ddst​(int n,
                         int isgn,
                         double[] a,
                         int[] ip,
                         double[] w)
      • cftfsub

        private void cftfsub​(int n,
                             double[] a,
                             int[] ip,
                             int nw,
                             double[] w)
      • cftf040

        private void cftf040​(double[] a)
      • bitrv208

        private void bitrv208​(double[] a)
      • bitrv216

        private void bitrv216​(double[] a)
      • bitrv2

        private void bitrv2​(int n,
                            int[] ip,
                            double[] a)
      • cftf1st

        private void cftf1st​(int n,
                             double[] a,
                             double[] w)
      • dstsub

        private void dstsub​(int n,
                            double[] a,
                            int nc,
                            double[] c)
      • makewt

        private void makewt​(int nw,
                            int[] ip,
                            double[] w)
      • makeipt

        private void makeipt​(int nw,
                             int[] ip)
      • makect

        private void makect​(int nc,
                            int[] ip,
                            double[] c)
      • rftbsub

        private void rftbsub​(int n,
                             double[] a,
                             int nc,
                             double[] c)
      • cftbsub

        private void cftbsub​(int n,
                             double[] a,
                             int[] ip,
                             int nw,
                             double[] w)
      • cftx020

        private void cftx020​(double[] a)
      • cftb040

        private void cftb040​(double[] a)
      • bitrv208neg

        private void bitrv208neg​(double[] a)
      • bitrv216neg

        private void bitrv216neg​(double[] a)
      • bitrv2conj

        private void bitrv2conj​(int n,
                                int[] ip,
                                double[] a)
      • cftfx41

        private void cftfx41​(int n,
                             double[] a,
                             int nw,
                             double[] w)
      • cftb1st

        private void cftb1st​(int n,
                             double[] a,
                             double[] w)
      • cftrec4

        private void cftrec4​(int n,
                             double[] a,
                             int nw,
                             double[] w)
      • cfttree

        private int cfttree​(int n,
                            int j,
                            int k,
                            double[] a,
                            int nw,
                            double[] w)
      • cftmdl1

        private void cftmdl1​(int n,
                             double[] a,
                             double[] w)
      • cftmdl2

        private void cftmdl2​(int n,
                             double[] a,
                             double[] w)
      • cftleaf

        private void cftleaf​(int n,
                             int isplt,
                             double[] a,
                             int nw,
                             double[] w)
      • cftf161

        private void cftf161​(double[] a,
                             double[] w)
      • cftf162

        private void cftf162​(double[] a,
                             double[] w)
      • cftf081

        private void cftf081​(double[] a,
                             double[] w)
      • cftf082

        private void cftf082​(double[] a,
                             double[] w)
      • rftfsub

        private void rftfsub​(int n,
                             double[] a,
                             int nc,
                             double[] c)
      • cftrec4_th

        private void cftrec4_th​(int n,
                                double[] a,
                                int nw,
                                double[] w)
      • makeGaussianFilter

        private void makeGaussianFilter​(double[] buffer,
                                        double rmsFreq)
      • makeButterworthFilter

        private void makeButterworthFilter​(double[] buffer,
                                           double fr1,
                                           double fr2)
        DOCUMENT ME!
        Parameters:
        fr1 - DOCUMENT ME!
        fr2 - DOCUMENT ME!
      • makeEllipticFilter

        private void makeEllipticFilter​(double[] buffer,
                                        double fr1,
                                        double fr2)
      • Chebyshev

        private double Chebyshev​(int order,
                                 double w)
      • makeChebyshevTypeIFilter

        private void makeChebyshevTypeIFilter​(double[] buffer,
                                              double fr1,
                                              double fr2)
      • makeChebyshevTypeIIFilter

        private void makeChebyshevTypeIIFilter​(double[] buffer,
                                               double fr1,
                                               double fr2)