Class ImageXor

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--ImageXor

public class ImageXor
extends java.lang.Thread

ImageXor is an algorithm to apply logical XOR/XNOR between two images

See Also:
code.iface.imagexor

Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ImageXor(int firstwidth, int secondwidth)
          Constructs a new Image Xor
 
Method Summary
 int[] doXor(int[] src1_1d, int[] src2_1d, boolean XNOR, int width, int height, float oset, float scale)
          Applies the image XOR operator on the specified image arrays, with the specified offset and scale value
 int[] doXor(int[] src1_1d, int constant, boolean XNOR, int width, int height, float oset, float scale)
          XORs the specified input image by the constant, also adds offset
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ImageXor

public ImageXor(int firstwidth,
                int secondwidth)
Constructs a new Image Xor
Parameters:
firstwidth - The width of the iorst input image
secondwidth - The width of the second input image
Method Detail

doXor

public int[] doXor(int[] src1_1d,
                   int[] src2_1d,
                   boolean XNOR,
                   int width,
                   int height,
                   float oset,
                   float scale)
Applies the image XOR operator on the specified image arrays, with the specified offset and scale value
Parameters:
src1_1d - The first source image as a pixel array
src2_1d - The second source image as a pixel array
XNOR - Boolean to indicate wether we should XNOR rather than XOR
width - width of the destination image in pixels
height - height of the destination image in pixels
oset - The offset value
scale - The scale value
Returns:
A pixel array containing the X(N)OR of the two input images

doXor

public int[] doXor(int[] src1_1d,
                   int constant,
                   boolean XNOR,
                   int width,
                   int height,
                   float oset,
                   float scale)
XORs the specified input image by the constant, also adds offset
Parameters:
src1_1d - The input pixel array
constant - The constant value to AND every pixel in the input array by
XNOR - Boolean to indicate wether we should XNOR rather than XOR
width - width of the destination image in pixels
height - height of the destination image in pixels
oset - The offset value
scale - The scale value
Returns:
A pixel array with the constant value X(N)ORed with every pixel in the input array