2 #ifndef vbl_bit_array_3d_h_ 3 #define vbl_bit_array_3d_h_ 21 # include <vcl_msvc_warnings.h> 34 vbl_bit_array_3d(
unsigned int sizex,
unsigned int sizey,
unsigned int sizez,
bool v)
37 vbl_bit_array_3d(
unsigned int sizex,
unsigned int sizey,
unsigned int sizez,
bool v[]);
63 void put(
unsigned int i1,
unsigned int i2,
unsigned int i3,
bool v);
66 void set(
unsigned int i1,
unsigned int i2,
unsigned int i3,
bool v=
true)
67 {
put(i1, i2, i3, v); }
70 bool get(
unsigned int i1,
unsigned int i2,
unsigned int i3)
const;
73 void flip(
unsigned int i1,
unsigned int i2,
unsigned int i3);
76 bool operator() (
unsigned int i1,
unsigned int i2,
unsigned int i3)
const;
82 unsigned long size()
const;
95 void construct(
unsigned int m,
unsigned int n,
unsigned int p);
97 void index(
unsigned int x,
unsigned int y,
unsigned int z,
98 unsigned long &byteindex,
unsigned char &bitindex)
const;
103 #endif // vbl_bit_array_3d_h_
bool operator!=(vbl_bit_array_3d const &a) const
void clear()
make as if default-constructed.
void flip(unsigned int i1, unsigned int i2, unsigned int i3)
Change the value of a cell.
bool get(unsigned int i1, unsigned int i2, unsigned int i3) const
Return the value of a cell.
void index(unsigned int x, unsigned int y, unsigned int z, unsigned long &byteindex, unsigned char &bitindex) const
vbl_bit_array_3d & operator=(vbl_bit_array_3d const &)
Assignment operator.
bool operator==(vbl_bit_array_3d const &a) const
Comparison.
void resize(unsigned int m, unsigned int n, unsigned int p)
Delete contents and resize to m rows x n cols x p layers.
void set(unsigned int i1, unsigned int i2, unsigned int i3, bool v=true)
Set the value of a cell; default is to set the value on.
vbl_bit_array_3d(unsigned int sizex, unsigned int sizey, unsigned int sizez)
Create a bitarray of the specified size, without initialising elements.
std::ostream & operator<<(std::ostream &os, vbl_bit_array_3d const &)
void put(unsigned int i1, unsigned int i2, unsigned int i3, bool v)
Set the value of a cell.
unsigned int row1_count() const
unsigned int row3_count() const
void fill(bool v)
Set all cell values to v.
void construct(unsigned int m, unsigned int n, unsigned int p)
bool operator()(unsigned int i1, unsigned int i2, unsigned int i3) const
Return the value of a cell.
unsigned int row2_count() const
unsigned long size() const
Number of bytes allocated by the data.