001/*
002 * $RCSfile: AnWTFilterFloat.java,v $
003 * $Revision: 1.1 $
004 * $Date: 2005/02/11 05:02:29 $
005 * $State: Exp $
006 *
007 * Class:                   AnWTFilterFloat
008 *
009 * Description:             A specialized wavelet filter interface that
010 *                          works on float data.
011 *
012 *
013 *
014 * COPYRIGHT:
015 *
016 * This software module was originally developed by Raphaël Grosbois and
017 * Diego Santa Cruz (Swiss Federal Institute of Technology-EPFL); Joel
018 * Askelöf (Ericsson Radio Systems AB); and Bertrand Berthelot, David
019 * Bouchard, Félix Henry, Gerard Mozelle and Patrice Onno (Canon Research
020 * Centre France S.A) in the course of development of the JPEG2000
021 * standard as specified by ISO/IEC 15444 (JPEG 2000 Standard). This
022 * software module is an implementation of a part of the JPEG 2000
023 * Standard. Swiss Federal Institute of Technology-EPFL, Ericsson Radio
024 * Systems AB and Canon Research Centre France S.A (collectively JJ2000
025 * Partners) agree not to assert against ISO/IEC and users of the JPEG
026 * 2000 Standard (Users) any of their rights under the copyright, not
027 * including other intellectual property rights, for this software module
028 * with respect to the usage by ISO/IEC and Users of this software module
029 * or modifications thereof for use in hardware or software products
030 * claiming conformance to the JPEG 2000 Standard. Those intending to use
031 * this software module in hardware or software products are advised that
032 * their use may infringe existing patents. The original developers of
033 * this software module, JJ2000 Partners and ISO/IEC assume no liability
034 * for use of this software module or modifications thereof. No license
035 * or right to this software module is granted for non JPEG 2000 Standard
036 * conforming products. JJ2000 Partners have full right to use this
037 * software module for his/her own purpose, assign or donate this
038 * software module to any third party and to inhibit third parties from
039 * using this software module for non JPEG 2000 Standard conforming
040 * products. This copyright notice must be included in all copies or
041 * derivative works of this software module.
042 *
043 * Copyright (c) 1999/2000 JJ2000 Partners.
044 *
045 *
046 *
047 */
048
049
050package jj2000.j2k.wavelet.analysis;
051
052import jj2000.j2k.wavelet.*;
053import jj2000.j2k.image.*;
054
055/**
056 * This extends the analysis wavelet filter general definitions of
057 * AnWTFilter by adding methods that work for float data
058 * specifically. Implementations that work on float data should inherit
059 * from this class.
060 *
061 * <P>See the AnWTFilter class for details such as
062 * normalization, how to split odd-length signals, etc.
063 *
064 * <P>The advantage of using the specialized method is that no casts
065 * are performed.
066 *
067 * @see AnWTFilter
068 *
069 */
070public abstract class AnWTFilterFloat extends AnWTFilter {
071
072    /**
073     * A specific version of the analyze_lpf() method that works on int
074     * data. See the general description of the analyze_lpf() method in
075     * the AnWTFilter class for more details.
076     *
077     * @param inSig This is the array that contains the input
078     * signal.
079     *
080     * @param inOff This is the index in inSig of the first sample to
081     * filter.
082     *
083     * @param inLen This is the number of samples in the input signal
084     * to filter.
085     *
086     * @param inStep This is the step, or interleave factor, of the
087     * input signal samples in the inSig array.
088     *
089     * @param lowSig This is the array where the low-pass output
090     * signal is placed.
091     *
092     * @param lowOff This is the index in lowSig of the element where
093     * to put the first low-pass output sample.
094     *
095     * @param lowStep This is the step, or interleave factor, of the
096     * low-pass output samples in the lowSig array.
097     *
098     * @param highSig This is the array where the high-pass output
099     * signal is placed.
100     *
101     * @param highOff This is the index in highSig of the element where
102     * to put the first high-pass output sample.
103     *
104     * @param highStep This is the step, or interleave factor, of the
105     * high-pass output samples in the highSig array.
106     *
107     * @see AnWTFilter#analyze_lpf
108     *
109     *
110     *
111     *
112     * */
113    public abstract
114        void analyze_lpf(float inSig[], int inOff, int inLen, int inStep,
115                     float lowSig[], int lowOff, int lowStep,
116                     float highSig[], int highOff, int highStep);
117
118    /**
119     * The general version of the analyze_lpf() method, it just calls the
120     * specialized version. See the description of the analyze_lpf()
121     * method of the AnWTFilter class for more details.
122     *
123     * @param inSig This is the array that contains the input
124     * signal. It must be an float[].
125     *
126     * @param inOff This is the index in inSig of the first sample to
127     * filter.
128     *
129     * @param inLen This is the number of samples in the input signal
130     * to filter.
131     *
132     * @param inStep This is the step, or interleave factor, of the
133     * input signal samples in the inSig array.
134     *
135     * @param lowSig This is the array where the low-pass output
136     * signal is placed. It must be an float[].
137     *
138     * @param lowOff This is the index in lowSig of the element where
139     * to put the first low-pass output sample.
140     *
141     * @param lowStep This is the step, or interleave factor, of the
142     * low-pass output samples in the lowSig array.
143     *
144     * @param highSig This is the array where the high-pass output
145     * signal is placed. It must be an float[].
146     *
147     * @param highOff This is the index in highSig of the element where
148     * to put the first high-pass output sample.
149     *
150     * @param highStep This is the step, or interleave factor, of the
151     * high-pass output samples in the highSig array.
152     *
153     * @see AnWTFilter#analyze_lpf
154     *
155     *
156     * */
157    public void analyze_lpf(Object inSig, int inOff, int inLen, int inStep,
158                    Object lowSig, int lowOff, int lowStep,
159                    Object highSig, int highOff, int highStep) {
160
161        analyze_lpf((float[])inSig, inOff, inLen, inStep,
162            (float[])lowSig, lowOff, lowStep,
163            (float[])highSig, highOff, highStep);
164    }
165
166    /**
167     * A specific version of the analyze_hpf() method that works on int
168     * data. See the general description of the analyze_hpf() method in the
169     * AnWTFilter class for more details.
170     *
171     * @param inSig This is the array that contains the input
172     * signal.
173     *
174     * @param inOff This is the index in inSig of the first sample to
175     * filter.
176     *
177     * @param inLen This is the number of samples in the input signal
178     * to filter.
179     *
180     * @param inStep This is the step, or interleave factor, of the
181     * input signal samples in the inSig array.
182     *
183     * @param lowSig This is the array where the low-pass output
184     * signal is placed.
185     *
186     * @param lowOff This is the index in lowSig of the element where
187     * to put the first low-pass output sample.
188     *
189     * @param lowStep This is the step, or interleave factor, of the
190     * low-pass output samples in the lowSig array.
191     *
192     * @param highSig This is the array where the high-pass output
193     * signal is placed.
194     *
195     * @param highOff This is the index in highSig of the element where
196     * to put the first high-pass output sample.
197     *
198     * @param highStep This is the step, or interleave factor, of the
199     * high-pass output samples in the highSig array.
200     *
201     * @see AnWTFilter#analyze_hpf
202     *
203     *
204     * */
205    public abstract
206        void analyze_hpf(float inSig[], int inOff, int inLen, int inStep,
207                     float lowSig[], int lowOff, int lowStep,
208                     float highSig[], int highOff, int highStep);
209
210
211
212    /**
213     * The general version of the analyze_hpf() method, it just calls the
214     * specialized version. See the description of the analyze_hpf()
215     * method of the AnWTFilter class for more details.
216     *
217     * @param inSig This is the array that contains the input
218     * signal. It must be an float[].
219     *
220     * @param inOff This is the index in inSig of the first sample to
221     * filter.
222     *
223     * @param inLen This is the number of samples in the input signal
224     * to filter.
225     *
226     * @param inStep This is the step, or interleave factor, of the
227     * input signal samples in the inSig array.
228     *
229     * @param lowSig This is the array where the low-pass output
230     * signal is placed. It must be an float[].
231     *
232     * @param lowOff This is the index in lowSig of the element where
233     * to put the first low-pass output sample.
234     *
235     * @param lowStep This is the step, or interleave factor, of the
236     * low-pass output samples in the lowSig array.
237     *
238     * @param highSig This is the array where the high-pass output
239     * signal is placed. It must be an float[].
240     *
241     * @param highOff This is the index in highSig of the element where
242     * to put the first high-pass output sample.
243     *
244     * @param highStep This is the step, or interleave factor, of the
245     * high-pass output samples in the highSig array.
246     *
247     * @see AnWTFilter#analyze_hpf
248     *
249     *
250     * */
251    public void analyze_hpf(Object inSig, int inOff, int inLen, int inStep,
252                    Object lowSig, int lowOff, int lowStep,
253                    Object highSig, int highOff, int highStep) {
254
255        analyze_hpf((float[])inSig, inOff, inLen, inStep,
256            (float[])lowSig, lowOff, lowStep,
257            (float[])highSig, highOff, highStep);
258    }
259
260    /**
261     * Returns the type of data on which this filter works, as defined
262     * in the DataBlk interface, which is always TYPE_FLOAT for this
263     * class.
264     *
265     * @return The type of data as defined in the DataBlk interface.
266     *
267     * @see jj2000.j2k.image.DataBlk
268     *
269     *
270     * */
271    public int getDataType() {
272        return DataBlk.TYPE_FLOAT;
273    }
274}