Class that represents a morphological look-up table (LUT). More...
#include <ImageViz/Nodes/Luts/SoMorphoLut2D.h>
Public Types | |
enum | InsertMode { INSERT_NEW, INSERT_OR } |
Public Member Functions | |
virtual SoType | getTypeId () const |
SoMorphoLut2D () | |
void | insertKernel (SbKernel2i32 kernel2d, InsertMode insertMode, unsigned int kernelRotation) |
size_t | getNumKernels () const |
SbKernel2i32 | getKernel (int indexKernel) const |
Static Public Member Functions | |
static SoType | getClassTypeId () |
Class that represents a 2D morphological look-up table (LUT).
[C++] This is a reference counted object, similar to a node. It can only be destroyed by incrementing and decrementing the reference count. The initial reference count is 0. You may use the ref() and unref() methods or the SoRef "smart pointer" template.
SoFieldContainer, SbKernel2i32
SoMorphoLut2D::SoMorphoLut2D | ( | ) |
Default constructor.
static SoType SoMorphoLut2D::getClassTypeId | ( | ) | [static] |
Returns the type identifier for this class.
Reimplemented from SoFieldContainer.
SbKernel2i32 SoMorphoLut2D::getKernel | ( | int | indexKernel | ) | const |
Returns the specified kernel.
indexKernel | index of the kernel (cannot exceed registered number of kernels). |
size_t SoMorphoLut2D::getNumKernels | ( | ) | const |
Return the number of kernels registered in the LUT.
virtual SoType SoMorphoLut2D::getTypeId | ( | ) | const [virtual] |
Returns the type identifier for this specific instance.
Implements SoTypedObject.
void SoMorphoLut2D::insertKernel | ( | SbKernel2i32 | kernel2d, | |
InsertMode | insertMode, | |||
unsigned int | kernelRotation | |||
) |
Inserts a kernel into the LUT.
[in] | kernel2d | The kernel to add. A 2D-kernel should contain exactly 9 values and indexes matching the following table.
Accepted values for the kernel are:
|
[in] | insertMode | The insertion mode of the kernel. See SoMorphoLut2D::InsertMode. |
[in] | kernelRotation | Rotation applied to the kernel before insertion. Value should be between 0 (no rotation) and 7. Rotation is counter-clockwise. |
As an example, if kernelRotation = 1, the resulting kernel inserted is:
An SbException is thrown if the size of the kernel is not 3x3.