001: /*
002: * $RCSfile: WaveletFilter.java,v $
003: * $Revision: 1.1 $
004: * $Date: 2005/02/11 05:02:28 $
005: * $State: Exp $
006: *
007: * Class: WaveletFilter
008: *
009: * Description: Defines the interface for WT filters (analysis
010: * and synthesis)
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: package jj2000.j2k.wavelet;
047:
048: /**
049: * This interface defines how a wavelet filter implementation should
050: * present itself. This interface defines only the commonalities
051: * between the analysis and synthesis filters. The AnWTFilter
052: * and SynWTFilter classes provide the specifics of analysis and
053: * synthesis filters.
054: *
055: * <P>Both analysis and filters must be able to return the
056: * extent of the negative and positive support for both synthesis and
057: * analysis sides. This simplifies the sue of some functionalities
058: * that need extra information about the filters.
059: *
060: * @see jj2000.j2k.wavelet.analysis.AnWTFilter
061: *
062: * @see jj2000.j2k.wavelet.synthesis.SynWTFilter
063: * */
064: public interface WaveletFilter {
065:
066: /** The ID for integer lifting spteps implementations */
067: public final static int WT_FILTER_INT_LIFT = 0;
068:
069: /** The ID for floating-point lifting spteps implementations */
070: public final static int WT_FILTER_FLOAT_LIFT = 1;
071:
072: /** The ID for floatring-poitn convolution implementations */
073: public final static int WT_FILTER_FLOAT_CONVOL = 2;
074:
075: /**
076: * Returns the negative support of the low-pass analysis
077: * filter. That is the number of taps of the filter in the
078: * negative direction.
079: *
080: * <P>A MORE PRECISE DEFINITION IS NEEDED
081: *
082: * @return The number of taps of the low-pass analysis filter in
083: * the negative direction
084: */
085: public int getAnLowNegSupport();
086:
087: /**
088: * Returns the positive support of the low-pass analysis
089: * filter. That is the number of taps of the filter in the
090: * negative direction.
091: *
092: * <P>A MORE PRECISE DEFINITION IS NEEDED
093: *
094: * @return The number of taps of the low-pass analysis filter in
095: * the positive direction
096: */
097: public int getAnLowPosSupport();
098:
099: /**
100: * Returns the negative support of the high-pass analysis
101: * filter. That is the number of taps of the filter in the
102: * negative direction.
103: *
104: * <P>A MORE PRECISE DEFINITION IS NEEDED
105: *
106: * @return The number of taps of the high-pass analysis filter in
107: * the negative direction
108: */
109: public int getAnHighNegSupport();
110:
111: /**
112: * Returns the positive support of the high-pass analysis
113: * filter. That is the number of taps of the filter in the
114: * negative direction.
115: *
116: * <P>A MORE PRECISE DEFINITION IS NEEDED
117: *
118: * @return The number of taps of the high-pass analysis filter in
119: * the positive direction
120: */
121: public int getAnHighPosSupport();
122:
123: /**
124: * Returns the negative support of the low-pass synthesis
125: * filter. That is the number of taps of the filter in the
126: * negative direction.
127: *
128: * <P>A MORE PRECISE DEFINITION IS NEEDED
129: *
130: * @return The number of taps of the low-pass synthesis filter in
131: * the negative direction
132: */
133: public int getSynLowNegSupport();
134:
135: /**
136: * Returns the positive support of the low-pass synthesis
137: * filter. That is the number of taps of the filter in the
138: * negative direction.
139: *
140: * <P>A MORE PRECISE DEFINITION IS NEEDED
141: *
142: * @return The number of taps of the low-pass synthesis filter in
143: * the positive direction
144: */
145: public int getSynLowPosSupport();
146:
147: /**
148: * Returns the negative support of the high-pass synthesis
149: * filter. That is the number of taps of the filter in the
150: * negative direction.
151: *
152: * <P>A MORE PRECISE DEFINITION IS NEEDED
153: *
154: * @return The number of taps of the high-pass synthesis filter in
155: * the negative direction
156: */
157: public int getSynHighNegSupport();
158:
159: /**
160: * Returns the positive support of the high-pass synthesis
161: * filter. That is the number of taps of the filter in the
162: * negative direction.
163: *
164: * <P>A MORE PRECISE DEFINITION IS NEEDED
165: *
166: * @return The number of taps of the high-pass synthesis filter in
167: * the positive direction
168: */
169: public int getSynHighPosSupport();
170:
171: /**
172: * Returns the implementation type of this filter, as defined in
173: * this class, such as WT_FILTER_INT_LIFT, WT_FILTER_FLOAT_LIFT,
174: * WT_FILTER_FLOAT_CONVOL.
175: *
176: * @return The implementation type of this filter:
177: * WT_FILTER_INT_LIFT, WT_FILTER_FLOAT_LIFT, WT_FILTER_FLOAT_CONVOL.
178: */
179: public int getImplType();
180:
181: /**
182: * Returns the type of data on which this filter works, as defined
183: * in the DataBlk interface.
184: *
185: * @return The type of data as defined in the DataBlk interface.
186: *
187: * @see jj2000.j2k.image.DataBlk
188: */
189: public int getDataType();
190:
191: /**
192: * Returns the reversibility of the filter. A filter is considered
193: * reversible if it is suitable for lossless coding.
194: *
195: * @return true if the filter is reversible, false otherwise.
196: */
197: public boolean isReversible();
198:
199: /**
200: * Returns true if the wavelet filter computes or uses the
201: * same "inner" subband coefficient as the full frame wavelet transform,
202: * and false otherwise. In particular, for block based transforms with
203: * reduced overlap, this method should return false. The term "inner"
204: * indicates that this applies only with respect to the coefficient that
205: * are not affected by image boundaries processings such as symmetric
206: * extension, since there is not reference method for this.
207: *
208: * <P>The result depends on the length of the allowed overlap when
209: * compared to the overlap required by the wavelet filter. It also
210: * depends on how overlap processing is implemented in the wavelet
211: * filter.
212: *
213: * @param tailOvrlp This is the number of samples in the input
214: * signal before the first sample to filter that can be used for
215: * overlap.
216: *
217: * @param headOvrlp This is the number of samples in the input
218: * signal after the last sample to filter that can be used for
219: * overlap.
220: *
221: * @param inLen This is the lenght of the input signal to filter.The
222: * required number of samples in the input signal after the last sample
223: * depends on the length of the input signal.
224: *
225: * @return true if the overlaps are large enough and correct processing is
226: * performed, false otherwise.
227: */
228: public boolean isSameAsFullWT(int tailOvrlp, int headOvrlp,
229: int inLen);
230:
231: }
|