public class CalculateRequiredComponentsDPCM
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
CLASSIC
Is the classical DPCM, where each component (apart from first one) is
obtained as a difference from the previous one.
|
private int[] |
compsArray
Is an one-dimensional array with the inital components values.
|
private int |
maxNumComps
Is the maximum number of components.
|
private int[] |
requiredCompsArray
Contains the required components which will be necessary to invert
the
compsArray components. |
static int |
RESTART_ARBITRARY
Is a clustered DPCM where the indexes for the restart can take each
value from the value ranges, with and without regular recurrence.
|
static int |
RESTART_PERIODIC
Is a clustered DPCM where the restart index is fixed.
|
private int |
restartIndex
Is the component index used in the
RESTART_PERIODIC mode. |
private int[] |
restartIndexes
Is a one-dimensional array with component indexes for the
3 mode.
|
private int |
type
Indicates the type of DPCM.
|
Constructor and Description |
---|
CalculateRequiredComponentsDPCM(int[][] comps,
int maxNumComps)
Constructor.
|
CalculateRequiredComponentsDPCM(int[] compsArray,
int maxNumComps)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
private int[] |
calculateRequiredComponentsWithRestartFixed()
Calculates which are the necessary components to invert a DPCM transform
using fixed restart components.
|
private int[] |
calculateRequiredComponentsWithRestartPeriodical()
Calculates which are the necessary components to inver a DPCM transform
using periodical components.
|
int[][] |
getRequiredComps()
Returns the
requiredCompsArray as a range of components. |
int[] |
getRequiredCompsArray()
Returns the
requiredCompsArray attribute. |
void |
list(java.io.PrintStream out)
Prints this Client Capabilities and Preferences fields out to the
specified output stream.
|
void |
run()
Performs the calculus of the required components.
|
void |
setClassical()
Sets the DPCM type to classic.
|
void |
setRestartArbitrary(int[] restartIndexes)
Sets the DPCM type to the restart fixed mode.
|
void |
setRestartPeriodic(int restartIndex)
Sets the DPCM type to the restart periodical mode.
|
java.lang.String |
toString() |
private int type
public static final int CLASSIC
public static final int RESTART_PERIODIC
public static final int RESTART_ARBITRARY
private int[] compsArray
private int maxNumComps
private int restartIndex
RESTART_PERIODIC
mode.private int[] restartIndexes
private int[] requiredCompsArray
compsArray
components.public CalculateRequiredComponentsDPCM(int[] compsArray, int maxNumComps)
compsArray
- definition compsArray
.maxNumComps
- definition in maxNumComps
.public CalculateRequiredComponentsDPCM(int[][] comps, int maxNumComps)
comps
- definition in ViewWindowField.comps
.maxNumComps
- definition in maxNumComps
.public void setClassical()
CLASSIC
.public void setRestartPeriodic(int restartIndex)
RESTART_PERIODIC
.restartIndex
- definition in restartIndex
.public void setRestartArbitrary(int[] restartIndexes)
RESTART_ARBITRARY
.restartIndexes
- defintion in restartIndexes
.public void run() throws java.lang.IllegalAccessException
java.lang.IllegalAccessException
public int[] getRequiredCompsArray()
requiredCompsArray
attribute.requiredCompsArray
attribute.public int[][] getRequiredComps()
requiredCompsArray
as a range of components.requiredCompsArray
as a range of components.public java.lang.String toString()
toString
in class java.lang.Object
public void list(java.io.PrintStream out)
out
- an output stream.private int[] calculateRequiredComponentsWithRestartPeriodical()
private int[] calculateRequiredComponentsWithRestartFixed()
CADI - Copyright (C) 2007
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Group on Interactive Coding of Images (GICI) (contact)