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.image.DataBlk;
053
054/**
055 * This extends the analysis wavelet filter general definitions of
056 * AnWTFilter by adding methods that work for float data
057 * specifically. Implementations that work on float data should inherit
058 * from this class.
059 *
060 * <P>See the AnWTFilter class for details such as
061 * normalization, how to split odd-length signals, etc.
062 *
063 * <P>The advantage of using the specialized method is that no casts
064 * are performed.
065 *
066 * @see AnWTFilter
067 *
068 */
069public abstract class AnWTFilterFloat extends AnWTFilter {
070
071    /**
072     * A specific version of the analyze_lpf() method that works on int
073     * data. See the general description of the analyze_lpf() method in
074     * the AnWTFilter class for more details.
075     *
076     * @param inSig This is the array that contains the input
077     * signal.
078     *
079     * @param inOff This is the index in inSig of the first sample to
080     * filter.
081     *
082     * @param inLen This is the number of samples in the input signal
083     * to filter.
084     *
085     * @param inStep This is the step, or interleave factor, of the
086     * input signal samples in the inSig array.
087     *
088     * @param lowSig This is the array where the low-pass output
089     * signal is placed.
090     *
091     * @param lowOff This is the index in lowSig of the element where
092     * to put the first low-pass output sample.
093     *
094     * @param lowStep This is the step, or interleave factor, of the
095     * low-pass output samples in the lowSig array.
096     *
097     * @param highSig This is the array where the high-pass output
098     * signal is placed.
099     *
100     * @param highOff This is the index in highSig of the element where
101     * to put the first high-pass output sample.
102     *
103     * @param highStep This is the step, or interleave factor, of the
104     * high-pass output samples in the highSig array.
105     *
106     * @see AnWTFilter#analyze_lpf
107     *
108     *
109     *
110     *
111     * */
112    public abstract
113        void analyze_lpf(float inSig[], int inOff, int inLen, int inStep,
114                     float lowSig[], int lowOff, int lowStep,
115                     float highSig[], int highOff, int highStep);
116
117    /**
118     * The general version of the analyze_lpf() method, it just calls the
119     * specialized version. See the description of the analyze_lpf()
120     * method of the AnWTFilter class for more details.
121     *
122     * @param inSig This is the array that contains the input
123     * signal. It must be an float[].
124     *
125     * @param inOff This is the index in inSig of the first sample to
126     * filter.
127     *
128     * @param inLen This is the number of samples in the input signal
129     * to filter.
130     *
131     * @param inStep This is the step, or interleave factor, of the
132     * input signal samples in the inSig array.
133     *
134     * @param lowSig This is the array where the low-pass output
135     * signal is placed. It must be an float[].
136     *
137     * @param lowOff This is the index in lowSig of the element where
138     * to put the first low-pass output sample.
139     *
140     * @param lowStep This is the step, or interleave factor, of the
141     * low-pass output samples in the lowSig array.
142     *
143     * @param highSig This is the array where the high-pass output
144     * signal is placed. It must be an float[].
145     *
146     * @param highOff This is the index in highSig of the element where
147     * to put the first high-pass output sample.
148     *
149     * @param highStep This is the step, or interleave factor, of the
150     * high-pass output samples in the highSig array.
151     *
152     * @see AnWTFilter#analyze_lpf
153     *
154     *
155     * */
156    public void analyze_lpf(Object inSig, int inOff, int inLen, int inStep,
157                    Object lowSig, int lowOff, int lowStep,
158                    Object highSig, int highOff, int highStep) {
159
160        analyze_lpf((float[])inSig, inOff, inLen, inStep,
161            (float[])lowSig, lowOff, lowStep,
162            (float[])highSig, highOff, highStep);
163    }
164
165    /**
166     * A specific version of the analyze_hpf() method that works on int
167     * data. See the general description of the analyze_hpf() method in the
168     * AnWTFilter class for more details.
169     *
170     * @param inSig This is the array that contains the input
171     * signal.
172     *
173     * @param inOff This is the index in inSig of the first sample to
174     * filter.
175     *
176     * @param inLen This is the number of samples in the input signal
177     * to filter.
178     *
179     * @param inStep This is the step, or interleave factor, of the
180     * input signal samples in the inSig array.
181     *
182     * @param lowSig This is the array where the low-pass output
183     * signal is placed.
184     *
185     * @param lowOff This is the index in lowSig of the element where
186     * to put the first low-pass output sample.
187     *
188     * @param lowStep This is the step, or interleave factor, of the
189     * low-pass output samples in the lowSig array.
190     *
191     * @param highSig This is the array where the high-pass output
192     * signal is placed.
193     *
194     * @param highOff This is the index in highSig of the element where
195     * to put the first high-pass output sample.
196     *
197     * @param highStep This is the step, or interleave factor, of the
198     * high-pass output samples in the highSig array.
199     *
200     * @see AnWTFilter#analyze_hpf
201     *
202     *
203     * */
204    public abstract
205        void analyze_hpf(float inSig[], int inOff, int inLen, int inStep,
206                     float lowSig[], int lowOff, int lowStep,
207                     float highSig[], int highOff, int highStep);
208
209
210
211    /**
212     * The general version of the analyze_hpf() method, it just calls the
213     * specialized version. See the description of the analyze_hpf()
214     * method of the AnWTFilter class for more details.
215     *
216     * @param inSig This is the array that contains the input
217     * signal. It must be an float[].
218     *
219     * @param inOff This is the index in inSig of the first sample to
220     * filter.
221     *
222     * @param inLen This is the number of samples in the input signal
223     * to filter.
224     *
225     * @param inStep This is the step, or interleave factor, of the
226     * input signal samples in the inSig array.
227     *
228     * @param lowSig This is the array where the low-pass output
229     * signal is placed. It must be an float[].
230     *
231     * @param lowOff This is the index in lowSig of the element where
232     * to put the first low-pass output sample.
233     *
234     * @param lowStep This is the step, or interleave factor, of the
235     * low-pass output samples in the lowSig array.
236     *
237     * @param highSig This is the array where the high-pass output
238     * signal is placed. It must be an float[].
239     *
240     * @param highOff This is the index in highSig of the element where
241     * to put the first high-pass output sample.
242     *
243     * @param highStep This is the step, or interleave factor, of the
244     * high-pass output samples in the highSig array.
245     *
246     * @see AnWTFilter#analyze_hpf
247     *
248     *
249     * */
250    public void analyze_hpf(Object inSig, int inOff, int inLen, int inStep,
251                    Object lowSig, int lowOff, int lowStep,
252                    Object highSig, int highOff, int highStep) {
253
254        analyze_hpf((float[])inSig, inOff, inLen, inStep,
255            (float[])lowSig, lowOff, lowStep,
256            (float[])highSig, highOff, highStep);
257    }
258
259    /**
260     * Returns the type of data on which this filter works, as defined
261     * in the DataBlk interface, which is always TYPE_FLOAT for this
262     * class.
263     *
264     * @return The type of data as defined in the DataBlk interface.
265     *
266     * @see jj2000.j2k.image.DataBlk
267     *
268     *
269     * */
270    public int getDataType() {
271        return DataBlk.TYPE_FLOAT;
272    }
273}