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