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.image.DataBlk; 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 * */ 068public 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 115 void synthetize_lpf(float[] lowSig, int lowOff, int lowLen, int lowStep, 116 float[] highSig, int highOff, int highLen, int highStep, 117 float[] outSig, int outOff, 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 165 void synthetize_lpf(Object lowSig, int lowOff, int lowLen, int lowStep, 166 Object highSig, int highOff, int highLen, int highStep, 167 Object outSig, int outOff, int outStep) { 168 169 synthetize_lpf((float[])lowSig, lowOff, lowLen, lowStep, 170 (float[])highSig, highOff, highLen, highStep, 171 (float[])outSig, outOff, outStep); 172 } 173 174 /** 175 * A specific version of the synthetize_hpf() method that works on float 176 * data. See the general description of the synthetize_hpf() method in the 177 * SynWTFilter class for more details. 178 * 179 * @param lowSig This is the array that contains the low-pass 180 * input signal. 181 * 182 * @param lowOff This is the index in lowSig of the first sample to 183 * filter. 184 * 185 * @param lowLen This is the number of samples in the low-pass 186 * input signal to filter. 187 * 188 * @param lowStep This is the step, or interleave factor, of the 189 * low-pass input signal samples in the lowSig array. 190 * 191 * @param highSig This is the array that contains the high-pass 192 * input signal. 193 * 194 * @param highOff This is the index in highSig of the first sample to 195 * filter. 196 * 197 * @param highLen This is the number of samples in the high-pass 198 * input signal to filter. 199 * 200 * @param highStep This is the step, or interleave factor, of the 201 * high-pass input signal samples in the highSig array. 202 * 203 * @param outSig This is the array where the output signal is 204 * placed. It should be long enough to contain the output signal. 205 * 206 * @param outOff This is the index in outSig of the element where 207 * to put the first output sample. 208 * 209 * @param outStep This is the step, or interleave factor, of the 210 * output samples in the outSig array. 211 * 212 * @see SynWTFilter#synthetize_hpf 213 * 214 * 215 * 216 * 217 * */ 218 public abstract 219 void synthetize_hpf(float[] lowSig, int lowOff, int lowLen, int lowStep, 220 float[] highSig, int highOff, int highLen, int highStep, 221 float[] outSig, int outOff, int outStep); 222 223 /** 224 * The general version of the synthetize_hpf() method, it just calls 225 * the specialized version. See the description of the synthetize_hpf() 226 * method of the SynWTFilter class for more details. 227 * 228 * @param lowSig This is the array that contains the low-pass 229 * input signal. It must be an float[]. 230 * 231 * @param lowOff This is the index in lowSig of the first sample to 232 * filter. 233 * 234 * @param lowLen This is the number of samples in the low-pass 235 * input signal to filter. 236 * 237 * @param lowStep This is the step, or interleave factor, of the 238 * low-pass input signal samples in the lowSig array. 239 * 240 * @param highSig This is the array that contains the high-pass 241 * input signal. It must be an float[]. 242 * 243 * @param highOff This is the index in highSig of the first sample to 244 * filter. 245 * 246 * @param highLen This is the number of samples in the high-pass 247 * input signal to filter. 248 * 249 * @param highStep This is the step, or interleave factor, of the 250 * high-pass input signal samples in the highSig array. 251 * 252 * @param outSig This is the array where the output signal is 253 * placed. It should be and float[] and long enough to contain the 254 * output signal. 255 * 256 * @param outOff This is the index in outSig of the element where 257 * to put the first output sample. 258 * 259 * @param outStep This is the step, or interleave factor, of the 260 * output samples in the outSig array. 261 * 262 * @see SynWTFilter#synthetize_hpf 263 * 264 * 265 * 266 * 267 * */ 268 public 269 void synthetize_hpf(Object lowSig, int lowOff, int lowLen, int lowStep, 270 Object highSig, int highOff, int highLen, int highStep, 271 Object outSig, int outOff, int outStep) { 272 273 synthetize_hpf((float[])lowSig, lowOff, lowLen, lowStep, 274 (float[])highSig, highOff, highLen, highStep, 275 (float[])outSig, outOff, outStep); 276 } 277 278 /** 279 * Returns the type of data on which this filter works, as defined 280 * in the DataBlk interface, which is always TYPE_FLOAT for this 281 * class. 282 * 283 * @return The type of data as defined in the DataBlk interface. 284 * 285 * @see jj2000.j2k.image.DataBlk 286 * 287 * 288 * */ 289 public int getDataType() { 290 return DataBlk.TYPE_FLOAT; 291 } 292 293} 294 295