|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jm.jigl.RealSignal
A discrete signal is a 1-d of floats RealSignal implements Signal
jigl.signal.RealSignal
Field Summary | |
protected float[] |
data
One dimensional float array |
protected int |
length
Length of the Signal |
Constructor Summary | |
RealSignal()
Creates an empty one dimensional RealSignal with a height and width of zero |
|
RealSignal(int x)
Creates an empty one dimensional of length x |
|
RealSignal(RealSignal s)
Creates a one dimensional RealSignal (shallow copy) for a RealSignal |
Method Summary | |
RealSignal |
add(float v)
Adds a value to all the samples in this signal |
RealSignal |
add(float v,
ROI r)
Adds a value to all the samples in in a Region of Interest |
void |
add(int x,
float value)
Adds a value to a single sample |
void |
add(int x,
float value,
ROI r)
Adds a value to a single sample |
RealSignal |
add(RealSignal s)
Adds another RealSignal to this signal |
RealSignal |
add(RealSignal s,
ROI sourceSignal,
ROI destSignal)
Divides this signal's Region of Interest by a Region of Interest of another RealSignal |
RealSignal |
addbuffer(int w,
int color)
Makes a copy of this image with a buffer so the resulting image has a width x and height y |
void |
byteSize()
Scales the range of this signal to byte (0..255) |
void |
byteSize(ROI r)
Scales the range of a Region of Interest to byte (0..255) |
RealSignal |
clear()
Clears the signal to zero |
RealSignal |
clear(float val)
Clears to constant value |
RealSignal |
clear(float val,
ROI r)
Clears to constant value |
RealSignal |
clear(ROI r)
Clears the signal to zero |
void |
clip(int min,
int max)
Clips the range of this signal to an arbitrary min/max |
void |
clip(int min,
int max,
ROI r)
Clips the range of in a Region of Interest to an arbitrary min/max |
void |
convolve(RealSignal kernel)
Performs convolution in place with a kernel signal on this signal. |
void |
convolve(RealSignal kernel,
ROI r)
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 r)
Makes a deep copy in a Region of Interest |
float[] |
data()
Makes a shallow copy of a JIGL signal's sample buffer |
RealSignal |
diff(RealSignal s)
Subtracts the second signal from the first and returns the absolute value |
RealSignal |
divide(float v)
Divides all the samples in this signal by a value |
RealSignal |
divide(float v,
ROI r)
Divides all the samples in in a Region of Interest by a value |
void |
divide(int x,
float value)
Divides a single sample by a value |
void |
divide(int x,
float value,
ROI r)
Divides a single sample by a value |
RealSignal |
divide(RealSignal s)
Divides this signal by a RealSignal |
RealSignal |
divide(RealSignal s,
ROI sourceSignal,
ROI destSignal)
Multiplies a Region of Interest of another RealSignal to a Region of Interest of this signal |
float |
get(int x)
Returns the sample value at the given x, y value |
float |
get(int x,
ROI r)
Returns the sample value at the given x, y value |
int |
length()
Returns the length of this signal |
float |
max()
Finds the maximum value of this signal |
float |
max(ROI r)
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 r)
Performs median filter on a Region of Interest |
float |
min()
Finds the minimum value of this signal |
float |
min(ROI r)
Finds the minimum value of in a Region of Interest |
RealSignal |
multiply(float v)
Multiplies all the samples in this signal by a value |
RealSignal |
multiply(float v,
ROI r)
Multiplies all the samples in in a Region of Interest by a value |
void |
multiply(int x,
float value)
Mutiplies a single sample by a value |
void |
multiply(int x,
float value,
ROI r)
Mutiplies a single sample by a value |
RealSignal |
multiply(RealSignal s)
Multiplies a RealSignal by this signal |
RealSignal |
multiply(RealSignal s,
ROI sourceSignal,
ROI destSignal)
Subtracts a Region of Interest from another RealSignal from a Region of Interest of this signal |
void |
set(int x,
float value)
Sets the sample value at x, y to a given value |
void |
set(int x,
float value,
ROI r)
Sets the sample value at x, y to a given value |
RealSignal |
subtract(float v)
Subtracts a value from all the samples in this signal |
RealSignal |
subtract(float v,
ROI r)
Subtracts a value from all the samples in in a Region of Interest |
void |
subtract(int x,
float value)
Subtracts a value from a single sample |
void |
subtract(int x,
float value,
ROI r)
Subtracts a value from a single sample |
RealSignal |
subtract(RealSignal s)
Subtracts a RealSignal from this signal |
RealSignal |
subtract(RealSignal s,
ROI sourceSignal,
ROI destSignal)
Adds a Region of Interest of another RealSignal to a Region of Interest of this signal |
java.lang.String |
toString()
Prints the string in float format. |
java.lang.String |
toString(ROI r)
Prints the string in float format. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected float[] data
protected int length
Constructor Detail |
public RealSignal()
public RealSignal(int x)
public RealSignal(RealSignal s)
Method Detail |
public Signal copy()
copy
in interface Signal
public final int length()
length
in interface Signal
public final float[] data()
public final float get(int x)
x
- the X coordinantpublic final void set(int x, float value)
x
- the X coordinantvalue
- the value to set the sample topublic final RealSignal clear()
public final RealSignal clear(float val)
val
- the value to "clear" the signal topublic final void add(int x, float value)
x
- X-coordinantvalue
- the value to add to the samplepublic final void subtract(int x, float value)
x
- X-coordinantvalue
- the value to subtract from the samplepublic final void multiply(int x, float value)
x
- X-coordinantvalue
- - the value to mutiply to the samplepublic final void divide(int x, float value)
x
- X-coordinantvalue
- - the value to mutiply to the samplepublic final float min()
public final float max()
public final RealSignal add(float v)
v
- value to be added to the samples
public RealSignal addbuffer(int w, int color)
public final RealSignal subtract(float v)
v
- value to be added to the samples
public final RealSignal multiply(float v)
v
- value to be added to the samples
public final RealSignal divide(float v)
v
- value to be added to the samples
public final RealSignal add(RealSignal s)
public final RealSignal subtract(RealSignal s)
public final RealSignal diff(RealSignal s)
public final RealSignal multiply(RealSignal s)
public final RealSignal divide(RealSignal s)
public java.lang.String toString()
toString
in interface Signal
toString
in class java.lang.Object
public void byteSize()
public final void clip(int min, int max)
min
- minimum valuemax
- maximum valuepublic void convolve(RealSignal kernel)
kernel
- kernel to perform the convolution withpublic void median(int size)
size
- the size of the median filterpublic Signal copy(ROI r)
r
- Region of Interest
public final float get(int x, ROI r)
x
- the X coordinantpublic final void set(int x, float value, ROI r)
x
- the X coordinantvalue
- the value to set the sample topublic final RealSignal clear(ROI r)
r
- Region of Interestpublic final RealSignal clear(float val, ROI r)
val
- the value to "clear" the signal tor
- Region of Interestpublic final void add(int x, float value, ROI r)
x
- X-coordinantvalue
- the value to add to the sampler
- Region of Interestpublic final void subtract(int x, float value, ROI r)
x
- X-coordinantvalue
- the value to subtract from the sampler
- Region of Interestpublic final void multiply(int x, float value, ROI r)
x
- X-coordinantvalue
- - the value to mutiply to the sampler
- Region of Interestpublic final void divide(int x, float value, ROI r)
x
- X-coordinantvalue
- - the value to mutiply to the sampler
- Region of Interestpublic final float min(ROI r)
r
- Region of Interest
public final float max(ROI r)
r
- Region of Interest
public final RealSignal add(float v, ROI r)
v
- value to be added to the samplesr
- Region of Interest
public final RealSignal subtract(float v, ROI r)
v
- value to be added to the samplesr
- Region of Interest
public final RealSignal multiply(float v, ROI r)
v
- value to be added to the samplesr
- Region of Interest
public final RealSignal divide(float v, ROI r)
v
- value to be added to the samplesr
- Region of Interest
public final RealSignal subtract(RealSignal s, ROI sourceSignal, ROI destSignal)
s
- the RealSignal to addsourceSignal
- Region of Interest for Source SignaldestSignal
- Region of Interest for Destination Signal
public final RealSignal multiply(RealSignal s, ROI sourceSignal, ROI destSignal)
s
- the RealSignal to subtractsourceSignal
- Region of Interest for Source SignaldestSignal
- Region of Interest for Destination Signal
public final RealSignal divide(RealSignal s, ROI sourceSignal, ROI destSignal)
s
- the RealSignal to multiplysourceSignal
- Region of Interest for Source SignaldestSignal
- Region of Interest for Destination Signal
public final RealSignal add(RealSignal s, ROI sourceSignal, ROI destSignal)
s
- the RealSignal to dividesourceSignal
- Region of Interest for Source SignaldestSignal
- Region of Interest for Destination Signal
public java.lang.String toString(ROI r)
public void byteSize(ROI r)
r
- Region of Interestpublic final void clip(int min, int max, ROI r)
min
- minimum valuemax
- maximum valuer
- Region of Interestpublic void convolve(RealSignal kernel, ROI r)
kernel
- kernel to perform the convolution withr
- Region of Interestpublic void median(int size, ROI r)
size
- the size of the median filterr
- Region of Interest
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |