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