|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
Provides static methods for voxel-wise arithmetic operations on images. More...
#include <mitkArithmeticOperation.h>
Static Public Member Functions | |
Two-Image Arithmetic Operations | |
Perform voxel-wise arithmetic between two images. Both images must have the same dimensionality. | |
| static Image::Pointer | Add (Image::Pointer &imageA, Image::Pointer &imageB, bool outputAsDouble=true) |
| Voxel-wise addition of two images: result = imageA + imageB. More... | |
| static Image::Pointer | Subtract (Image::Pointer &imageA, Image::Pointer &imageB, bool outputAsDouble=true) |
| Voxel-wise subtraction of two images: result = imageA - imageB. More... | |
| static Image::Pointer | Multiply (Image::Pointer &imageA, Image::Pointer &imageB, bool outputAsDouble=true) |
| Voxel-wise multiplication of two images: result = imageA * imageB. More... | |
| static Image::Pointer | Divide (Image::Pointer &imageA, Image::Pointer &imageB, bool outputAsDouble=true) |
| Voxel-wise division of two images: result = imageA / imageB. More... | |
Image-Scalar Arithmetic Operations | |
Perform voxel-wise arithmetic between an image and a scalar value. The scalar is applied to each voxel: result(x) = imageA(x) op value. | |
| static Image::Pointer | Add (Image::Pointer &imageA, double value, bool outputAsDouble=true) |
| Add a scalar value to each voxel: result = imageA + value. More... | |
| static Image::Pointer | Subtract (Image::Pointer &imageA, double value, bool outputAsDouble=true) |
| Subtract a scalar value from each voxel: result = imageA - value. More... | |
| static Image::Pointer | Multiply (Image::Pointer &imageA, double value, bool outputAsDouble=true) |
| Multiply each voxel by a scalar value: result = imageA * value. More... | |
| static Image::Pointer | Divide (Image::Pointer &imageA, double value, bool outputAsDouble=true) |
| Divide each voxel by a scalar value: result = imageA / value. More... | |
Scalar-Image Arithmetic Operations | |
Perform voxel-wise arithmetic with a scalar on the left side: result(x) = value op imageB(x). The order matters for subtraction and division. | |
| static Image::Pointer | Add (double value, Image::Pointer &imageB, bool outputAsDouble=true) |
| Add a scalar value to each voxel (commutative): result = value + imageB. More... | |
| static Image::Pointer | Subtract (double value, Image::Pointer &imageB, bool outputAsDouble=true) |
| Subtract each voxel from a scalar: result = value - imageB. More... | |
| static Image::Pointer | Multiply (double value, Image::Pointer &imageB, bool outputAsDouble=true) |
| Multiply a scalar by each voxel (commutative): result = value * imageB. More... | |
| static Image::Pointer | Divide (double value, Image::Pointer &imageB, bool outputAsDouble=true) |
| Divide a scalar by each voxel: result = value / imageB. More... | |
Unary Mathematical Operations | |
Apply a mathematical function to each voxel of the input image. | |
| static Image::Pointer | Tan (Image::Pointer &imageA, bool outputAsDouble=true) |
| Compute the tangent of each voxel: result = tan(imageA). More... | |
| static Image::Pointer | Atan (Image::Pointer &imageA, bool outputAsDouble=true) |
| Compute the arctangent of each voxel: result = atan(imageA). More... | |
| static Image::Pointer | Cos (Image::Pointer &imageA, bool outputAsDouble=true) |
| Compute the cosine of each voxel: result = cos(imageA). More... | |
| static Image::Pointer | Acos (Image::Pointer &imageA, bool outputAsDouble=true) |
| Compute the arccosine of each voxel: result = acos(imageA). More... | |
| static Image::Pointer | Sin (Image::Pointer &imageA, bool outputAsDouble=true) |
| Compute the sine of each voxel: result = sin(imageA). More... | |
| static Image::Pointer | Asin (Image::Pointer &imageA, bool outputAsDouble=true) |
| Compute the arcsine of each voxel: result = asin(imageA). More... | |
| static Image::Pointer | Square (Image::Pointer &imageA, bool outputAsDouble=true) |
| Compute the square of each voxel: result = imageA^2. More... | |
| static Image::Pointer | Sqrt (Image::Pointer &imageA, bool outputAsDouble=true) |
| Compute the square root of each voxel: result = sqrt(imageA). More... | |
| static Image::Pointer | Abs (Image::Pointer &imageA, bool outputAsDouble=true) |
| Compute the absolute value of each voxel: result = |imageA|. More... | |
| static Image::Pointer | Exp (Image::Pointer &imageA, bool outputAsDouble=true) |
| Compute the exponential of each voxel: result = exp(imageA). More... | |
| static Image::Pointer | ExpNeg (Image::Pointer &imageA, bool outputAsDouble=true) |
| Compute the negative exponential of each voxel: result = exp(-imageA). More... | |
| static Image::Pointer | Log10 (Image::Pointer &imageA, bool outputAsDouble=true) |
| Compute the base-10 logarithm of each voxel: result = log10(imageA). More... | |
Provides static methods for voxel-wise arithmetic operations on images.
The ArithmeticOperation class offers a comprehensive set of static methods for performing element-wise arithmetic on mitk::Image objects. Operations include basic arithmetic (add, subtract, multiply, divide) between two images or between an image and a scalar, as well as unary mathematical functions (trigonometric, exponential, logarithmic, etc.).
All operations support an optional flag to produce output with double pixel type. Two-image operations require both images to have the same dimensionality (1D, 2D, 3D, or 4D are supported).
Definition at line 35 of file mitkArithmeticOperation.h.
|
static |
Compute the absolute value of each voxel: result = |imageA|.
| [in] | imageA | The input image. |
| [in] | outputAsDouble | If true, the output image has double pixel type. |
|
static |
Compute the arccosine of each voxel: result = acos(imageA).
| [in] | imageA | The input image. |
| [in] | outputAsDouble | If true, the output image has double pixel type. |
|
static |
Add a scalar value to each voxel (commutative): result = value + imageB.
| [in] | value | The scalar value. |
| [in] | imageB | The input image. |
| [in] | outputAsDouble | If true, the output image has double pixel type. |
|
static |
Add a scalar value to each voxel: result = imageA + value.
| [in] | imageA | The input image. |
| [in] | value | The scalar value to add. |
| [in] | outputAsDouble | If true, the output image has double pixel type. |
|
static |
Voxel-wise addition of two images: result = imageA + imageB.
| [in] | imageA | First input image. |
| [in] | imageB | Second input image (must have same dimensions as imageA). |
| [in] | outputAsDouble | If true, the output image has double pixel type (currently unused in two-image operations). |
| mitk::Exception | if the images have different dimensionalities. |
|
static |
Compute the arcsine of each voxel: result = asin(imageA).
| [in] | imageA | The input image. |
| [in] | outputAsDouble | If true, the output image has double pixel type. |
|
static |
Compute the arctangent of each voxel: result = atan(imageA).
| [in] | imageA | The input image. |
| [in] | outputAsDouble | If true, the output image has double pixel type. |
|
static |
Compute the cosine of each voxel: result = cos(imageA).
| [in] | imageA | The input image. |
| [in] | outputAsDouble | If true, the output image has double pixel type. |
|
static |
Divide a scalar by each voxel: result = value / imageB.
| [in] | value | The scalar numerator. |
| [in] | imageB | The input image (denominator). |
| [in] | outputAsDouble | If true, the output image has double pixel type. |
|
static |
Divide each voxel by a scalar value: result = imageA / value.
| [in] | imageA | The input image. |
| [in] | value | The scalar divisor. |
| [in] | outputAsDouble | If true, the output image has double pixel type. |
|
static |
Voxel-wise division of two images: result = imageA / imageB.
| [in] | imageA | First input image (numerator). |
| [in] | imageB | Second input image (denominator, must have same dimensions as imageA). |
| [in] | outputAsDouble | If true, the output image has double pixel type (currently unused in two-image operations). |
| mitk::Exception | if the images have different dimensionalities. |
|
static |
Compute the exponential of each voxel: result = exp(imageA).
| [in] | imageA | The input image. |
| [in] | outputAsDouble | If true, the output image has double pixel type. |
|
static |
Compute the negative exponential of each voxel: result = exp(-imageA).
| [in] | imageA | The input image. |
| [in] | outputAsDouble | If true, the output image has double pixel type. |
|
static |
Compute the base-10 logarithm of each voxel: result = log10(imageA).
| [in] | imageA | The input image. |
| [in] | outputAsDouble | If true, the output image has double pixel type. |
|
static |
Multiply a scalar by each voxel (commutative): result = value * imageB.
| [in] | value | The scalar multiplier. |
| [in] | imageB | The input image. |
| [in] | outputAsDouble | If true, the output image has double pixel type. |
|
static |
Multiply each voxel by a scalar value: result = imageA * value.
| [in] | imageA | The input image. |
| [in] | value | The scalar multiplier. |
| [in] | outputAsDouble | If true, the output image has double pixel type. |
|
static |
Voxel-wise multiplication of two images: result = imageA * imageB.
| [in] | imageA | First input image. |
| [in] | imageB | Second input image (must have same dimensions as imageA). |
| [in] | outputAsDouble | If true, the output image has double pixel type (currently unused in two-image operations). |
| mitk::Exception | if the images have different dimensionalities. |
|
static |
Compute the sine of each voxel: result = sin(imageA).
| [in] | imageA | The input image. |
| [in] | outputAsDouble | If true, the output image has double pixel type. |
|
static |
Compute the square root of each voxel: result = sqrt(imageA).
| [in] | imageA | The input image. |
| [in] | outputAsDouble | If true, the output image has double pixel type. |
|
static |
Compute the square of each voxel: result = imageA^2.
| [in] | imageA | The input image. |
| [in] | outputAsDouble | If true, the output image has double pixel type. |
|
static |
Subtract each voxel from a scalar: result = value - imageB.
| [in] | value | The scalar value (minuend). |
| [in] | imageB | The input image (subtrahend). |
| [in] | outputAsDouble | If true, the output image has double pixel type. |
|
static |
Subtract a scalar value from each voxel: result = imageA - value.
| [in] | imageA | The input image. |
| [in] | value | The scalar value to subtract. |
| [in] | outputAsDouble | If true, the output image has double pixel type. |
|
static |
Voxel-wise subtraction of two images: result = imageA - imageB.
| [in] | imageA | First input image. |
| [in] | imageB | Second input image (must have same dimensions as imageA). |
| [in] | outputAsDouble | If true, the output image has double pixel type (currently unused in two-image operations). |
| mitk::Exception | if the images have different dimensionalities. |
|
static |
Compute the tangent of each voxel: result = tan(imageA).
| [in] | imageA | The input image. |
| [in] | outputAsDouble | If true, the output image has double pixel type. |