Fills all of the {x,y} with the array provided, which specifies {p,z}.
| 139 | |
| 140 | // Fills all of the {x,y} with the array provided, which specifies {p,z}. |
| 141 | void FillWithPZ(const Array2D<T>& value) { |
| 142 | CHECK_EQ(value.height(), planes()); |
| 143 | CHECK_EQ(value.width(), depth()); |
| 144 | for (int64 height = 0; height < this->height(); ++height) { |
| 145 | for (int64 width = 0; width < this->width(); ++width) { |
| 146 | for (int64 plane = 0; plane < planes(); ++plane) { |
| 147 | for (int64 depth = 0; depth < this->depth(); ++depth) { |
| 148 | (*this)(plane, depth, height, width) = value(plane, depth); |
| 149 | } |
| 150 | } |
| 151 | } |
| 152 | } |
| 153 | } |
| 154 | |
| 155 | // Fills each of the minor-dim matrices with a number designating which minor |
| 156 | // dim matrix is enclosed by the shape. |