SoMorphoLut2D Class Reference
[Luts]

ImageViz Class that represents a morphological look-up table (LUT). More...

#include <ImageViz/Nodes/Luts/SoMorphoLut2D.h>

Inheritance diagram for SoMorphoLut2D:
SoFieldContainer SoBase SoRefCounter SoTypedObject

List of all members.

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 ()

Detailed Description

ImageViz Class that represents a morphological look-up table (LUT).

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.

SEE ALSO

SoFieldContainer, SbKernel2i32


Member Enumeration Documentation

Enumerator:
INSERT_NEW 

Reset the LUT (clear all kernels) before insertion.

Should be used for the first insertion.

INSERT_OR 

Append to the list of kernels.


Constructor & Destructor Documentation

SoMorphoLut2D::SoMorphoLut2D (  ) 

Default constructor.


Member Function Documentation

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.

Parameters:
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.

Parameters:
[in] kernel2d The kernel to add. A 2D-kernel should contain exactly 9 values and indexes matching the following table.

\[ \begin{tabular}{|c|c|c|} \hline 0 & 1 & 2 \\ \hline 3 & 4 & 5 \\ \hline 6 & 7 & 8 \\ \hline \end{tabular} \]

Accepted values for the kernel are:

  • 0: pixel is off
  • 1: pixel is on
  • 2: pixel is ignored
[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:

\[ \begin{tabular}{|c|c|c|} \hline 1 & 2 & 5 \\ \hline 0 & 4 & 8 \\ \hline 3 & 6 & 7 \\ \hline \end{tabular} \]

An SbException is thrown if the size of the kernel is not 3x3.


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

Open Inventor Toolkit reference manual, generated on 4 Sep 2023
Copyright © Thermo Fisher Scientific All rights reserved.
https://www.openinventor.com/