SbKernel3i32 Class Reference

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

#include <ImageViz/SbKernel3i32.h>

List of all members.

Public Member Functions

 SbKernel3i32 ()
 SbKernel3i32 (size_t numCols, size_t numRows, size_t numSlices)
 SbKernel3i32 (const SbVec3i32 &size)
 ~SbKernel3i32 ()
SbVec3i32 getSize () const
size_t getNumRows () const
size_t getNumCols () const
size_t getNumSlices () const
int32_t getValue (int indexCol, int indexRow, int indexSlice) const
void setValue (int indexCol, int indexRow, int indexSlice, int32_t value)
int32_t & operator() (int i, int j, int k)
const int32_t & operator() (int i, int j, int k) const

Friends

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



void setSize (size_t numCols, size_t numRows, size_t numSlices)
void setSize (const SbVec3i32 &dimension)

Detailed Description

ImageViz Integer 3D-Kernel for morphological operations.

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

SEE ALSO

SoSFKernel3i32, SoMFKernel3i32, SoMorphoLut3D


Constructor & Destructor Documentation

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.


Member Function Documentation

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.

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).
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).
void SbKernel3i32::setSize ( const SbVec3i32 dimension  ) 

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


Friends And Related Function Documentation

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

Inequality comparison operator.

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

Equality comparison operator.


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

Open Inventor Toolkit reference manual, generated on 15 Mar 2023
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/