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