SoArithmeticImageProcessing Class Reference
[Arithmetic Operations]

ImageViz SoArithmeticImageProcessing engine performs an arithmetic operation between two images. More...

#include <ImageViz/Engines/ArithmeticAndLogic/ArithmeticOperations/SoArithmeticImageProcessing.h>

Inheritance diagram for SoArithmeticImageProcessing:
SoImageVizEngine SoEngine SoFieldContainer SoBase SoRefCounter SoTypedObject

List of all members.

Public Types

enum  ArithmeticOperator {
  ADD = 0,
  SUBTRACT = 1,
  MULTIPLY = 2,
  DIVIDE = 3,
  MINIMUM = 4,
  MAXIMUM = 5
}

Public Member Functions

 SoArithmeticImageProcessing ()

Public Attributes

SoSFEnum arithmeticOperator
SoSFImageDataAdapter inImage1
SoSFImageDataAdapter inImage2
SoImageVizEngineOutput
< SoSFImageDataAdapter,
SoImageDataAdapter * > 
outImage

Detailed Description

ImageViz SoArithmeticImageProcessing engine performs an arithmetic operation between two images.

SoArithmeticImageFiltering performs an arithmetic operation between an image and another image.

SEE ALSO

SoArithmeticValueProcessing, SoLogicalImageProcessing, SoAbsoluteValueProcessing.

FILE FORMAT/DEFAULT


Library references: addimage divideimage maximumimage minimumimage multiplyimage subtractimage


Member Enumeration Documentation

Enumerator:
ADD 

The ADD arithmetic operator adds two images $I_1$ and $I_2$.

The formula is:

$O(n,m)=I_1(n,m)+I_2(n,m)$
Remarks:

  • Overflows may occur.
  • Be careful with negative values and the way they are visualized.

See also: SoArithmeticValueProcessing, SoLogicalImageProcessing, SoAbsoluteImageProcessing.

SUBTRACT 

The SUBTRACT arithmetic operator subtract an image $I_2$ from $I_1$.

The formula is:

$O(n,m)=I_1(n,m)-I_2(n,m)$
Remarks:

  • Overflows may occur.
  • The result of a subtraction between two binary images is a short integer image; this operation is not equivalent to a logical difference.
  • Be careful with negative values and the way they are visualized.
MULTIPLY 

The MULTIPLY arithmetic operator multiplies an image $I_1$ by another $I_2$.

The formula is:

$O(n,m)=I_1(n,m) \times I_2(n,m)$
Remarks:

  • Overflows may occur.
  • Be careful with negative values and the way they are visualized.
  • Multiplying a binary image by a grayscale image is equivalent to a masking operation.
DIVIDE 

The DIVIDE arithmetic operator divides an image $I_1$ by another $I_2$.

The formula is:

$O(n,m)=I_1(n,m)\div I_2(n,m)$
Remarks:

  • Overflows may occur.
  • Be careful with negative values and the way they are visualized.
  • If $I_2(n,m)=0$ then $O(n,m)=I_1(n,m)$
MINIMUM 

The MINIMUM arithmetic operator computes the minimum value between two images $I_1$ and $I_2$.

The formula is: $O(n,m)=\min\left\{I_1(n,m),I_2(n,m)\right\}$

For binary images, the MINIMUM operator is equivalent to a logical AND.

\[ \begin{array}{|c|c|c|} \hline I_1 & I_2 & I_1 ~ \Lambda ~ I_2\\ \hline 1 & 1 & 1 \\ 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 0 \\ \hline \end{array} \]

MAXIMUM 

The MAXIMUM arithmetic operator computes the maximum value between two images $I_1$ and $I_2$.

The formula is: $O(n,m)=\max\left\{I_1(n,m),I_2(n,m)\right\}$

For binary images, the MAXIMUM operator is equivalent to a logical OR.

\[ \begin{array}{|c|c|c|} \hline I_1 & I_2 & I_1 ~ \Delta ~ I_2\\ \hline 1 & 1 & 1 \\ 1 & 0 & 1 \\ 0 & 1 & 1 \\ 0 & 0 & 0 \\ \hline \end{array} \]


Constructor & Destructor Documentation

SoArithmeticImageProcessing::SoArithmeticImageProcessing (  ) 

Constructor.


Member Data Documentation

Select operator to apply.

Use enum ArithmeticOperator. Default is ADD

The 1st input image.

Default value is NULL. Supported types include: grayscale binary label color image.

The 2nd input image.

Default value is NULL. Supported types include: grayscale binary label color image.

The output image.

Default value is NULL. Supported types include: grayscale binary label color image.


The documentation for this class was generated from the following file:

Open Inventor Toolkit reference manual, generated on 12 Sep 2022
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/