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

Method getImageRoi

ij/src/main/java/ij/io/RoiDecoder.java:515–528  ·  view source on GitHub ↗
(Roi roi, int opacity, int size, int options)

Source from the content-addressed store, hash-verified

513 }
514
515 Roi getImageRoi(Roi roi, int opacity, int size, int options) {
516 if (size<=0)
517 return roi;
518 Rectangle r = roi.getBounds();
519 byte[] bytes = new byte[size];
520 for (int i=0; i<size; i++)
521 bytes[i] = (byte)getByte(COORDINATES+i);
522 ImagePlus imp = new Opener().deserialize(bytes);
523 ImageRoi roi2 = new ImageRoi(r.x, r.y, imp.getProcessor());
524 roi2.setOpacity(opacity/255.0);
525 if ((options&ZERO_TRANSPARENT)!=0)
526 roi2.setZeroTransparent(true);
527 return roi2;
528 }
529
530 String getRoiName() {
531 String fileName = name;

Callers 1

getRoiMethod · 0.95

Calls 6

getByteMethod · 0.95
getProcessorMethod · 0.95
setOpacityMethod · 0.95
setZeroTransparentMethod · 0.95
getBoundsMethod · 0.65
deserializeMethod · 0.45

Tested by

no test coverage detected