Open Inventor Release 2023.2.3
 
Loading...
Searching...
No Matches
SbKernel3i32 Class Reference

ImageViz Integer 3D-Kernel for morphological operations. More...

#include <ImageViz/SbKernel3i32.h>

Public Member Functions

 SbKernel3i32 ()
 Default constructor.
 
 SbKernel3i32 (size_t numCols, size_t numRows, size_t numSlices)
 Constructor defining the size of the kernel.
 
 SbKernel3i32 (const SbVec3i32 &size)
 Constructor defining the size of the kernel.
 
 ~SbKernel3i32 ()
 Destructor.
 
SbVec3i32 getSize () const
 Returns the size of the kernel.
 
size_t getNumRows () const
 Returns the number of rows.
 
size_t getNumCols () const
 Returns the number of columns.
 
size_t getNumSlices () const
 Returns the number of slices.
 
void setSize (size_t numCols, size_t numRows, size_t numSlices)
 Set the size of the kernel.
 
void setSize (const SbVec3i32 &dimension)
 
int32_t getValue (int indexCol, int indexRow, int indexSlice) const
 Returns the value of the kernel at position (i, j, k).
 
void setValue (int indexCol, int indexRow, int indexSlice, int32_t value)
 Sets the value of the kernel at position (i, j, k).
 
int32_t & operator() (int i, int j, int k)
 L-value accesor operator.
 
const int32_t & operator() (int i, int j, int k) const
 Accesor operator.
 

Friends

int operator== (const SbKernel3i32 &k1, const SbKernel3i32 &k2)
 Equality comparison operator.
 
int operator!= (const SbKernel3i32 &k1, const SbKernel3i32 &k2)
 Inequality comparison operator.
 

Detailed Description

ImageViz Integer 3D-Kernel for morphological operations.

Define an n x m x p integer 3D-kernel.

SEE ALSO

SoSFKernel3i32, SoMFKernel3i32, SoMorphoLut3D

Definition at line 44 of file SbKernel3i32.h.

Constructor & Destructor Documentation

◆ SbKernel3i32() [1/3]

SbKernel3i32::SbKernel3i32 ( )

Default constructor.

The kernel is not initialized.

◆ SbKernel3i32() [2/3]

SbKernel3i32::SbKernel3i32 ( size_t  numCols,
size_t  numRows,
size_t  numSlices 
)

Constructor defining the size of the kernel.

Kernel is initialized to zero values.

◆ SbKernel3i32() [3/3]

SbKernel3i32::SbKernel3i32 ( const SbVec3i32 size)

Constructor defining the size of the kernel.

Kernel is initialized to zero values.

◆ ~SbKernel3i32()

SbKernel3i32::~SbKernel3i32 ( )

Destructor.

Member Function Documentation

◆ getNumCols()

size_t SbKernel3i32::getNumCols ( ) const

Returns the number of columns.

◆ getNumRows()

size_t SbKernel3i32::getNumRows ( ) const

Returns the number of rows.

◆ getNumSlices()

size_t SbKernel3i32::getNumSlices ( ) const

Returns the number of slices.

◆ getSize()

SbVec3i32 SbKernel3i32::getSize ( ) const

Returns the size of the kernel.

Size is the number of columns, number of rows and number of slices.

◆ getValue()

int32_t SbKernel3i32::getValue ( int  indexCol,
int  indexRow,
int  indexSlice 
) const

Returns the value of the kernel at position (i, j, k).

Range of each index is between 0 and n-1 with n, the number of elements in each dimension, i.e getNumCols() for columns, getNumRows() for rows, and getNumSlices() for slices. Throws an SbException if indices are out of bounds.

◆ operator()() [1/2]

int32_t & SbKernel3i32::operator() ( int  i,
int  j,
int  k 
)

L-value accesor operator.

So you can do:

kernel(i, j, k) = val;

Note:

  • kernel(i, j, k) refers to the element at kernel[column][row][slice].
  • Range of each index is between 0 and n-1 with n, the number of elements in each dimension, i.e getNumCols() for columns, getNumRows() for rows, and getNumSlices() for slices.
  • For performance reasons this is an unsafe accessor (bounds are not tested).

◆ operator()() [2/2]

const int32_t & SbKernel3i32::operator() ( int  i,
int  j,
int  k 
) const

Accesor operator.

So you can do:

val = kernel(i, j, k);

Note:

  • kernel(i, j, k) refers to the element at kernel[column][row][slice].
  • Range of each index is between 0 and n-1 with n, the number of elements in each dimension, i.e getNumCols() for columns, getNumRows() for rows, and getNumSlices() for slices.
  • For performance reasons this is an unsafe accessor (bounds are not tested).

◆ setSize() [1/2]

void SbKernel3i32::setSize ( const SbVec3i32 dimension)

◆ setSize() [2/2]

void SbKernel3i32::setSize ( size_t  numCols,
size_t  numRows,
size_t  numSlices 
)

Set the size of the kernel.

Size is the number of columns, number of rows and number of slices.

If the specified size on a dimension is smaller than the current one, the kernel is reduced to its first elements on the corresponding dimension.
If specified size on a dimension is greater than the current one, values inside the old bounds are preserved and values outside the old bounds are filled to 0.

◆ setValue()

void SbKernel3i32::setValue ( int  indexCol,
int  indexRow,
int  indexSlice,
int32_t  value 
)

Sets the value of the kernel at position (i, j, k).

Range of each index is between 0 and n-1 with n, the number of elements in each dimension, i.e getNumCols() for columns, getNumRows() for rows, and getNumSlices() for slices. Throws an SbException if indices are out of bounds.

Friends And Related Symbol Documentation

◆ operator!=

int operator!= ( const SbKernel3i32 k1,
const SbKernel3i32 k2 
)
friend

Inequality comparison operator.

Definition at line 154 of file SbKernel3i32.h.

◆ operator==

int operator== ( const SbKernel3i32 k1,
const SbKernel3i32 k2 
)
friend

Equality comparison operator.


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