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

Method parseCurrentROI

ij/src/main/java/ij/plugin/ScaleBar.java:132–142  ·  view source on GitHub ↗

If there is a user selected ROI, set the class variables {roiX} and {roiY}, {roiWidth}, {roiHeight} to the corresponding features of the ROI, and return true. Otherwise, return false.

()

Source from the content-addressed store, hash-verified

130 * features of the ROI, and return true. Otherwise, return false.
131 */
132 boolean parseCurrentROI() {
133 Roi roi = imp.getRoi();
134 if (roi == null) return false;
135
136 Rectangle r = roi.getBounds();
137 roiX = r.x;
138 roiY = r.y;
139 roiWidth = r.width;
140 roiHeight = r.height;
141 return true;
142 }
143
144 /**
145 * There is no hard coded value for the width of the scalebar,

Callers 1

runMethod · 0.95

Calls 2

getBoundsMethod · 0.95
getRoiMethod · 0.45

Tested by

no test coverage detected