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

Method getMask

ij/src/main/java/ij/ImagePlus.java:1121–1134  ·  view source on GitHub ↗

For images with irregular ROIs, returns a byte mask, otherwise, returns null. Mask pixels have a non-zero value.and the dimensions of the mask are equal to the width and height of the ROI. @see ij.ImagePlus#createRoiMask @see ij.ImagePlus#createThresholdMask

()

Source from the content-addressed store, hash-verified

1119 * @see ij.ImagePlus#createThresholdMask
1120 */
1121 public ImageProcessor getMask() {
1122 if (roi==null) {
1123 if (ip!=null) ip.resetRoi();
1124 return null;
1125 }
1126 ImageProcessor mask = roi.getMask();
1127 if (mask==null)
1128 return null;
1129 if (ip!=null && roi!=null) {
1130 ip.setMask(mask);
1131 ip.setRoi(roi.getBounds());
1132 }
1133 return mask;
1134 }
1135
1136 /** Returns an 8-bit binary (foreground=255, background=0)
1137 * ROI or overlay mask that has the same dimensions

Callers 3

copyMethod · 0.95
isSmallerMethod · 0.45
pasteMethod · 0.45

Calls 4

getBoundsMethod · 0.65
resetRoiMethod · 0.45
setMaskMethod · 0.45
setRoiMethod · 0.45

Tested by

no test coverage detected