|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectno.hiof.imagepr.tools.Arithmetic
Arithmetic is a class for enhancement of images using arithmetic and logic operations.
The Arithemtic class contains methods for performing the logic operations (AND and OR) and arithmetic operations (substraction, addition and multiplication) between two images, and methods for performing the logical operation NOT on separate images.
Field Summary | |
static int |
ABS
Option for changing negative pixel values to their absolute value. |
static int |
CUT_LOWER
Option for changing negative pixel values to zero |
static int |
CUT_UPPER
Option for changing pixel values above 255 to 255 |
static int |
DONT_SCALE
Option for no scaling |
static int |
SCALE_MAX
Option for multiplying each pixel in the image by the quantity 255/Max, where Max is the maximum pixel value in the image. |
static int |
SUB_MIN
Option for substracting the minimum pixel value in the image from all pixels in the image. |
static int |
WRAP_UPPER
Option for changing pixel values (p) above 255 to 2*255 -p |
Constructor Summary | |
Arithmetic()
Constructs an Arithmetic-object. |
|
Arithmetic(int option)
Constructs an Arithmetic-object with a spesific scaling-option. |
Method Summary | |
IntensityImage |
add(IntensityImage im1,
IntensityImage im2)
Computes the sum of two IntensityImages on a pixel-by-pixel basis. |
IntensityImage |
add(IntensityImage image,
short c)
Adds a value to each pixel of an IntensityImage. |
short[][] |
add(short[][] matrix1,
short c)
Adds a value to each element of a short matrix. |
short[][] |
add(short[][] matrix1,
short[][] matrix2)
Computes the sum of two IntensityImages on a pixel-by-pixel basis. |
BinaryImage |
and(BinaryImage im1,
BinaryImage im2)
Performs the logical operator AND between two BinaryImages. |
IntensityImage |
and(IntensityImage im1,
BinaryImage im2)
Performs the logical operator AND between an IntensityImage and a BinaryImage. |
IntensityImage |
and(IntensityImage im1,
IntensityImage im2)
Performs the logical operator AND between an two IntensityImages The two images must be of equal size. |
short[][] |
and(short[][] matrix1,
short[][] matrix2)
Performs the logical operator AND between two short matrices. |
BinaryImage |
andNot(BinaryImage im1,
BinaryImage im2)
Takes the and operation between a binary image and of the inversion of another binary image. |
short |
findMaximum(short[][] matrix)
Find the maximum of the elements in a short matrix. |
short |
findMinimum(short[][] matrix)
Find the minimum of the elements in a short matrix. |
IntensityImage |
multiply(IntensityImage im,
int c)
Multiplies each pixel value in an IntensityImage with a constant value. |
IntensityImage |
multiply(IntensityImage im1,
IntensityImage im2)
Multiplies two IntensityImages on a pixel-by-pixel basis. |
short[][] |
multiply(short[][] matrix,
int c)
Multiplies each element of a short matrix with a constant value. |
short[][] |
multiply(short[][] matrix1,
short[][] matrix2)
Multiplies two short matrices on a pixel-by-pixel basis. |
BinaryImage |
not(BinaryImage im)
Performs the logical operator NOT on a BinaryImage. |
IntensityImage |
not(IntensityImage im)
Performs the logical operator NOT on an IntensityImage. |
short[][] |
not(short[][] matrix)
Performs the logical operator NOT on a short matrix. |
BinaryImage |
or(BinaryImage im1,
BinaryImage im2)
Performs the logical operator OR between two BinaryImages. |
IntensityImage |
or(IntensityImage im1,
BinaryImage im2)
Performs the logical operator OR between an IntensityImage and a BinaryImage. |
IntensityImage |
or(IntensityImage im1,
IntensityImage im2)
Performs the logical operator OR between two IntensityImages. |
short[][] |
or(short[][] matrix1,
short[][] matrix2)
Performs the logical operator OR between an IntensityImage and a BinaryImage. |
void |
scale(short[][] matrix)
Scales a matrix of image data. |
IntensityImage |
subtract(IntensityImage im1,
IntensityImage im2)
Computes the difference of two IntensityImages on a pixel-by-pixel basis. |
short[][] |
subtract(short[][] matrix1,
short[][] matrix2)
Computes the difference of two short matrices on a element by element basis. |
BinaryImage |
xor(BinaryImage im1,
BinaryImage im2)
Takes the xor operation between to binary images. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int DONT_SCALE
public static final int CUT_LOWER
public static final int CUT_UPPER
public static final int ABS
public static final int WRAP_UPPER
public static final int SUB_MIN
public static final int SCALE_MAX
Constructor Detail |
public Arithmetic()
public Arithmetic(int option)
option
- Option for scaling. Possible values: DONT_SCALE,
CUT_LOWER, CUT_UPPER, ABS, WRAP_UPPER, SUB_MIN AND SCALE_MAX. If
more than one scaling method is wanted, the sum of two or more
of these values should be used.Method Detail |
public BinaryImage not(BinaryImage im)
im
- The BinaryImage.
public IntensityImage not(IntensityImage im)
im
- The IntensityImage.
public short[][] not(short[][] matrix)
matrix
- The short matrix.
public BinaryImage and(BinaryImage im1, BinaryImage im2)
im1
- A BinaryImage.im2
- Another BinaryImage.
public IntensityImage and(IntensityImage im1, BinaryImage im2)
im1
- The intensityImageim2
- The BinaryImage
public IntensityImage and(IntensityImage im1, IntensityImage im2)
im1
- An IntensityImage.im2
- Another IntensityImage.
public short[][] and(short[][] matrix1, short[][] matrix2)
matrix1
- A short matrix.matrix2
- Another short matrix.public BinaryImage or(BinaryImage im1, BinaryImage im2)
im1
- A BinaryImage.im2
- Another BinaryImage.
public IntensityImage or(IntensityImage im1, BinaryImage im2)
im1
- The intensityImageim2
- The BinaryImage
public IntensityImage or(IntensityImage im1, IntensityImage im2)
im1
- An IntensityImage.im2
- Another IntensityImage.
public short[][] or(short[][] matrix1, short[][] matrix2)
matrix1
- The intensityImagematrix2
- The BinaryImage
public IntensityImage add(IntensityImage im1, IntensityImage im2)
im1
- An IntensityImageim2
- Another IntensityImage
public short[][] add(short[][] matrix1, short[][] matrix2)
matrix1
- A matrixmatrix2
- Another matrix
public IntensityImage add(IntensityImage image, short c)
image
- An IntensityImage.c
- The value that is added to the image.
public short[][] add(short[][] matrix1, short c)
matrix1
- A matrixc
- The value that is added to the image.
public IntensityImage multiply(IntensityImage im, int c)
im
- The IntensityImagec
- The constant.
public short[][] multiply(short[][] matrix, int c)
matrix
- The matrix.c
- The constant.
public IntensityImage multiply(IntensityImage im1, IntensityImage im2)
im1
- An IntensityImageim2
- Another IntensityImage
public short[][] multiply(short[][] matrix1, short[][] matrix2)
matrix1
- A short matrixmatrix2
- Another short matrix
public BinaryImage andNot(BinaryImage im1, BinaryImage im2)
im1
- A binary image.im2
- A binary image specifying which pixels should be set to zero.
public BinaryImage xor(BinaryImage im1, BinaryImage im2)
im1
- A binary image.im2
- Another binary image.
public IntensityImage subtract(IntensityImage im1, IntensityImage im2)
im1
- An IntensityImageim2
- Another IntensityImage
public short[][] subtract(short[][] matrix1, short[][] matrix2)
matrix1
- A short matrix.matrix2
- Another short matrix.
public void scale(short[][] matrix)
matrix
- The matrix containing the image data.public short findMinimum(short[][] matrix)
matrix
- A matrix.
public short findMaximum(short[][] matrix)
matrix
- A matrix.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |