Fills all of the {p,x} with the array provided, which specifies {z,y}.
| 124 | |
| 125 | // Fills all of the {p,x} with the array provided, which specifies {z,y}. |
| 126 | void FillWithZY(const Array2D<T>& value) { |
| 127 | CHECK_EQ(value.height(), depth()); |
| 128 | CHECK_EQ(value.width(), height()); |
| 129 | for (int64 plane = 0; plane < planes(); ++plane) { |
| 130 | for (int64 depth = 0; depth < this->depth(); ++depth) { |
| 131 | for (int64 height = 0; height < this->height(); ++height) { |
| 132 | for (int64 width = 0; width < this->width(); ++width) { |
| 133 | (*this)(plane, depth, height, width) = value(depth, height); |
| 134 | } |
| 135 | } |
| 136 | } |
| 137 | } |
| 138 | } |
| 139 | |
| 140 | // Fills all of the {x,y} with the array provided, which specifies {p,z}. |
| 141 | void FillWithPZ(const Array2D<T>& value) { |