java.lang.Object
imagingbook.common.image.ImageMath
This class defines static methods for non-destructive, arithmetic operations on ImageJ's
ImageProcessor
objects. Unlike the built-in ImageProcessor methods, the methods below always return new images (of the same
type) and keep the original images unmodified.- Version:
- 2013/08/23: static methods converted to use generics.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends ImageProcessor>
Tabs(T ip) Calculates the absolute pixel values of the specified image and returns a new image of the same type.static <T extends ImageProcessor>
Tadd(T ip1, T ip2) Adds the pixel values of the specified images and returns a new image of the same type as the first image.static <T extends ImageProcessor>
Tmult(T ip1, T ip2) Multiplies the pixel values of the specified images and returns a new image of the same type as the first image.static <T extends ImageProcessor>
Tsqr(T ip) Calculates the squared pixel values of the specified image and returns a new image of the same type.static <T extends ImageProcessor>
Tsqrt(T ip) Calculates the square root of the pixel values of the specified image and returns a new image of the same type.
-
Method Details
-
abs
Calculates the absolute pixel values of the specified image and returns a new image of the same type.- Type Parameters:
T- the type ofImageProcessor- Parameters:
ip- the input image- Returns:
- the resulting image
-
sqr
Calculates the squared pixel values of the specified image and returns a new image of the same type.- Type Parameters:
T- the type ofImageProcessor- Parameters:
ip- the input image- Returns:
- the resulting image
-
sqrt
Calculates the square root of the pixel values of the specified image and returns a new image of the same type.- Type Parameters:
T- the type ofImageProcessor- Parameters:
ip- the input image- Returns:
- the resulting image
-
add
Adds the pixel values of the specified images and returns a new image of the same type as the first image.- Type Parameters:
T- the type ofImageProcessor- Parameters:
ip1- first input imageip2- second input image- Returns:
- the resulting image
-
mult
Multiplies the pixel values of the specified images and returns a new image of the same type as the first image.- Type Parameters:
T- the type ofImageProcessor- Parameters:
ip1- first input imageip2- second input image- Returns:
- the resulting image
-