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