|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbitmaps.PixelPair
bitmaps.DEPixelPair
public class DEPixelPair
A black and white (single byte) pixel pair bitmaps (considers only the red component of the color pixel objects), with functionality for working with difference expansion embedding.
| Field Summary | |
|---|---|
private int |
avg
|
private int |
changeable
|
private int |
diff
|
private int |
expandable
|
| Fields inherited from class bitmaps.PixelPair |
|---|
a, b |
| Constructor Summary | |
|---|---|
DEPixelPair(PixelPair pair)
Creates a new DE pixel pair from the specified PixelPair, performing a deep clone. |
|
DEPixelPair(Pixel a,
Pixel b)
Creates a new pixel pair from the two specified pixels. |
|
| Method Summary | |
|---|---|
void |
contract()
Contracts the current PixelPair, reducing its difference value to the floor of half its current value, and updating the pixel values accordingly. |
boolean |
differenceLSB()
Returns true if this pixel pair's difference value's LSB is 1, false if it is zero. |
boolean |
embed(boolean b)
Embeds the specified value in the LSB of the difference value, updating the pixel values accordingly. |
void |
expand(boolean b)
Expands the current PixelPair, increasing its difference value and updating the pixel values accordingly. |
int |
getAvg()
Returns the (floored) average value of the two pixels |
int |
getDiff()
Returns the difference between the two pixels. |
boolean |
isChangeable()
Returns true if the difference value for this pair is changeable. |
boolean |
isDiffWithinThreshold(int threshold)
Returns true if the current pair would be selected using the given threshold. |
boolean |
isExpandable()
Returns true if the pair is difference expandable, false otherwise |
boolean |
isExpansionDeterminable(int threshold)
Indicates whether it can be known for certain that the current pixel either was or was not the result of an expansion. |
boolean |
isExpansionGuaranteed()
|
boolean |
needsDiffLSBStorage()
Deprecated. |
boolean |
restoreWithoutLSB()
Deprecated. |
private void |
updatePixels()
Updates the pixel values after a change to the difference or average values. |
boolean |
wasDefinitelyExpanded(int threshold)
Indicates whether it can be known for certain that the current pixel was the result of an expansion (not an embedding) when the original criteria specified the given difference threshold. |
boolean |
wasDefinitelyNotExpanded(int threshold)
Indicates whether it can be known for certain that the current pixel was not the result of an expansion (such that either the pair is not changeable or an embedding occurred instead) when the original criteria specified the given difference threshold. |
boolean |
willBeKnownDefinitelyExpanded(int threshold)
Indicates whether, after expansion, the current pair will be known to have been definitely expanded, simply by considering the threshold and resulting difference value. |
boolean |
willBeKnownDefinitelyNotExpanded(int threshold)
Indicates whether, after embedding, the current pair will be known to have been definitely not expanded, simply by considering the threshold and resulting difference value. |
| Methods inherited from class bitmaps.PixelPair |
|---|
floorDiv, getA, getB |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private int diff
private int avg
private int changeable
private int expandable
| Constructor Detail |
|---|
public DEPixelPair(Pixel a,
Pixel b)
a - b - public DEPixelPair(PixelPair pair)
pair - | Method Detail |
|---|
public void expand(boolean b)
b - public void contract()
public boolean embed(boolean b)
b - public boolean isExpandable()
public boolean isChangeable()
public boolean isExpansionGuaranteed()
public boolean isDiffWithinThreshold(int threshold)
threshold -
public boolean wasDefinitelyExpanded(int threshold)
threshold -
public boolean willBeKnownDefinitelyExpanded(int threshold)
threshold -
public boolean willBeKnownDefinitelyNotExpanded(int threshold)
wasDefinitelyNotExpanded(int), since the
logic is the same for both.
Like wasDefinitelyNotExpanded, returns true if the pair is not
changeable.
Not cached.
threshold -
public boolean wasDefinitelyNotExpanded(int threshold)
threshold -
public boolean isExpansionDeterminable(int threshold)
wasDefinitelyExpanded(int) and
wasDefinitelyNotExpanded(int).
Not cached.
threshold -
public boolean needsDiffLSBStorage()
public boolean restoreWithoutLSB()
private void updatePixels()
public boolean differenceLSB()
public int getAvg()
public int getDiff()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||