|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.cuni.jagrlib.DefaultProperty
cz.cuni.jagrlib.Piece
cz.cuni.jagrlib.DefaultDiscreteTransform
public abstract class DefaultDiscreteTransform
Default implementation of DiscreteTransform
interface.
2D transforms are based on 1D ones (separable extension).
Field Summary | |
---|---|
protected static java.lang.String |
CATEGORY
Object category. |
protected static java.lang.String |
TEMPLATE_NAME
Object template identifier. |
Fields inherited from class cz.cuni.jagrlib.Piece |
---|
channels, info, pl, plugs, reg, TEMPLATE_TYPE, userBreak |
Fields inherited from interface cz.cuni.jagrlib.iface.Property |
---|
LOGGING, STATISTICS, TEXT_DESCRIPTION |
Constructor Summary | |
---|---|
DefaultDiscreteTransform()
|
Method Summary | |
---|---|
boolean |
getSizeBounds(int[] bounds)
Get extreme domain (source) ranges. |
int |
inverse1D(double[] coef,
int len,
double[] sample,
int start)
Inverse 1D transform (floating-point form). |
int |
inverse1D(int[] coef,
int len,
int[] sample,
int start)
Inverse 1D transform (integer form). |
int |
inverse2D(double[] coef,
int len,
double[] sample,
int start,
int width,
int stride)
Inverse 2D transform (floating-point form). |
int |
inverse2D(int[] coef,
int len,
int[] sample,
int start,
int width,
int stride)
Inverse 2D transform (integer form). |
boolean |
loadData(byte[] data)
Loads instance parameters from (previously stored) binary data. |
byte[] |
storeData()
Pack instance parameters into binary format. |
int |
transform1D(double[] sample,
int start,
int len,
double[] coef)
Forward 1D transform (floating-point form). |
int |
transform1D(int[] sample,
int start,
int len,
int[] coef)
Forward 1D transform (integer form). |
int |
transform2D(double[] sample,
int start,
int width,
int height,
int stride,
double[] coef)
Forward 2D transform (floating-point form). |
int |
transform2D(int[] sample,
int start,
int width,
int height,
int stride,
int[] coef)
Forward 2D transform (integer form). |
Methods inherited from class cz.cuni.jagrlib.Piece |
---|
className, connect, findPlug, findPlug, getInfo, getInterface, getInterface, getPlug, getReg, init, isCompatible, isCompatible, isConnected, logError, logWarning, myInterface, newInputPlug, newOptOutputPlug, newOutputPlug, newPlug, noTemplates, propBegin, propBounds, propDefault, propEnd, propEnum, propManipulator, propManipulator, setProgressListener, setRegStrings, setTemplate, setTemplateDynamic, stop |
Methods inherited from class cz.cuni.jagrlib.DefaultProperty |
---|
booleanProperty, booleanProperty, colorDoubleProperty, colorProperty, commit, doubleProperty, doubleProperty, doubleProperty, enumProperty, floatProperty, floatProperty, floatProperty, get, intProperty, intProperty, intProperty, longProperty, longProperty, longProperty, set, set, stringProperty |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface cz.cuni.jagrlib.iface.Property |
---|
commit, get, set |
Field Detail |
---|
protected static final java.lang.String TEMPLATE_NAME
protected static final java.lang.String CATEGORY
Constructor Detail |
---|
public DefaultDiscreteTransform()
Method Detail |
---|
public boolean getSizeBounds(int[] bounds)
getSizeBounds
in interface DiscreteTransform
bounds
- Pre-allocated array to hold extreme ranges:
public int transform1D(int[] sample, int start, int len, int[] coef)
Converts argument into double[] array and performs transform1D(double[],int,int,double[])
.
Result double[] array is rounded back into original result array.
transform1D
in interface DiscreteTransform
sample
- Source array (containing sample data).start
- Starting index of the transformed segment.len
- Source segment length.coef
- Pre-allocated array to hold transformed data (coefficients).
inverse1D(int[],int,int[],int)
,
transform1D(double[],int,int,double[])
public int transform1D(double[] sample, int start, int len, double[] coef)
Converts argument into int[] array and performs transform1D(int[],int,int,int[])
.
transform1D
in interface DiscreteTransform
sample
- Source array (containing sample data).start
- Starting index of the transformed segment.len
- Source segment length.coef
- Pre-allocated array to hold transformed data (coefficients).
inverse1D(double[],int,double[],int)
,
transform1D(int[],int,int,int[])
public int inverse1D(int[] coef, int len, int[] sample, int start)
transform1D(int[],int,int,int[])
.
Converts argument into double[] array and performs inverse1D(double[],int,double[],int)
.
Result double[] array is rounded back into original result array.
inverse1D
in interface DiscreteTransform
coef
- Source array (holding coefficients).len
- Number of coefficients.sample
- Pre-allocated array to hold reconstructed sample data.start
- Starting index of the reconstructed sample data.
transform1D(int[],int,int,int[])
,
inverse1D(double[],int,double[],int)
public int inverse1D(double[] coef, int len, double[] sample, int start)
transform1D(double[],int,int,double[])
.
Converts argument into int[] array and performs inverse1D(int[],int,int[],int)
.
inverse1D
in interface DiscreteTransform
coef
- Source array (holding coefficients).len
- Number of coefficients.sample
- Pre-allocated array to hold reconstructed sample data.start
- Starting index of the reconstructed sample data.
transform1D(double[],int,int,double[])
,
inverse1D(int[],int,int[],int)
public int transform2D(int[] sample, int start, int width, int height, int stride, int[] coef)
transform2D
in interface DiscreteTransform
sample
- Source array (containing sample data).start
- Starting index of the transformed data.width
- Source rectangle's width (faster index).height
- Source rectangle's height (slower index).stride
- Source matrix row length.coef
- Pre-allocated array to hold transformed data (coefficients).
inverse2D(int[],int,int[],int,int,int)
,
transform2D(double[],int,int,int,int,double[])
public int transform2D(double[] sample, int start, int width, int height, int stride, double[] coef)
transform2D
in interface DiscreteTransform
sample
- Source array (containing sample data).start
- Starting index of the transformed data.width
- Source rectangle's width (faster index).height
- Source rectangle's height (slower index).stride
- Source matrix row length.coef
- Pre-allocated array to hold transformed data (coefficients).
inverse2D(double[],int,double[],int,int,int)
,
transform2D(int[],int,int,int,int,int[])
public int inverse2D(int[] coef, int len, int[] sample, int start, int width, int stride)
transform2D(int[],int,int,int,int,int[])
.
inverse2D
in interface DiscreteTransform
coef
- Source array (holding coefficients).len
- Number of coefficients.sample
- Pre-allocated array to hold reconstructed sample data.start
- Starting index of the reconstructed rectangle.width
- Reconstructed rectangle's width (faster index).stride
- Reconstructed data matrix row length.
transform2D(int[],int,int,int,int,int[])
,
inverse2D(double[],int,double[],int,int,int)
public int inverse2D(double[] coef, int len, double[] sample, int start, int width, int stride)
transform2D(double[],int,int,int,int,double[])
.
inverse2D
in interface DiscreteTransform
coef
- Source array (holding coefficients).len
- Number of coefficients.sample
- Pre-allocated array to hold reconstructed sample data.start
- Starting index of the reconstructed rectangle.width
- Reconstructed rectangle's width (faster index).stride
- Reconstructed data matrix row length.
transform2D(double[],int,int,int,int,double[])
,
inverse2D(int[],int,int[],int,int,int)
public byte[] storeData()
storeData
in interface PersistentParamsBinary
loadData(byte[])
public boolean loadData(byte[] data)
loadData
in interface PersistentParamsBinary
data
- Binary data to be interpreted. Can be null.
storeData()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |