Class SoMorphoLut2D

    • 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.

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

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