Fills all of the {p,z} with the array provided, which specifies {y,x}.
| 109 | |
| 110 | // Fills all of the {p,z} with the array provided, which specifies {y,x}. |
| 111 | void FillWithYX(const Array2D<T>& value) { |
| 112 | CHECK_EQ(value.height(), height()); |
| 113 | CHECK_EQ(value.width(), width()); |
| 114 | for (int64 plane = 0; plane < planes(); ++plane) { |
| 115 | for (int64 depth = 0; depth < this->depth(); ++depth) { |
| 116 | for (int64 height = 0; height < this->height(); ++height) { |
| 117 | for (int64 width = 0; width < this->width(); ++width) { |
| 118 | (*this)(plane, depth, height, width) = value(height, width); |
| 119 | } |
| 120 | } |
| 121 | } |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | // Fills all of the {p,x} with the array provided, which specifies {z,y}. |
| 126 | void FillWithZY(const Array2D<T>& value) { |