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

Method getColorValue

ij/src/main/java/ij/macro/Functions.java:5483–5493  ·  view source on GitHub ↗
(Color color)

Source from the content-addressed store, hash-verified

5481 }
5482
5483 double getColorValue(Color color) {
5484 ImagePlus imp = WindowManager.getCurrentImage();
5485 if (imp==null || imp.getBitDepth()==24)
5486 return color.getRGB()&0xffffff;
5487 ImageProcessor ip = imp.getProcessor();
5488 ip.setRoi(0,0,1,1);
5489 ip = ip.crop();
5490 ip.setColor(color);
5491 ip.drawDot(0,0);
5492 return ip.getf(0,0);
5493 }
5494
5495 double doStack() {
5496 interp.getToken();

Callers 1

getValueMethod · 0.95

Calls 9

getCurrentImageMethod · 0.95
getBitDepthMethod · 0.95
getProcessorMethod · 0.95
setRoiMethod · 0.95
cropMethod · 0.95
setColorMethod · 0.95
drawDotMethod · 0.95
getfMethod · 0.95
getRGBMethod · 0.80

Tested by

no test coverage detected