Package com.openinventor.imageviz
Class SbKernel2i32
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.imageviz.SbKernel2i32
-
public class SbKernel2i32 extends Inventor
Integer 2D-Kernel for morphological operations. Define an n x m integer 2D-kernel.- See Also:
SoSFKernel2i32
,SoMFKernel2i32
,SoMorphoLut2D
-
-
Nested Class Summary
-
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 SbKernel2i32()
Default constructor.SbKernel2i32(int numRows, int numCols)
Constructor defining the size of the kernel.SbKernel2i32(SbKernel2i32 copyFrom)
SbKernel2i32(SbVec2i32 size)
Constructor defining the size of the kernel (numRows, numColumns).
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getNumCols()
Returns the number of columns.long
getNumRows()
Returns the number of rows.SbVec2i32
getSize()
Returns the size of the kernel.int
getValue(int indexRow, int indexCol)
Returns the value of the kernel at position (row, col).void
setSize(long numRows, long numCols)
Set the size of the kernel.void
setSize(SbVec2i32 dimension)
Set the size of the kernel.void
setValue(int indexRow, int indexCol, int value)
Sets the value of the kernel at position (row, col).void
setValue(SbKernel2i32 copyFrom)
static SbKernel2i32[]
toArray(long nativeArray, long length)
-
Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
-
-
-
Constructor Detail
-
SbKernel2i32
public SbKernel2i32(SbKernel2i32 copyFrom)
-
SbKernel2i32
public SbKernel2i32(int numRows, int numCols)
Constructor defining the size of the kernel. Kernel is initialized to zero values.
-
SbKernel2i32
public SbKernel2i32(SbVec2i32 size)
Constructor defining the size of the kernel (numRows, numColumns). Kernel is initialized to zero values.
-
SbKernel2i32
public SbKernel2i32()
Default constructor. The kernel is not initialized.
-
-
Method Detail
-
getNumRows
public long getNumRows()
Returns the number of rows.
-
setSize
public void setSize(long numRows, long numCols)
Set the size of the kernel. Size is the number of rows and number of columns.If numCols (or numRows) is smaller than the current number of columns (or rows), the kernel is reduced to the first numCols columns (or numRows rows).
If numCols (or numRows) is greater than the current number of columns (or rows), values inside the old bounds are preserved and values outside the old bounds are filled to 0.
-
toArray
public static SbKernel2i32[] toArray(long nativeArray, long length)
-
setValue
public void setValue(SbKernel2i32 copyFrom)
-
getNumCols
public long getNumCols()
Returns the number of columns.
-
getSize
public SbVec2i32 getSize()
Returns the size of the kernel. Size is the number of rows and number of columns.
-
setValue
public void setValue(int indexRow, int indexCol, int value)
Sets the value of the kernel at position (row, col). Throws anSbException
if indices are out of bounds.
-
setSize
public void setSize(SbVec2i32 dimension)
Set the size of the kernel. Size is the number of rows and number of columns.If numCols (or numRows) is smaller than the current number of columns (or rows), the kernel is reduced to the first numCols columns (or numRows rows).
If numCols (or numRows) is greater than the current number of columns (or rows), values inside the old bounds are preserved and values outside the old bounds are filled to 0.
-
getValue
public int getValue(int indexRow, int indexCol)
Returns the value of the kernel at position (row, col). Throws anSbException
if indices are out of bounds.
-
-