|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.dcm4chee.imagetest.ImageDiff
public class ImageDiff
Performs a different on two images. Optionally writes the differenced (second) image out, and writes out information about the differences.
Field Summary | |
---|---|
static boolean |
writeDiff
|
static boolean |
writeImage
|
static boolean |
writeInfo
|
Constructor Summary | |
---|---|
ImageDiff(java.awt.image.BufferedImage i1,
java.awt.image.BufferedImage i2,
java.lang.String fileBase,
long allowedDiff)
Compares two images, i1 and i2, writing information out to fileBase about the differences. |
Method Summary | |
---|---|
protected int |
colourDiff(int c1,
int c2)
Returns the difference in the colour component |
protected int |
colourDiffPixel(int c1,
int c2)
Returns a pixel representing the difference in the colour component |
protected void |
computeDiffs(java.awt.image.BufferedImage i1,
java.awt.image.BufferedImage i2,
java.awt.image.BufferedImage i3)
|
long |
getMaxDiff()
|
long |
getPixelCount()
|
long |
getSumDifference()
|
long |
getSumSqrDifference()
|
protected int |
grayDiffPixel(int diff)
Returns a gray pixel diff |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static boolean writeImage
public static boolean writeDiff
public static boolean writeInfo
Constructor Detail |
---|
public ImageDiff(java.awt.image.BufferedImage i1, java.awt.image.BufferedImage i2, java.lang.String fileBase, long allowedDiff) throws java.io.IOException
i1
- - this is typically the "correct" image.i2
- - this is typically the image you are testing.fileBase
- - this is the location to use for saving filesallowedDiff
- - this is the amount of difference, per pixel that is allowed.
java.io.IOException
Method Detail |
---|
protected void computeDiffs(java.awt.image.BufferedImage i1, java.awt.image.BufferedImage i2, java.awt.image.BufferedImage i3)
protected int colourDiff(int c1, int c2)
protected int colourDiffPixel(int c1, int c2)
protected int grayDiffPixel(int diff)
public long getMaxDiff()
public long getPixelCount()
public long getSumDifference()
public long getSumSqrDifference()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |