Assigns the pixel array of an ImageProcessor to the specified slice, where {@literal 1<=n<=nslices}.
(ImageProcessor ip, int n)
| 346 | * where {@literal 1<=n<=nslices}. |
| 347 | */ |
| 348 | public void setProcessor(ImageProcessor ip, int n) { |
| 349 | if (n<1 || n>nSlices) |
| 350 | throw new IllegalArgumentException(outOfRange+n); |
| 351 | ip = convertType(ip); |
| 352 | if (ip.getWidth()!=width || ip.getHeight()!=height) |
| 353 | throw new IllegalArgumentException("Wrong dimensions for this stack"); |
| 354 | stack[n-1] = ip.getPixels(); |
| 355 | } |
| 356 | |
| 357 | /** Assigns a new color model to this stack. */ |
| 358 | public void setColorModel(ColorModel cm) { |
no test coverage detected