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

Method measure

ij/src/main/java/ij/plugin/filter/Analyzer.java:262–290  ·  view source on GitHub ↗

Measures the image or selection and adds the results to the default results table.

()

Source from the content-addressed store, hash-verified

260
261 /** Measures the image or selection and adds the results to the default results table. */
262 public void measure() {
263 String lastHdr = rt.getColumnHeading(ResultsTable.LAST_HEADING);
264 if (lastHdr==null || lastHdr.charAt(0)!='M') {
265 if (!reset()) return;
266 }
267 firstParticle = lastParticle = 0;
268 Roi roi = imp.getRoi();
269 if (roi!=null && roi.getType()==Roi.POINT) {
270 measurePoint(roi);
271 return;
272 }
273 if (roi!=null && roi.getType()==Roi.ANGLE) {
274 measureAngle(roi);
275 return;
276 }
277 if (roi!=null && roi.isLine()) {
278 measureLength(roi);
279 return;
280 }
281 ImageStatistics stats;
282 if (isRedirectImage()) {
283 stats = getRedirectStats(measurements, roi);
284 if (stats==null) return;
285 } else
286 stats = imp.getStatistics(measurements);
287 if (!IJ.isResultsWindow() && IJ.getInstance()!=null)
288 reset();
289 saveResults(stats, roi);
290 }
291
292 /*
293 void showHeadings() {

Callers 4

getValueMethod · 0.95
multiMeasureMethod · 0.95
runMethod · 0.95
measureMethod · 0.95

Calls 15

resetMethod · 0.95
getTypeMethod · 0.95
measurePointMethod · 0.95
measureAngleMethod · 0.95
isLineMethod · 0.95
measureLengthMethod · 0.95
isRedirectImageMethod · 0.95
getRedirectStatsMethod · 0.95
isResultsWindowMethod · 0.95
getInstanceMethod · 0.95
saveResultsMethod · 0.95
getColumnHeadingMethod · 0.80

Tested by

no test coverage detected