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. | |
Integer 3D-Kernel for morphological operations.
Define an n x m x p integer 3D-kernel.
SoSFKernel3i32, SoMFKernel3i32, SoMorphoLut3D
Definition at line 44 of file SbKernel3i32.h.
SbKernel3i32::SbKernel3i32 | ( | ) |
Default constructor.
The kernel is not initialized.
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::SbKernel3i32 | ( | const SbVec3i32 & | size | ) |
Constructor defining the size of the kernel.
Kernel is initialized to zero values.
SbKernel3i32::~SbKernel3i32 | ( | ) |
Destructor.
size_t SbKernel3i32::getNumCols | ( | ) | const |
Returns the number of columns.
size_t SbKernel3i32::getNumRows | ( | ) | const |
Returns the number of rows.
size_t SbKernel3i32::getNumSlices | ( | ) | const |
Returns the number of slices.
SbVec3i32 SbKernel3i32::getSize | ( | ) | const |
Returns the size of the kernel.
Size is the number of columns, number of rows and number of slices.
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.
int32_t & SbKernel3i32::operator() | ( | int | i, |
int | j, | ||
int | k | ||
) |
L-value accesor operator.
So you can do:
Note:
const int32_t & SbKernel3i32::operator() | ( | int | i, |
int | j, | ||
int | k | ||
) | const |
Accesor operator.
So you can do:
Note:
void SbKernel3i32::setSize | ( | const SbVec3i32 & | dimension | ) |
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.
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.
|
friend |
Inequality comparison operator.
Definition at line 154 of file SbKernel3i32.h.
|
friend |
Equality comparison operator.