|
JIGL v1.6 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--jigl.signal.DiscreteSignal
A discrete signal is a 1-d of shorts. It is called "discrete" because the values of the signal are not discrete integers.
| Field Summary | |
protected short[] |
data
One dimensional integer array |
protected int |
length
Length of the Signal |
| Constructor Summary | |
DiscreteSignal()
Creates an empty one dimensional DiscreteSignal with a height and width of zero |
|
DiscreteSignal(DiscreteSignal s)
Creates a one-dimensional DiscreteSignal (shallow copy) for a DiscreteSignal |
|
DiscreteSignal(int x)
Creates an empty one dimensional of length x |
|
DiscreteSignal(short[] data)
Creates a one-dimension DiscreteSignal object from an array of short integers. |
|
| Method Summary | |
DiscreteSignal |
add(DiscreteSignal s)
Adds another DiscreteSignal to this signal |
DiscreteSignal |
add(DiscreteSignal s,
ROI sourceROI,
ROI destROI)
Divides this signal's Region of Interest by a Region of Interest of another DiscreteSignal |
DiscreteSignal |
add(int v)
Adds a value to all the samples in this signal |
void |
add(int x,
int value)
Adds a value to a single sample |
void |
add(int x,
int value,
ROI roi)
Adds a value to a single sample in a Region of Interest |
DiscreteSignal |
add(int v,
ROI roi)
Adds a value to all the samples in in a Region of Interest |
DiscreteSignal |
addbuffer(int w,
int color)
Makes a copy of this signal with a buffer so the resulting signal has a width w |
void |
byteSize()
Scales the range of this signal to byte [0..255] |
void |
byteSize(ROI roi)
Scales the range of a Region of Interest to byte [0..255] in a Region of Interest |
DiscreteSignal |
clear()
Clears the signal to zero |
DiscreteSignal |
clear(int val)
Clears to constant value |
DiscreteSignal |
clear(int val,
ROI roi)
Clears to constant value in a Region of Interest |
DiscreteSignal |
clear(ROI roi)
Clears the signal to zero in a Region of Interest |
void |
clip(int min,
int max)
Clips the range of this signal to an arbitrary min/max. |
void |
clip(int min,
int max,
ROI roi)
Clips the range of in a Region of Interest to an arbitrary min/max |
void |
convolve(DiscreteSignal kernel)
Performs convolution in place with a kernel signal on this signal. |
void |
convolve(DiscreteSignal kernel,
ROI roi)
Performs convolution in place with a kernel signal on a Region of Interest. |
Signal |
copy()
Makes a deep copy of this signal. |
Signal |
copy(ROI roi)
Makes a deep copy in a Region of Interest |
short[] |
data()
Returns a deep copy of a JIGL signal's sample buffer. |
DiscreteSignal |
diff(DiscreteSignal s)
Subtracts the second signal from the first and returns the absolute value |
DiscreteSignal |
divide(DiscreteSignal s)
Divides this signal by a DiscreteSignal. |
DiscreteSignal |
divide(DiscreteSignal s,
ROI sourceROI,
ROI destROI)
Multiplies a Region of Interest of another DiscreteSignal to a Region of Interest of this signal |
DiscreteSignal |
divide(int v)
Divides all the samples in this signal by a value |
void |
divide(int x,
int value)
Divides a single sample by a value. |
void |
divide(int x,
int value,
ROI roi)
Divides a single sample by a value in a Region of Interest |
DiscreteSignal |
divide(int v,
ROI roi)
Divides all the samples in in a Region of Interest by a value |
int |
get(int x)
Returns the sample value at the given x |
int |
get(int x,
ROI roi)
Returns the sample value at the given x value in a Region of Interest |
short[] |
getData()
Converts a DiscreteSignal object into an array of short integers. |
int |
length()
Returns the length of this signal |
int |
max()
Finds the maximum value of this signal |
int |
max(ROI roi)
Finds the maximum value of in a Region of Interest |
void |
median(int size)
Performs median filter on this signal. |
void |
median(int size,
ROI roi)
Performs median filter on a Region of Interest. |
int |
min()
Finds the minimum value of this signal. |
int |
min(ROI roi)
Finds the minimum value of in a Region of Interest |
DiscreteSignal |
multiply(DiscreteSignal s)
Multiplies a DiscreteSignal by this signal. |
DiscreteSignal |
multiply(DiscreteSignal s,
ROI sourceROI,
ROI destROI)
Subtracts a Region of Interest from another DiscreteSignal from a Region of Interest of this signal |
DiscreteSignal |
multiply(int v)
Multiplies all the samples in this signal by a value |
void |
multiply(int x,
int value)
Mutiplies a single sample by a value |
void |
multiply(int x,
int value,
ROI roi)
Mutiplies a single sample by a value in a Region of Interest |
DiscreteSignal |
multiply(int v,
ROI roi)
Multiplies all the samples in in a Region of Interest by a value |
void |
set(int x,
int value)
Sets the sample value at x to a given value |
void |
set(int x,
int value,
ROI roi)
Sets the sample value at x to a given value in a Region of Interest |
private double[] |
sort(double[] vals,
int size)
Utility method: sorting a double array. |
DiscreteSignal |
subtract(DiscreteSignal s)
Subtracts a DiscreteSignal from this signal. |
DiscreteSignal |
subtract(DiscreteSignal s,
ROI sourceROI,
ROI destROI)
Adds a Region of Interest of another DiscreteSignal to a Region of Interest of this signal |
DiscreteSignal |
subtract(int v)
Subtracts a value from all the samples in this signal |
void |
subtract(int x,
int value)
Subtracts a value from a single sample |
void |
subtract(int x,
int value,
ROI roi)
Subtracts a value from a single sample in a Region of Interest |
DiscreteSignal |
subtract(int v,
ROI roi)
Subtracts a value from all the samples in in a Region of Interest |
String |
toString()
Prints the string in integer format. |
String |
toString(ROI roi)
Prints the string in integer format in a Region of Interest. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected short[] data
protected int length
| Constructor Detail |
public DiscreteSignal()
public DiscreteSignal(int x)
public DiscreteSignal(DiscreteSignal s)
public DiscreteSignal(short[] data)
| Method Detail |
public short[] getData()
public Signal copy()
copy in interface Signalpublic final int length()
length in interface Signalpublic final short[] data()
public final int get(int x)
x - the X coordinate
public final void set(int x,
int value)
x - the X coordinatevalue - the value to set the sample topublic final DiscreteSignal clear()
public final DiscreteSignal clear(int val)
val - the value to "clear" the signal to
public final void add(int x,
int value)
x - X-coordinatevalue - the value to add to the sample
public final void subtract(int x,
int value)
x - X-coordinatevalue - the value to subtract from the sample
public final void multiply(int x,
int value)
x - X-coordinatevalue - - the value to mutiply to the sample
public final void divide(int x,
int value)
value
should not be 0.
x - X-coordinatevalue - - the value to mutiply to the samplepublic final int min()
public final int max()
public final DiscreteSignal add(int v)
v - value to be added to the samples
public final DiscreteSignal subtract(int v)
v - value to be added to the samples
public final DiscreteSignal multiply(int v)
v - value to be added to the samples
public final DiscreteSignal divide(int v)
v - value to be added to the samples
public final DiscreteSignal add(DiscreteSignal s)
s - the DiscreteSignal to add
public DiscreteSignal addbuffer(int w,
int color)
w - width of buffered signalcolor - default buffer value
public final DiscreteSignal subtract(DiscreteSignal s)
this is modified.
s - the DiscreteSignal to subtract
public final DiscreteSignal diff(DiscreteSignal s)
s - the DiscreteSignal to subtract
public final DiscreteSignal multiply(DiscreteSignal s)
this is modified.
s - the DiscreteSignal to multiply
public final DiscreteSignal divide(DiscreteSignal s)
this is modified.
s - the DiscreteSignal to divide
public String toString()
toString in interface SignaltoString in class Objectpublic void byteSize()
public final void clip(int min,
int max)
min - minimum valuemax - maximum valuepublic void convolve(DiscreteSignal kernel)
this.
kernel - kernel to perform the convolution with
private double[] sort(double[] vals,
int size)
public void median(int size)
[data[x-size/2] .. data[x+size/2]]
size should be odd.
size - the size of the median filterpublic Signal copy(ROI roi)
roi - Region of Interest
public final int get(int x,
ROI roi)
x - the X coordinateroi - Region of Interest
public final void set(int x,
int value,
ROI roi)
x - the X coordinatevalue - the value to set the sample toroi - Region of Interestpublic final DiscreteSignal clear(ROI roi)
roi - Region of Interest
public final DiscreteSignal clear(int val,
ROI roi)
val - the value to "clear" the signal toroi - Region of Interest
public final void add(int x,
int value,
ROI roi)
x - X-coordinatevalue - the value to add to the sampleroi - Region of Interest
public final void subtract(int x,
int value,
ROI roi)
x - X-coordinatevalue - the value to subtract from the sampleroi - Region of Interest
public final void multiply(int x,
int value,
ROI roi)
x - X-coordinatevalue - - the value to mutiply to the sampleroi - Region of Interest
public final void divide(int x,
int value,
ROI roi)
x - X-coordinatevalue - - the value to mutiply to the sampleroi - Region of Interestpublic final int min(ROI roi)
roi - Region of Interest
public final int max(ROI roi)
roi - Region of Interest
public final DiscreteSignal add(int v,
ROI roi)
v - value to be added to the samplesroi - Region of Interest
public final DiscreteSignal subtract(int v,
ROI roi)
v - value to be added to the samplesroi - Region of Interest
public final DiscreteSignal multiply(int v,
ROI roi)
v - value to be added to the samplesroi - Region of Interest
public final DiscreteSignal divide(int v,
ROI roi)
v - value to be added to the samplesroi - Region of Interest
public final DiscreteSignal subtract(DiscreteSignal s,
ROI sourceROI,
ROI destROI)
s - the DiscreteSignal to addsourceROI - Region of Interest for Source SignaldestROI - Region of Interest for Destination Signal
public final DiscreteSignal multiply(DiscreteSignal s,
ROI sourceROI,
ROI destROI)
s - the DiscreteSignal to subtractsourceROI - Region of Interest for Source SignaldestROI - Region of Interest for Destination Signal
public final DiscreteSignal divide(DiscreteSignal s,
ROI sourceROI,
ROI destROI)
s - the DiscreteSignal to multiplysourceROI - Region of Interest for Source SignaldestROI - Region of Interest for Destination Signal
public final DiscreteSignal add(DiscreteSignal s,
ROI sourceROI,
ROI destROI)
s - the DiscreteSignal to dividesourceROI - Region of Interest for Source SignaldestROI - Region of Interest for Destination Signal
public String toString(ROI roi)
roi - Region of Interestpublic void byteSize(ROI roi)
roi - Region of Interest
public final void clip(int min,
int max,
ROI roi)
min - minimum valuemax - maximum valueroi - Region of Interest
public void convolve(DiscreteSignal kernel,
ROI roi)
this.
kernel - kernel to perform the convolution withroi - Region of Interest
public void median(int size,
ROI roi)
size should be odd.
size - the size of the median filterroi - Region of Interest
|
JIGL v1.6 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||