16 template<
typename T,
int Cellsize>
18 sizeX_(0), sizeY_(0), sizeZ_(0), data_(0) {
21 template<
typename T,
int Cellsize>
26 data_(Cellsize * sizeX * sizeY * sizeZ) {
29 template<
typename T,
int Cellsize>
34 data_(Cellsize * sizeX * sizeY * sizeZ, val) {
37 template<
typename T,
int Cellsize>
49 template<
typename T,
int Cellsize>
54 data_.assign( Cellsize * sizeX * sizeY * sizeZ, val );
57 template<
typename T,
int Cellsize>
59 data_.assign( Cellsize * sizeX_ * sizeY_ * sizeZ_, val );
66 template<
typename T,
int Cellsize>
68 assert( x >= 0 && x < sizeX_ );
69 assert( y >= 0 && y < sizeY_ );
70 assert( z >= 0 && z < sizeZ_ );
71 assert( f >= 0 && f < Cellsize );
73 return data_[((z * sizeY_ + y) * sizeX_ + x) * Cellsize + f];
76 template<
typename T,
int Cellsize>
78 assert( x >= 0 && x < sizeX_ );
79 assert( y >= 0 && y < sizeY_ );
80 assert( z >= 0 && z < sizeZ_ );
81 assert( f >= 0 && f < Cellsize );
83 return data_[((z * sizeY_ + y) * sizeX_ + x) * Cellsize + f];
94 sizeX_(0), sizeY_(0), sizeZ_(0), data_(0) {
102 data_(sizeX * sizeY * sizeZ) {
110 data_(sizeX * sizeY * sizeZ, val) {
130 data_.assign( sizeX * sizeY * sizeZ, val );
144 assert( x >= 0 && x <
sizeX_ );
145 assert( y >= 0 && y <
sizeY_ );
146 assert( z >= 0 && z <
sizeZ_ );
153 assert( x >= 0 && x <
sizeX_ );
154 assert( y >= 0 && y <
sizeY_ );
155 assert( z >= 0 && z <
sizeZ_ );