[]
        
(Showing Draft Content)

CSJ2K.j2k.wavelet.analysis.AnWTFilter

AnWTFilter Class

<p>This abstract class defines the methods of all analysis wavelet

filters. Specialized abstract classes that work on particular data types (int, float) provide more specific method calls while retaining the generality of this one. See the AnWTFilterInt and AnWTFilterFloat classes. Implementations of analysis filters should inherit from one of those classes.

All analysis wavelet filters should follow the following conventions:

  • The first sample to filter is the low-pass one. As a consequence, if the input signal is of odd-length then the low-pass output signal is one sample longer than the high-pass output one. Therefore, if the length of input signal is N, the low-pass output signal is of length N/2 if N is even and N/2+1/2 if N is odd, while the high-pass output signal is of length N/2 if N is even and N/2-1/2 if N is odd.
  • The normalization is 1 for the DC gain and 2 for the Nyquist gain (Type I normalization), for both reversible and non-reversible filters.
  • If the length of input signal is N, the low-pass output signal is of length N/2 if N is even and N/2+1/2 if N is odd, while the high-pass output sample is of length N/2 if N is even and N/2-1/2 if N is odd.
  • The analyze method may seem very complicated, but is designed to minimize the amount of data copying and redundant calculations when used for block-based or line-based wavelet transform implementations, while being applicable to full-frame transforms as well.
  • All filters should implement the equals() method of the Object class. The call x.equals(y) should test if the 'x' and 'y' filters are the same or not, in what concerns the bit stream header syntax (two filters are the same if the same filter code should be output to the bit stream).
Inheritance
AnWTFilter
Implements
Namespace: CSJ2K.j2k.wavelet.analysis
Assembly: C1.WPF.PdfViewer.4.6.2.dll
Syntax
public abstract class AnWTFilter : WaveletFilter

Constructors

Name Description
AnWTFilter()

Fields

Name Description
OPT_PREFIX

The prefix for wavelet filter options: 'F'

Properties

Name Description
AnHighNegSupport

Returns the negative support of the high-pass analysis filter. That is the number of taps of the filter in the negative direction.

AnHighPosSupport

Returns the positive support of the high-pass analysis filter. That is the number of taps of the filter in the negative direction.

AnLowNegSupport

Returns the negative support of the low-pass analysis filter. That is the number of taps of the filter in the negative direction.

AnLowPosSupport

Returns the positive support of the low-pass analysis filter. That is the number of taps of the filter in the negative direction.

DataType

Returns the type of data on which this filter works, as defined in the DataBlk interface.

FilterType

Returns the type of filter used according to the FilterTypes interface.

ImplType

Returns the implementation type of this filter, as defined in this class, such as WT_FILTER_INT_LIFT, WT_FILTER_FLOAT_LIFT, WT_FILTER_FLOAT_CONVOL.

ParameterInfo

Returns the parameters that are used in this class and implementing classes. It returns a 2D String array. Each of the 1D arrays is for a different option, and they have 3 elements. The first element is the option name, the second one is the synopsis, the third one is a long description of what the parameter is and the fourth is its default value. The synopsis or description may be 'null', in which case it is assumed that there is no synopsis or description of the option, respectively. Null may be returned if no options are supported.

Reversible

Returns the reversibility of the filter. A filter is considered reversible if it is suitable for lossless coding.

SynHighNegSupport

Returns the negative support of the high-pass synthesis filter. That is the number of taps of the filter in the negative direction.

SynHighPosSupport

Returns the positive support of the high-pass synthesis filter. That is the number of taps of the filter in the negative direction.

SynLowNegSupport

Returns the negative support of the low-pass synthesis filter. That is the number of taps of the filter in the negative direction.

SynLowPosSupport

Returns the positive support of the low-pass synthesis filter. That is the number of taps of the filter in the negative direction.

Methods

Name Description
analyze_hpf(object, int, int, int, object, int, int, object, int, int)

Filters the input signal by this analysis filter, decomposing it in a low-pass and a high-pass signal. This method performs the filtering and the subsampling with the high pass first filtering convention.

       <p>The input signal resides in the inSig array. The index of the first
       sample to filter (i.e. that will generate the first high-pass output
       sample) is given by inOff. The number of samples to filter is given by
       inLen. This array must be of the same type as the one for which the
       particular implementation works with (which is returned by the
       getDataType() method).</p><p>The input signal can be interleaved with other signals in the same
       inSig array, and this is determined by the inStep argument. This means
       that the first sample of the input signal is inSig[inOff], the second
       is inSig[inOff+inStep], the third is inSig[inOff+2*inStep], and so
       on. Therefore if inStep is 1 there is no interleaving. This feature
       allows to filter columns of a 2-D signal, when it is stored in a line
       by line order in inSig, without having to copy the data, in this case
       the inStep argument should be the line width.</p><p>The low-pass output signal is placed in the lowSig array. The lowOff
       and lowStep arguments are analogous to the inOff and inStep ones, but
       they apply to the lowSig array. The lowSig array must be long enough to
       hold the low-pass output signal.</p><p>The high-pass output signal is placed in the highSig array. The
       highOff and highStep arguments are analogous to the inOff and inStep
       ones, but they apply to the highSig array. The highSig array must be
       long enough to hold the high-pass output signal.</p>
analyze_lpf(object, int, int, int, object, int, int, object, int, int)

Filters the input signal by this analysis filter, decomposing it in a low-pass and a high-pass signal. This method performs the filtering and the subsampling with the low pass first filtering convention.

       <p>The input signal resides in the inSig array. The index of the first
       sample to filter (i.e. that will generate the first low-pass output
       sample) is given by inOff. The number of samples to filter is given by
       inLen. This array must be of the same type as the one for which the
       particular implementation works with (which is returned by the
       getDataType() method).</p><p>The input signal can be interleaved with other signals in the same
       inSig array, and this is determined by the inStep argument. This means
       that the first sample of the input signal is inSig[inOff], the second
       is inSig[inOff+inStep], the third is inSig[inOff+2*inStep], and so
       on. Therefore if inStep is 1 there is no interleaving. This feature
       allows to filter columns of a 2-D signal, when it is stored in a line
       by line order in inSig, without having to copy the data, in this case
       the inStep argument should be the line width.</p><p>This method also allows to apply the analysis wavelet filter by
       parts in the input signal using an overlap and thus producing the same
       coefficients at the output. The tailOvrlp argument specifies how many
       samples in the input signal, before the first one to be filtered, can
       be used for overlap. Then, the filter instead of extending the input
       signal will use those samples to calculate the first output
       samples. The argument tailOvrlp can be 0 for no overlap, or some value
       that provides partial or full overlap. There should be enough samples
       in the input signal, before the first sample to be filtered, to support
       the overlap. The headOvrlp provides the same functionality but at the
       end of the input signal. The inStep argument also applies to samples
       used for overlap. This overlap feature can be used for line-based
       wavelet transforms (in which case it will only be used when filtering
       the columns) or for overlapping block-based wavelet transforms (in
       which case it will be used when filtering lines and columns).</p><p>The low-pass output signal is placed in the lowSig array. The lowOff
       and lowStep arguments are analogous to the inOff and inStep ones, but
       they apply to the lowSig array. The lowSig array must be long enough to
       hold the low-pass output signal.</p><p>The high-pass output signal is placed in the highSig array. The
       highOff and highStep arguments are analogous to the inOff and inStep
       ones, but they apply to the highSig array. The highSig array must be
       long enough to hold the high-pass output signal.</p>
getHPSynWaveForm(float[], float[])

Returns the equivalent high-pass synthesis waveform of a cascade of filters, given the syhthesis waveform of the previous stage. This is the result of upsampling 'in' by 2, and concolving it with the high-pass synthesis waveform of the filter. The length of the returned signal is 2*in_l+hp_l-2, where in_l is the length of 'in' and 'hp_l' is the lengthg of the high-pass synthesis filter.

       <p>The length of the high-pass synthesis filter is
       getSynHighNegSupport()+getSynHighPosSupport().</p>
getHPSynthesisFilter()

Returns the time-reversed high-pass synthesis waveform of the filter, which is the high-pass filter. This is the time-reversed impulse response of the high-pass synthesis filter. It is used to calculate the L2-norm of the synthesis basis functions for a particular subband (also called energy weight).

       <p>The returned array may not be modified (i.e. a reference to the
       internal array may be returned by the implementation of this
       method).</p>
getLPSynWaveForm(float[], float[])

Returns the equivalent low-pass synthesis waveform of a cascade of filters, given the syhthesis waveform of the previous stage. This is the result of upsampling 'in' by 2, and concolving it with the low-pass synthesis waveform of the filter. The length of the returned signal is 2*in_l+lp_l-2, where in_l is the length of 'in' and 'lp_l' is the lengthg of the low-pass synthesis filter.

       <p>The length of the low-pass synthesis filter is
       getSynLowNegSupport()+getSynLowPosSupport().</p>
getLPSynthesisFilter()

Returns the time-reversed low-pass synthesis waveform of the filter, which is the low-pass filter. This is the time-reversed impulse response of the low-pass synthesis filter. It is used to calculate the L2-norm of the synthesis basis functions for a particular subband (also called energy weight).

       <p>The returned array may not be modified (i.e. a reference to the
       internal array may be returned by the implementation of this
       method).</p>
isSameAsFullWT(int, int, int)

Returns true if the wavelet filter computes or uses the same "inner" subband coefficient as the full frame wavelet transform, and false otherwise. In particular, for block based transforms with reduced overlap, this method should return false. The term "inner" indicates that this applies only with respect to the coefficient that are not affected by image boundaries processings such as symmetric extension, since there is not reference method for this.

       <p>The result depends on the length of the allowed overlap when
       compared to the overlap required by the wavelet filter. It also depends
       on how overlap processing is implemented in the wavelet filter.</p>

See Also