public class MTBImageArithmetics extends Object
ImageArithmetics
class.
Operations with one input image result in images of the same type!!
Operations with two input images result in an image of type of the higher input image precision!!
If two input images do not have the same size the resulting image is null.
Each operation is elementwise.Modifier and Type | Field and Description |
---|---|
private MTBOperator |
callingOperator |
Constructor and Description |
---|
MTBImageArithmetics()
Constructor.
|
MTBImageArithmetics(MTBOperator callingOperator)
Constructor with calling operator.
|
Modifier and Type | Method and Description |
---|---|
MTBImage |
abs(MTBImage img)
Absolute values of the image elements.
|
MTBImage |
absDiff(MTBImage img1,
MTBImage img2)
Absolute difference of two images.
|
MTBImage |
add(MTBImage img,
double constant)
Add a constant to each image value
|
MTBImage |
add(MTBImage img1,
MTBImage img2)
Add the elements two images
|
MTBImage |
and(MTBImage img1,
MTBImage img2)
Bitwise logical AND of two images.
|
MTBImage |
div(MTBImage img1,
MTBImage img2)
Divide the elements of two images (img1/img2)
|
MTBImage |
inv(MTBImage img)
Invert the image.
|
MTBImage |
max(MTBImage img1,
MTBImage img2)
Pixelwise maximum
|
MTBImage |
min(MTBImage img1,
MTBImage img2)
Pixelwise minimum
|
MTBImage |
mult(MTBImage img,
double constant)
Multiply each image value by a constant
|
MTBImage |
mult(MTBImage img1,
MTBImage img2)
Multiply the elements of two images
|
MTBImage |
or(MTBImage img1,
MTBImage img2)
Bitwise logical OR of two images.
|
MTBImage |
pow(MTBImage img,
double exponent)
Raise image values to the power of 'exponent'
|
private MTBImage |
runOperation(MTBOperator callingOperator,
ImageArithmetics.ArithOp op,
MTBImage img,
double constant)
Run an operation with one input image and one input constant
|
private MTBImage |
runOperation(MTBOperator callingOperator,
ImageArithmetics.ArithOp op,
MTBImage img1,
MTBImage img2)
Run an operation with two input images
|
MTBImage |
sub(MTBImage img1,
MTBImage img2)
Subtract the elements two images (img1 - img2)
|
private MTBOperator callingOperator
public MTBImageArithmetics() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public MTBImageArithmetics(MTBOperator callingOperator) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public MTBImage pow(MTBImage img, double exponent)
img
- input imageexponent
- public MTBImage add(MTBImage img, double constant)
img
- input imageconstant
- public MTBImage mult(MTBImage img, double constant)
img
- input imageconstant
- public MTBImage inv(MTBImage img)
img
- input imagepublic MTBImage abs(MTBImage img)
img
- input imagepublic MTBImage add(MTBImage img1, MTBImage img2)
img1
- img2
- public MTBImage sub(MTBImage img1, MTBImage img2)
img1
- img2
- public MTBImage mult(MTBImage img1, MTBImage img2)
img1
- img2
- public MTBImage div(MTBImage img1, MTBImage img2)
img1
- img2
- public MTBImage min(MTBImage img1, MTBImage img2)
img1
- img2
- public MTBImage max(MTBImage img1, MTBImage img2)
img1
- img2
- public MTBImage and(MTBImage img1, MTBImage img2)
img1
- First input image.img2
- Second input image.public MTBImage or(MTBImage img1, MTBImage img2)
img1
- First input image.img2
- Second input image.public MTBImage absDiff(MTBImage img1, MTBImage img2)
img1
- First input image.img2
- Second input image.private MTBImage runOperation(MTBOperator callingOperator, ImageArithmetics.ArithOp op, MTBImage img, double constant)
op
- img
- constant
- private MTBImage runOperation(MTBOperator callingOperator, ImageArithmetics.ArithOp op, MTBImage img1, MTBImage img2)
callingOperator
- op
- img
- constant
- Copyright © 2010–2020 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.