Open Inventor Release 2023.2.3
 
Loading...
Searching...
No Matches
SbKernel2i32.h
Go to the documentation of this file.
1/*=======================================================================
2 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4 *** ***
5 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8 *** ***
9 *** RESTRICTED RIGHTS LEGEND ***
10 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15 *** ***
16 *** COPYRIGHT (C) 1996-2024 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : Martial Papillon (oct 2014)
22**=======================================================================*/
23
24#ifndef _SB_KERNEL_2I32_H_
25#define _SB_KERNEL_2I32_H_
26
27#include <ImageViz/SoImageViz.h>
28#include <Inventor/SbVec.h>
29#include <Inventor/SbDataType.h>
30class SoDEPRECATED SbKernel2i32
46{
47public:
52
57 SbKernel2i32(int numRows, int numCols);
58
64
69
75
79 size_t getNumRows() const;
80
84 size_t getNumCols() const;
85
87
96 void setSize(size_t numRows, size_t numCols);
97 void setSize(const SbVec2i32& dimension);
98 // @}
99
104 int32_t getValue(int indexRow, int indexCol) const;
105
110 void setValue(int indexRow, int indexCol, int32_t value);
111
121 int32_t& operator()(int indexRow, int indexCol);
122
132 const int32_t& operator()(int indexRow, int indexCol) const ;
133
137 friend int operator ==(const SbKernel2i32 &k1, const SbKernel2i32 &k2);
138
142 friend int operator !=(const SbKernel2i32 &k1, const SbKernel2i32 &k2)
143 { return !(k1 == k2); }
144
145private:
147 std::vector<int32_t> m_kernelsValues;
148 size_t m_numRows;
149 size_t m_numCols;
150};
151
152#endif
int operator==(const className &f) const
Returns TRUE if otherField is of the same type and has the same value as this field.
int operator!=(const className &f) const
Returns FALSE if otherField is of the same type and has the same value as this field.
Definition SoSubField.h:249
<a href="IconLegend.html"><img src="extIP.gif" alt="ImageViz" border="0"></a> Integer 2D-Kernel for ...
void setSize(const SbVec2i32 &dimension)
size_t getNumRows() const
Returns the number of rows.
size_t getNumCols() const
Returns the number of columns.
~SbKernel2i32()
Destructor.
SbKernel2i32(const SbVec2i32 &size)
Constructor defining the size of the kernel (numRows, numColumns).
SbKernel2i32()
Default constructor.
int32_t getValue(int indexRow, int indexCol) const
Returns the value of the kernel at position (row, col).
SbVec2i32 getSize() const
Returns the size of the kernel.
void setSize(size_t numRows, size_t numCols)
Set the size of the kernel.
int32_t & operator()(int indexRow, int indexCol)
L-value accessor operator as an usual matrix.
SbKernel2i32(int numRows, int numCols)
Constructor defining the size of the kernel.
void setValue(int indexRow, int indexCol, int32_t value)
Sets the value of the kernel at position (row, col).
const int32_t & operator()(int indexRow, int indexCol) const
Accessor operator as an usual matrix.
2D vector class.
Definition SbVec.h:517
size_t size() const