SoTranslateProcessing engine More...
#include <ImageViz/Engines/GeometryAndMatching/GeometricTransforms/SoTranslateProcessing.h>
Public Types | |
enum | BackgroundMode { FIXED_BACKGROUND = 0, LOOPED_BACKGROUND = 1 } |
Public Member Functions | |
SoTranslateProcessing () | |
Public Attributes | |
SoSFEnum | computeMode |
SoSFImageDataAdapter | inImage |
SoSFVec3i32 | translationVector |
SoSFEnum | backgroundMode |
SoSFFloat | backgroundValue |
SoImageVizEngineOutput < SoSFImageDataAdapter, SoImageDataAdapter * > | outImage |
The SoTranslateProcessing engine re-assigns the position of the image on the grid according to user-defined vectors. During a translation, there are usually two phenomena: part of the image is out of the window, while another part has no values, as illustrated in Figure 1.
Figure 1: Translation of an image
A translation is denoted by a vector . A pixel M of coordinates is translated to the new coordinates in the output image as:
or using matrix notation:
The output image is a discrete space of finite dimension where the new coordinates x, y and z may be outside the image.
NOTE: In 2D mode, z component is neglected.
computeMode | MODE_AUTO |
inImage | NULL |
translationVector | 100 100 100 |
backgroundMode | FIXED_BACKGROUND |
backgroundValue | 0.0f |
There are two possible modes in a SoTranslateProcessing filter:.
SoTranslateProcessing::SoTranslateProcessing | ( | ) |
Constructor.
The translation mode.
Use enum BackgroundMode. Default is FIXED_BACKGROUND
Background value.
Default value is 0.0f.
Select the compute Mode (2D or 3D or AUTO) Use enum ComputeMode.
Default is MODE_AUTO
The 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 translation vector.
Default value is SbVec3i32(100,100,100).