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

Method getRGBStack

ij/src/main/java/ij/CompositeImage.java:458–473  ·  view source on GitHub ↗
(ImagePlus imp)

Source from the content-addressed store, hash-verified

456 }
457
458 ImageStack getRGBStack(ImagePlus imp) {
459 ImageProcessor ip = imp.getProcessor();
460 int w = ip.getWidth();
461 int h = ip.getHeight();
462 int size = w*h;
463 byte[] r = new byte[size];
464 byte[] g = new byte[size];
465 byte[] b = new byte[size];
466 ((ColorProcessor)ip).getRGB(r, g, b);
467 ImageStack stack = new ImageStack(w, h);
468 stack.addSlice("Red", r);
469 stack.addSlice("Green", g);
470 stack.addSlice("Blue", b);
471 stack.setColorModel(ip.getDefaultColorModel());
472 return stack;
473 }
474
475 public LUT createLutFromColor(Color color) {
476 return LUT.createLutFromColor(color);

Callers 1

CompositeImageMethod · 0.95

Calls 7

getWidthMethod · 0.95
getHeightMethod · 0.95
addSliceMethod · 0.95
setColorModelMethod · 0.95
getDefaultColorModelMethod · 0.95
getRGBMethod · 0.80
getProcessorMethod · 0.45

Tested by

no test coverage detected