001/* 002 * $RCSfile: SynWTFilterInt.java,v $ 003 * $Revision: 1.1 $ 004 * $Date: 2005/02/11 05:02:34 $ 005 * $State: Exp $ 006 * 007 * Class: SynWTFilterInt 008 * 009 * Description: A specialized synthesis wavelet filter interface 010 * that works on int 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 int data 057 * specifically. Implementations that work on int 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 SynWTFilterInt extends SynWTFilter { 069 070 /** 071 * A specific version of the synthetize_lpf() method that works on int 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(int[] lowSig, int lowOff, int lowLen, int lowStep, 116 int[] highSig, int highOff, int highLen, int highStep, 117 int[] 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 int[]. 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. Itmust be an int[]. 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 int[] 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_lpf 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((int[])lowSig, lowOff, lowLen, lowStep, 170 (int[])highSig, highOff, highLen, highStep, 171 (int[])outSig, outOff, outStep); 172 } 173 174 /** 175 * A specific version of the synthetize_hpf() method that works on int 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(int[] lowSig, int lowOff, int lowLen, int lowStep, 220 int[] highSig, int highOff, int highLen, int highStep, 221 int[] outSig, int outOff, int outStep); 222 223 224 225 /** 226 * The general version of the synthetize_hpf() method, it just calls 227 * the specialized version. See the description of the synthetize_hpf() 228 * method of the SynWTFilter class for more details. 229 * 230 * @param lowSig This is the array that contains the low-pass 231 * input signal. It must be an int[]. 232 * 233 * @param lowOff This is the index in lowSig of the first sample to 234 * filter. 235 * 236 * @param lowLen This is the number of samples in the low-pass 237 * input signal to filter. 238 * 239 * @param lowStep This is the step, or interleave factor, of the 240 * low-pass input signal samples in the lowSig array. 241 * 242 * @param highSig This is the array that contains the high-pass 243 * input signal. Itmust be an int[]. 244 * 245 * @param highOff This is the index in highSig of the first sample to 246 * filter. 247 * 248 * @param highLen This is the number of samples in the high-pass 249 * input signal to filter. 250 * 251 * @param highStep This is the step, or interleave factor, of the 252 * high-pass input signal samples in the highSig array. 253 * 254 * @param outSig This is the array where the output signal is 255 * placed. It should be and int[] and long enough to contain the 256 * output signal. 257 * 258 * @param outOff This is the index in outSig of the element where 259 * to put the first output sample. 260 * 261 * @param outStep This is the step, or interleave factor, of the 262 * output samples in the outSig array. 263 * 264 * @see SynWTFilter#synthetize_hpf 265 * 266 * 267 * 268 * 269 * */ 270 public 271 void synthetize_hpf(Object lowSig, int lowOff, int lowLen, int lowStep, 272 Object highSig, int highOff, int highLen, int highStep, 273 Object outSig, int outOff, int outStep) { 274 275 synthetize_hpf((int[])lowSig, lowOff, lowLen, lowStep, 276 (int[])highSig, highOff, highLen, highStep, 277 (int[])outSig, outOff, outStep); 278 } 279 280 /** 281 * Returns the type of data on which this filter works, as defined 282 * in the DataBlk interface, which is always TYPE_INT for this 283 * class. 284 * 285 * @return The type of data as defined in the DataBlk interface. 286 * 287 * @see jj2000.j2k.image.DataBlk 288 * 289 * 290 * */ 291 public int getDataType() { 292 return DataBlk.TYPE_INT; 293 } 294 295 } 296