001/*
002 * $RCSfile: SynWTFilterFloat.java,v $
003 * $Revision: 1.1 $
004 * $Date: 2005/02/11 05:02:34 $
005 * $State: Exp $
006 *
007 * Class:                   SynWTFilterFloat
008 *
009 * Description:             A specialized synthesis wavelet filter interface
010 *                          that 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.synthesis;
051
052import jj2000.j2k.wavelet.*;
053import jj2000.j2k.image.*;
054
055/**
056 * This extends the synthesis wavelet filter general definitions of
057 * SynWTFilter 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 SynWTFilter 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 SynWTFilter
068 * */
069public abstract class SynWTFilterFloat extends SynWTFilter {
070
071    /**
072     * A specific version of the synthetize_lpf() method that works on float
073     * data. See the general description of the synthetize_lpf() method in the
074     * SynWTFilter class for more details.
075     *
076     * @param lowSig This is the array that contains the low-pass
077     * input signal.
078     *
079     * @param lowOff This is the index in lowSig of the first sample to
080     * filter.
081     *
082     * @param lowLen This is the number of samples in the low-pass
083     * input signal to filter.
084     *
085     * @param lowStep This is the step, or interleave factor, of the
086     * low-pass input signal samples in the lowSig array.
087     *
088     * @param highSig This is the array that contains the high-pass
089     * input signal.
090     *
091     * @param highOff This is the index in highSig of the first sample to
092     * filter.
093     *
094     * @param highLen This is the number of samples in the high-pass
095     * input signal to filter.
096     *
097     * @param highStep This is the step, or interleave factor, of the
098     * high-pass input signal samples in the highSig array.
099     *
100     * @param outSig This is the array where the output signal is
101     * placed. It should be long enough to contain the output signal.
102     *
103     * @param outOff This is the index in outSig of the element where
104     * to put the first output sample.
105     *
106     * @param outStep This is the step, or interleave factor, of the
107     * output samples in the outSig array.
108     *
109     * @see SynWTFilter#synthetize_lpf
110     *
111     *
112     *
113     *
114     * */
115    public abstract
116        void synthetize_lpf(float[] lowSig, int lowOff, int lowLen, int lowStep,
117                        float[] highSig, int highOff, int highLen, int highStep,
118                        float[] outSig, int outOff, int outStep);
119
120    /**
121     * The general version of the synthetize_lpf() method, it just calls
122     * the specialized version. See the description of the synthetize_lpf()
123     * method of the SynWTFilter class for more details.
124     *
125     * @param lowSig This is the array that contains the low-pass
126     * input signal. It must be an float[].
127     *
128     * @param lowOff This is the index in lowSig of the first sample to
129     * filter.
130     *
131     * @param lowLen This is the number of samples in the low-pass
132     * input signal to filter.
133     *
134     * @param lowStep This is the step, or interleave factor, of the
135     * low-pass input signal samples in the lowSig array.
136     *
137     * @param highSig This is the array that contains the high-pass
138     * input signal. It must be an float[].
139     *
140     * @param highOff This is the index in highSig of the first sample to
141     * filter.
142     *
143     * @param highLen This is the number of samples in the high-pass
144     * input signal to filter.
145     *
146     * @param highStep This is the step, or interleave factor, of the
147     * high-pass input signal samples in the highSig array.
148     *
149     * @param outSig This is the array where the output signal is
150     * placed. It should be and float[] and long enough to contain the
151     * output signal.
152     *
153     * @param outOff This is the index in outSig of the element where
154     * to put the first output sample.
155     *
156     * @param outStep This is the step, or interleave factor, of the
157     * output samples in the outSig array.
158     *
159     * @see SynWTFilter#synthetize_hpf
160     *
161     *
162     *
163     *
164     * */
165    public
166        void synthetize_lpf(Object lowSig, int lowOff, int lowLen, int lowStep,
167                        Object highSig, int highOff, int highLen, int highStep,
168                        Object outSig, int outOff, int outStep) {
169
170        synthetize_lpf((float[])lowSig, lowOff, lowLen, lowStep,
171                   (float[])highSig, highOff, highLen, highStep,
172                   (float[])outSig, outOff, outStep);
173        }
174
175    /**
176     * A specific version of the synthetize_hpf() method that works on float
177     * data. See the general description of the synthetize_hpf() method in the
178     * SynWTFilter class for more details.
179     *
180     * @param lowSig This is the array that contains the low-pass
181     * input signal.
182     *
183     * @param lowOff This is the index in lowSig of the first sample to
184     * filter.
185     *
186     * @param lowLen This is the number of samples in the low-pass
187     * input signal to filter.
188     *
189     * @param lowStep This is the step, or interleave factor, of the
190     * low-pass input signal samples in the lowSig array.
191     *
192     * @param highSig This is the array that contains the high-pass
193     * input signal.
194     *
195     * @param highOff This is the index in highSig of the first sample to
196     * filter.
197     *
198     * @param highLen This is the number of samples in the high-pass
199     * input signal to filter.
200     *
201     * @param highStep This is the step, or interleave factor, of the
202     * high-pass input signal samples in the highSig array.
203     *
204     * @param outSig This is the array where the output signal is
205     * placed. It should be long enough to contain the output signal.
206     *
207     * @param outOff This is the index in outSig of the element where
208     * to put the first output sample.
209     *
210     * @param outStep This is the step, or interleave factor, of the
211     * output samples in the outSig array.
212     *
213     * @see SynWTFilter#synthetize_hpf
214     *
215     *
216     *
217     *
218     * */
219    public abstract
220        void synthetize_hpf(float[] lowSig, int lowOff, int lowLen, int lowStep,
221                        float[] highSig, int highOff, int highLen, int highStep,
222                        float[] outSig, int outOff, int outStep);
223
224    /**
225     * The general version of the synthetize_hpf() method, it just calls
226     * the specialized version. See the description of the synthetize_hpf()
227     * method of the SynWTFilter class for more details.
228     *
229     * @param lowSig This is the array that contains the low-pass
230     * input signal. It must be an float[].
231     *
232     * @param lowOff This is the index in lowSig of the first sample to
233     * filter.
234     *
235     * @param lowLen This is the number of samples in the low-pass
236     * input signal to filter.
237     *
238     * @param lowStep This is the step, or interleave factor, of the
239     * low-pass input signal samples in the lowSig array.
240     *
241     * @param highSig This is the array that contains the high-pass
242     * input signal. It must be an float[].
243     *
244     * @param highOff This is the index in highSig of the first sample to
245     * filter.
246     *
247     * @param highLen This is the number of samples in the high-pass
248     * input signal to filter.
249     *
250     * @param highStep This is the step, or interleave factor, of the
251     * high-pass input signal samples in the highSig array.
252     *
253     * @param outSig This is the array where the output signal is
254     * placed. It should be and float[] and long enough to contain the
255     * output signal.
256     *
257     * @param outOff This is the index in outSig of the element where
258     * to put the first output sample.
259     *
260     * @param outStep This is the step, or interleave factor, of the
261     * output samples in the outSig array.
262     *
263     * @see SynWTFilter#synthetize_hpf
264     *
265     *
266     *
267     *
268     * */
269    public
270        void synthetize_hpf(Object lowSig, int lowOff, int lowLen, int lowStep,
271                        Object highSig, int highOff, int highLen, int highStep,
272                        Object outSig, int outOff, int outStep) {
273
274        synthetize_hpf((float[])lowSig, lowOff, lowLen, lowStep,
275                   (float[])highSig, highOff, highLen, highStep,
276                   (float[])outSig, outOff, outStep);
277        }
278
279    /**
280     * Returns the type of data on which this filter works, as defined
281     * in the DataBlk interface, which is always TYPE_FLOAT for this
282     * class.
283     *
284     * @return The type of data as defined in the DataBlk interface.
285     *
286     * @see jj2000.j2k.image.DataBlk
287     *
288     *
289     * */
290    public int getDataType() {
291        return DataBlk.TYPE_FLOAT;
292    }
293
294}
295
296