Class SoMorphoLut2D

  • All Implemented Interfaces:

    public class SoMorphoLut2D
    extends SoFieldContainer
    As of Open Inventor 2023.2. ImageViz API is replaced by the new ImageDev toolkit.
    Class that represents a morphological look-up table (LUT). Class that represents a 2D morphological look-up table (LUT).

    SoFieldContainer, SbKernel2i32

    • Constructor Detail

      • SoMorphoLut2D

        public SoMorphoLut2D()
        Default constructor.
    • Method Detail

      • insertKernel

        public void insertKernel​(SbKernel2i32 kernel2d,
                                 SoMorphoLut2D.InsertModes insertMode,
                                 int kernelRotation)
        Inserts a kernel into the LUT. 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:
        • 0: pixel is off
        • 1: pixel is on
        • 2: pixel is ignored
        insertMode The insertion mode of the kernel. See SoMorphoLut2D.InsertMode. 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.

      • getKernel

        public SbKernel2i32 getKernel​(int indexKernel)
        Returns the specified kernel.

        indexKernel - index of the kernel (cannot exceed registered number of kernels).
      • getNumKernels

        public long getNumKernels()
        Return the number of kernels registered in the LUT.