MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / setProcessor

Method setProcessor

ij/src/main/java/ij/ImageStack.java:348–355  ·  view source on GitHub ↗

Assigns the pixel array of an ImageProcessor to the specified slice, where {@literal 1<=n<=nslices}.

(ImageProcessor ip, int n)

Source from the content-addressed store, hash-verified

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) {

Callers 1

filterMethod · 0.95

Calls 4

convertTypeMethod · 0.95
getWidthMethod · 0.45
getHeightMethod · 0.45
getPixelsMethod · 0.45

Tested by

no test coverage detected