Class SoMorphoLut2D
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.inventor.misc.SoBase
-
- com.openinventor.inventor.fields.SoFieldContainer
-
- com.openinventor.imageviz.nodes.luts.SoMorphoLut2D
-
- All Implemented Interfaces:
SafeDisposable
public class SoMorphoLut2D extends SoFieldContainer
Class that represents a morphological look-up table (LUT). Class that represents a 2D morphological look-up table (LUT).- See Also:
SoFieldContainer
,SbKernel2i32
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SoMorphoLut2D.InsertModes
-
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
-
Field Summary
-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Constructor Summary
Constructors Constructor Description SoMorphoLut2D()
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SbKernel2i32
getKernel(int indexKernel)
Returns the specified kernel.long
getNumKernels()
Return the number of kernels registered in the LUT.void
insertKernel(SbKernel2i32 kernel2d, SoMorphoLut2D.InsertModes insertMode, int kernelRotation)
Inserts a kernel into the LUT.-
Methods inherited from class com.openinventor.inventor.fields.SoFieldContainer
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
-
Methods inherited from class com.openinventor.inventor.misc.SoBase
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable, touch
-
Methods inherited from class com.openinventor.inventor.Inventor
getNativeResourceHandle
-
-
-
-
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.
-
-