|
JIGL v1.6 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--jigl.signal.BinarySignal
BinarySignal is a 1-d array of byte. All the values in a BinarySignal are always either 1 or 0.
| Field Summary | |
protected byte[] |
data
One dimensional byte array |
protected int |
length
Cartesian width |
| Constructor Summary | |
BinarySignal()
Creates an empty one dimensional BinarySignal with a length of zero |
|
BinarySignal(BinarySignal img)
Creates a one dimensional BinarySignal (shallow copy) from BinarySignal img |
|
BinarySignal(DiscreteSignal img)
Creates a one dimensional BinarySignal from a DiscreteSignal. |
|
BinarySignal(int x)
Creates a one dimensional BinarySignal with a length of x |
|
BinarySignal(int x,
byte[] dat)
Creates a one dimensional BinarySignal with a length of x from array dat. |
|
BinarySignal(RealSignal img)
Creates a one dimensional BinarySignal from a RealSignal. |
|
| Method Summary | |
BinarySignal |
compliment()
Returns the complement signal of this signal |
Signal |
copy()
Makes a deep copy of this Signal |
int |
count()
Counts the number of "on" pixels |
BinarySignal |
difference(BinarySignal signal)
Returns the difference of this signal and a BinarySignal |
byte |
get(int x)
Returns the pixel value at the given x value |
BinarySignal |
intersection(BinarySignal signal)
Finds the intersection between this image and another BinarySignal |
int |
length()
Returns the width (maximum length value) |
void |
set(int x,
int value)
Sets the pixel value at x to a given value |
BinarySignal |
shift(int horizontal)
Performs a shift on this image. |
BinarySignal |
union(BinarySignal signal)
Finds the union between this signal and another BinarySignal |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface jigl.signal.Signal |
toString |
| Field Detail |
protected byte[] data
protected int length
| Constructor Detail |
public BinarySignal()
public BinarySignal(int x)
public BinarySignal(int x,
byte[] dat)
dat. If dat[k]>0,the value of the signal is set as 1. Otherwise
the value is set to 0.
x - width of imagedat - one dimensional array of short. The array is length x.public BinarySignal(DiscreteSignal img)
public BinarySignal(RealSignal img)
public BinarySignal(BinarySignal img)
| Method Detail |
public Signal copy()
copy in interface Signalpublic final int length()
length in interface Signalpublic final byte get(int x)
x - the length coordinate
public final void set(int x,
int value)
x - the length coordinatevalue - the value to set the pixel topublic final BinarySignal union(BinarySignal signal)
public final BinarySignal intersection(BinarySignal signal)
public final BinarySignal compliment()
public final int count()
public final BinarySignal difference(BinarySignal signal)
public final BinarySignal shift(int horizontal)
horizontal - for right shift if horizontal is positive and for left if it is negative
|
JIGL v1.6 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||